syntactic_ast: Modified letrec forms to also accept a body
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:
@@ -29,7 +29,7 @@ type _ t =
|
||||
|
||||
| LetBinding : symbol * expression t -> binding t
|
||||
| Let : binding t list * body t -> expression t
|
||||
| LetRec : binding t list * expression t list -> expression t
|
||||
| LetRec : binding t list * body t -> expression t
|
||||
|
||||
| CondClause : expression t * expression t -> clause t
|
||||
| Cond : clause t list -> expression t
|
||||
@@ -224,6 +224,17 @@ and print_expr = function
|
||||
(String.concat "\n" (map print_let_binding binds))
|
||||
(print_defs defs)
|
||||
(print_exprs exprs)
|
||||
| LetRec (binds, Body (defs, exprs)) ->
|
||||
pf "(letrec
|
||||
; BINDINGS
|
||||
%s
|
||||
; BODY
|
||||
%s
|
||||
; EXPRESSIONS
|
||||
%s)"
|
||||
(String.concat "\n" (map print_let_binding binds))
|
||||
(print_defs defs)
|
||||
(print_exprs exprs)
|
||||
| Var s -> s
|
||||
| Apply (f, exprs) ->
|
||||
pf "(apply %s %s)"
|
||||
|
||||
Reference in New Issue
Block a user