mirror of
https://github.com/irmen/prog8.git
synced 2025-01-26 19:30:59 +00:00
cleanup code style
This commit is contained in:
parent
7c889f17b9
commit
d8f7feb672
@ -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) {
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
@ -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")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user