cleanup code style

This commit is contained in:
Irmen de Jong 2021-12-30 18:47:38 +01:00
parent 7c889f17b9
commit d8f7feb672
3 changed files with 5 additions and 5 deletions

View File

@ -130,7 +130,7 @@ data class Label(override val name: String, override val position: Position) : S
override fun toString()= "Label(name=$name, pos=$position)"
}
class Return(var value: Expression?, final override val position: Position) : Statement() {
class Return(var value: Expression?, override val position: Position) : Statement() {
override lateinit var parent: Node
override fun linkParents(parent: Node) {
@ -181,7 +181,7 @@ class VarDecl(val type: VarDeclType,
val autogeneratedDontRemove: Boolean,
val sharedWithAsm: Boolean,
val subroutineParameter: SubroutineParameter?,
final override val position: Position) : Statement(), INamedStatement {
override val position: Position) : Statement(), INamedStatement {
override lateinit var parent: Node
var allowInitializeWithZero = true
@ -299,7 +299,7 @@ class ArrayIndex(var indexExpr: Expression,
override fun copy() = ArrayIndex(indexExpr.copy(), position)
}
class Assignment(var target: AssignTarget, var value: Expression, final override val position: Position) : Statement() {
class Assignment(var target: AssignTarget, var value: Expression, override val position: Position) : Statement() {
override lateinit var parent: Node
override fun linkParents(parent: Node) {

View File

@ -233,7 +233,7 @@ abstract class AstWalker {
fun visit(containment: ContainmentCheck, parent: Node) {
track(before(containment, parent), containment, parent)
containment.element.accept(this, containment)
containment.iterable?.accept(this, containment)
containment.iterable.accept(this, containment)
track(after(containment, parent), containment, parent)
}

View File

@ -50,7 +50,7 @@ abstract class Zeropage(protected val options: CompilationOptions) {
if(position!=null)
errors.warn("allocated a large value (float) in zeropage", position)
else
errors.warn("$scopedname: allocated a large value (float) in zeropage", position ?: Position.DUMMY)
errors.warn("$scopedname: allocated a large value (float) in zeropage", Position.DUMMY)
options.compTarget.machine.FLOAT_MEM_SIZE
} else throw InternalCompilerException("floating point option not enabled")
}