fix pointer deref ast printer

This commit is contained in:
Irmen de Jong
2025-09-27 01:59:47 +02:00
parent d319badc6c
commit 1467c7039d
2 changed files with 18 additions and 4 deletions
@@ -571,7 +571,18 @@ class AstToSourceTextConverter(val output: (text: String) -> Unit, val program:
}
override fun visit(deref: ArrayIndexedPtrDereference) {
output("???? Array Indexed Ptr Dereference should have been converted to other AST nodes ????")
for(c in deref.chain) {
output(c.first)
c.second?.let {
output("[")
it.accept(this)
output("]")
}
if(c !== deref.chain.last())
output("^^.")
}
if(deref.derefLast)
output("^^")
}
override fun visit(initializer: StaticStructInitializer) {