diff options
Diffstat (limited to 'src/modules/ast/assembly-tree.scm')
-rw-r--r-- | src/modules/ast/assembly-tree.scm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/modules/ast/assembly-tree.scm b/src/modules/ast/assembly-tree.scm new file mode 100644 index 0000000..ee3e116 --- /dev/null +++ b/src/modules/ast/assembly-tree.scm @@ -0,0 +1,25 @@ +(define-module (modules ast assembly-tree) + #:use-module (srfi srfi-9) + #:export (make-subroutine + subroutine? + subroutine-label + subroutine-instructions + + make-instruction + instruction? + instruction-operator + instruction-operand-1 + instruction-operand-2)) + +(define-record-type <subroutine> + (make-subroutine label instrs) + subroutine? + (label subroutine-label) + (instrs subroutine-instructions)) + +(define-record-type <instruction> + (make-instruction op oper1 oper2) + instruction? + (op instruction-operator) + (oper1 instruction-operand-1) + (oper2 instruction-operand-2)) |