syntactic_ast: fix issue in set! parsing, add set! to the test case.
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
@@ -20,7 +20,7 @@ and dbg_print_start = function
|
||||
|
||||
let def = Parser.parse_str "(define (f)
|
||||
(let ((x 5))
|
||||
(if t (+ x 1))))
|
||||
(if t (set! x (+ x 1)))))
|
||||
(define (f)
|
||||
(define (g y) (* y 2))
|
||||
(or (g 5) (g 6)))
|
||||
|
||||
@@ -204,6 +204,7 @@ and builtin_if cons =
|
||||
exp (If (test, then_branch, else_branch))
|
||||
|
||||
and builtin_set cons =
|
||||
let* cons = sexpr_cdr cons in
|
||||
let* sym = sexpr_car cons in
|
||||
let* sym = (match sym with
|
||||
| LSymbol s -> Ok s
|
||||
|
||||
Reference in New Issue
Block a user