[honu] use honu-body directly in the parser
This commit is contained in:
parent
4b4a369d84
commit
42caad96de
|
@ -184,7 +184,7 @@
|
|||
(define-syntax-class honu-body
|
||||
#:literal-sets (cruft)
|
||||
[pattern (#%braces code ...)
|
||||
#:with result #'(begin
|
||||
#:with result #'(let ()
|
||||
(define-syntax (parse-more stx)
|
||||
(do-parse stx #'parse-more))
|
||||
(parse-more code ...))])
|
||||
|
@ -414,13 +414,10 @@
|
|||
(do-parse #'(rest ...) precedence left lookup)
|
||||
(do-parse #'(rest ...) precedence left value))])]
|
||||
;; block of code
|
||||
[(#%braces stuff ...)
|
||||
(if current
|
||||
[body:honu-body
|
||||
(if current
|
||||
(values (left current) stream)
|
||||
(let ()
|
||||
(define body (parse-all #'(stuff ...)))
|
||||
(with-syntax ([body body])
|
||||
(do-parse #'(rest ...) precedence left #'(let () body)))))]
|
||||
(do-parse #'(rest ...) precedence left #'body.result))]
|
||||
;; expression or function application
|
||||
[(#%parens args ...)
|
||||
(if current
|
||||
|
|
Loading…
Reference in New Issue
Block a user