From e2b7385b03a6dc9c8c39dde5c049cd74b0768bd1 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sun, 12 Nov 2023 16:15:40 +0200 Subject: Remove options, improve functions --- src/asm_pass1.py | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/asm_pass1.py') diff --git a/src/asm_pass1.py b/src/asm_pass1.py index 5e6213a..0b06738 100644 --- a/src/asm_pass1.py +++ b/src/asm_pass1.py @@ -16,23 +16,15 @@ class Result1Line: @dataclass class Result1: lines: list[Result1Line] - options: Options operations: OpExpansionDict def pass_1(result0: Result0) -> Result1: - options = Options() result_lines: list[Result1Line] = [] operations: OpExpansionDict = default_expansions.copy() for line in result0.lines: keyword, *args = tokenize(line.line) match keyword: - case "@opt": - opt_name, opt_value = args - match opt_name: - case "stack_pointer": options.stack_pointer = opt_value - case "csr_scratch": options.csr_scratch = opt_value - case _: raise Exception("Unknown @opt: " + opt_name) case "@use": module_name, ops = args[0].split(":") ops_split = ops.split(",") @@ -52,6 +44,5 @@ def pass_1(result0: Result0) -> Result1: return Result1( operations=operations, - options=options, lines=result_lines ) -- cgit v1.3