adjusted the type checker to properly process strings
This commit is contained in:
3
main.py
3
main.py
@@ -4877,7 +4877,8 @@ class Assembler:
|
|||||||
print(f"[v3] type-check: '{defn.name}' -> extern '{word.name}' skipped (unknown depth)")
|
print(f"[v3] type-check: '{defn.name}' -> extern '{word.name}' skipped (unknown depth)")
|
||||||
continue
|
continue
|
||||||
if opc == _OP_LIT:
|
if opc == _OP_LIT:
|
||||||
depth += 1
|
# String literals push 2 values (addr + len), others push 1.
|
||||||
|
depth += 2 if isinstance(node.data, str) else 1
|
||||||
elif opc == _OP_WP:
|
elif opc == _OP_WP:
|
||||||
depth += 1
|
depth += 1
|
||||||
elif opc == _OP_LIST_LIT:
|
elif opc == _OP_LIST_LIT:
|
||||||
|
|||||||
Reference in New Issue
Block a user