allow taking address of array element

This commit is contained in:
Irmen de Jong
2023-09-17 18:30:57 +02:00
parent ccf6e32bf9
commit 880c0a5da8
21 changed files with 233 additions and 122 deletions
@@ -30,7 +30,7 @@ class StatementOptimizer(private val program: Program,
if(functionCallStatement.target.nameInSource==listOf("txt", "print")) {
val arg = functionCallStatement.args.single()
val stringVar: IdentifierReference? = if(arg is AddressOf) {
arg.identifier
if(arg.arrayIndex==null) arg.identifier else null
} else {
arg as? IdentifierReference
}