diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2024-04-15 23:16:41 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2024-04-15 23:16:41 +0300 |
| commit | 3589b9be557fddc859405b937c3ed84342d66852 (patch) | |
| tree | 3b3605b00fd6baf5057862714742a095bb26d46e /atk16_asm/parser.py | |
| parent | f40d601771b9656a873c57dbf2527a5ec8600bd0 (diff) | |
Work on monitor, add std_term
Diffstat (limited to 'atk16_asm/parser.py')
| -rw-r--r-- | atk16_asm/parser.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/atk16_asm/parser.py b/atk16_asm/parser.py index 4823450..3394c2e 100644 --- a/atk16_asm/parser.py +++ b/atk16_asm/parser.py @@ -117,7 +117,11 @@ def parse(tokens: list[str]) -> list[Term]: elif term.startswith("${") and term.endswith("}"): return Expr(term[2:-1]) elif term.startswith("\"") and term.endswith("\""): - return StringLiteral(term[1:-1]) + string_chars = term[1:-1] + string_chars = string_chars.replace("\\n", "\n") + string_chars = string_chars.replace("\\r", "\r") + string_chars = string_chars.replace("\\t", "\t") + return StringLiteral(string_chars) elif term.startswith("&"): return LabelRef(term[1:]) elif term.startswith("@"): |
