summaryrefslogtreecommitdiff
path: root/src/modules/ast/syntax-tree.scm
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-01-12 15:10:23 -0700
committerbd <bdunahu@operationnull.com>2025-01-12 15:10:23 -0700
commit000b28c88bbfd1fde94b5e01ce2766230077e013 (patch)
tree2da470f7fe73f4d1e6ba3cbf25db9c89aa2ff5eb /src/modules/ast/syntax-tree.scm
parent2bc7c77b7f63b1df0340112db6272dc9a78139c1 (diff)
Expansion of complex expressions into set of instructions
Diffstat (limited to 'src/modules/ast/syntax-tree.scm')
-rw-r--r--src/modules/ast/syntax-tree.scm47
1 files changed, 19 insertions, 28 deletions
diff --git a/src/modules/ast/syntax-tree.scm b/src/modules/ast/syntax-tree.scm
index b7db8dd..e2ca8da 100644
--- a/src/modules/ast/syntax-tree.scm
+++ b/src/modules/ast/syntax-tree.scm
@@ -1,34 +1,30 @@
(define-module (modules ast syntax-tree)
#:use-module (srfi srfi-9)
#:export (make-program
- program?
- program-function
+ program?
+ program-function
- make-function
- function?
- function-id
- function-stmt
+ make-function
+ function?
+ function-id
+ function-stmt
- make-stmt
- stmt?
- stmt-expr
+ make-stmt
+ stmt?
+ stmt-expr
- make-expr
- expr?
- expr-type
+ make-unary
+ unary?
+ unary-operator
+ unary-expr
- make-unary
- unary?
- unary-operator
- unary-expr
+ make-const
+ const?
+ const-int
- make-const
- const?
- const-int
-
- make-id
- id?
- id-symbol))
+ make-id
+ id?
+ id-symbol))
(define-record-type <program>
(make-program func)
@@ -46,11 +42,6 @@
stmt?
(expr stmt-expr))
-(define-record-type <expr>
- (make-expr type)
- expr?
- (type expr-type))
-
(define-record-type <unary>
(make-unary op expr)
unary?