Commit e73dec39 authored by Guy Watson's avatar Guy Watson
Browse files

Replace uses of 'e' with 'expr' in order to be consistent

parent 1699e7a8
......@@ -51,7 +51,7 @@
#:prop may-be-generated #f]
[LiteralInt Expr ([v = (random 10000)])
#:prop choice-weight 3]
[Noop Expr ([e : Expr])]
[Noop Expr ([expr : Expr])]
[Binop Expr ([l : Expr] [r : Expr]) ;; use l and r here
#:prop choice-weight 30 ;; default is 10
#:prop may-be-generated #f]
......@@ -75,7 +75,7 @@
[And Binop ()]
[Or Binop ()]
[Xor Binop ()]
[Unop Expr ([e : Expr])
[Unop Expr ([expr : Expr])
#:prop choice-weight 20
#:prop may-be-generated #f]
[EqualZero Unop ()]
......@@ -93,8 +93,8 @@
#:prop choice-weight 10]
[If Expr ([cond : Expr]
[then : Expr])]
[Block Expr ([e : Expr])]
[Loop Expr ([e : Expr])]
[Block Expr ([expr : Expr])]
[Loop Expr ([expr : Expr])]
[Branch Expr ([val : Expr]
[targetnode]
[targetindex]) ;; a number depth
......@@ -197,7 +197,7 @@
'name loopvar-name
'expr branch))]
[loop (make-fresh-node 'Loop
(hash 'e loop-body))])
(hash 'expr loop-body))])
(hash 'loopvar loopvar
'loop loop))]
)
......@@ -225,14 +225,14 @@
(λ (n t)
(hash 'root (fresh-type-variable)))]]
[LiteralInt [int (no-child-types)]]
[Noop [int (λ (n t) (hash 'e int))]]
[Noop [int (λ (n t) (hash 'expr int))]]
[Binop [(fresh-type-variable int #|float|#)
(λ (n t)
(hash 'l t
'r t))]]
[Unop [(fresh-type-variable int)
(λ (n t)
(hash 'e t))]]
(hash 'expr t))]]
[IfElse [int
(λ (n t)
(hash 'cond int
......@@ -242,8 +242,8 @@
(λ (n t)
(hash 'cond int
'then int))]]
[Block [int (λ (n t) (hash 'e int))]]
[Loop [int (λ (n t) (hash 'e int))]]
[Block [int (λ (n t) (hash 'expr int))]]
[Loop [int (λ (n t) (hash 'expr int))]]
[ForLoop [int (λ (n t) (hash 'loopvar int
'loop int))]]
[Branch [int (λ (n t) (hash 'val int))]]
......@@ -377,13 +377,13 @@
[LiteralInt (λ (n) (list 'i32.const (ast-child 'v n)))]
[Noop (λ (n) (append
'(nop)
(render-node (ast-child 'e n))))]
(render-node (ast-child 'expr n))))]
[Binop (λ (n) (append
(render-node (ast-child 'l n))
(render-node (ast-child 'r n))
(list (att-value 'math-op n))))]
[Unop (λ (n) (append
(render-node (ast-child 'e n))
(render-node (ast-child 'expr n))
(list (att-value 'math-op n))))]
[IfElse (λ (n)
(append
......@@ -402,12 +402,12 @@
[Block (λ (n)
(append
'(block (result i32))
(render-node (ast-child 'e n))
(render-node (ast-child 'expr n))
'(end)))]
[Loop (λ (n)
(append
'(loop (result i32))
(render-node (ast-child 'e n))
(render-node (ast-child 'expr n))
'(end)))]
[ForLoop (λ (n)
(append
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment