diff --git a/compilerAst/src/prog8/ast/AstToplevel.kt b/compilerAst/src/prog8/ast/AstToplevel.kt index 8a03cfd6b..a53abb02c 100644 --- a/compilerAst/src/prog8/ast/AstToplevel.kt +++ b/compilerAst/src/prog8/ast/AstToplevel.kt @@ -28,7 +28,7 @@ object ParentSentinel : Node { interface IFunctionCall { var target: IdentifierReference - var args: MutableList + val args: MutableList val position: Position var parent: Node // will be linked correctly later (late init) } diff --git a/compilerAst/src/prog8/ast/expressions/AstExpressions.kt b/compilerAst/src/prog8/ast/expressions/AstExpressions.kt index 3f20683c1..5c09eaa62 100644 --- a/compilerAst/src/prog8/ast/expressions/AstExpressions.kt +++ b/compilerAst/src/prog8/ast/expressions/AstExpressions.kt @@ -1047,7 +1047,7 @@ data class IdentifierReference(val nameInSource: List, override val posi } class FunctionCallExpression(override var target: IdentifierReference, - override var args: MutableList, + override val args: MutableList, override val position: Position) : Expression(), IFunctionCall { override lateinit var parent: Node @@ -1204,7 +1204,7 @@ class ContainmentCheck(var element: Expression, } class BuiltinFunctionCall(override var target: IdentifierReference, - override var args: MutableList, + override val args: MutableList, override val position: Position) : Expression(), IFunctionCall { val name = target.nameInSource.single() diff --git a/compilerAst/src/prog8/ast/statements/AstStatements.kt b/compilerAst/src/prog8/ast/statements/AstStatements.kt index 03a7f9d2a..3dc27a44a 100644 --- a/compilerAst/src/prog8/ast/statements/AstStatements.kt +++ b/compilerAst/src/prog8/ast/statements/AstStatements.kt @@ -663,7 +663,7 @@ class Jump(var address: UInt?, } class FunctionCallStatement(override var target: IdentifierReference, - override var args: MutableList, + override val args: MutableList, val void: Boolean, override val position: Position) : Statement(), IFunctionCall { override lateinit var parent: Node @@ -1134,7 +1134,7 @@ class DirectMemoryWrite(var addressExpression: Expression, override val position // this is meant to eventually (?) be able to not have any FunctionCallStatement nodes to worry about anymore // However, if/when the codegen is moved over to use the new CodeAst (PtProgram etc. etc.) this is all moot. class BuiltinFunctionCallStatement(override var target: IdentifierReference, - override var args: MutableList, + override val args: MutableList, override val position: Position) : Statement(), IFunctionCall { val name: String = target.nameInSource.single()