diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2023-11-03 19:55:52 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2023-11-03 19:55:52 +0200 |
| commit | abf6cbdecc8eb006a859205dee7500c2b70c0998 (patch) | |
| tree | 4938cfaf270b6c83a77767de968845f704049205 /src/asm_pass0.py | |
| parent | a3b677bac00060393cc66f1bb3b350413282a4ae (diff) | |
Fix macros, add string I/O helpers
Diffstat (limited to 'src/asm_pass0.py')
| -rw-r--r-- | src/asm_pass0.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/asm_pass0.py b/src/asm_pass0.py index 4913e4b..f5b6b0b 100644 --- a/src/asm_pass0.py +++ b/src/asm_pass0.py @@ -2,6 +2,7 @@ from dataclasses import dataclass import os.path from asm_ops import * from asm_eval import * +from tokenizer import * @dataclass class Result0Line: @@ -19,7 +20,9 @@ def pass_0(lines: list[str], file_name: str) -> Result0: for (line_num, line) in enumerate(lines): line = line.split(";")[0].strip() if line == "": continue - keyword, *args = line.lower().split() + + keyword, *args = tokenize(line) + match keyword: case "@include": asm_file_name = args[0] |
