[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
|
(define-syntax-class honu-body
|
||||||
#:literal-sets (cruft)
|
#:literal-sets (cruft)
|
||||||
[pattern (#%braces code ...)
|
[pattern (#%braces code ...)
|
||||||
#:with result #'(begin
|
#:with result #'(let ()
|
||||||
(define-syntax (parse-more stx)
|
(define-syntax (parse-more stx)
|
||||||
(do-parse stx #'parse-more))
|
(do-parse stx #'parse-more))
|
||||||
(parse-more code ...))])
|
(parse-more code ...))])
|
||||||
|
@ -414,13 +414,10 @@
|
||||||
(do-parse #'(rest ...) precedence left lookup)
|
(do-parse #'(rest ...) precedence left lookup)
|
||||||
(do-parse #'(rest ...) precedence left value))])]
|
(do-parse #'(rest ...) precedence left value))])]
|
||||||
;; block of code
|
;; block of code
|
||||||
[(#%braces stuff ...)
|
[body:honu-body
|
||||||
(if current
|
(if current
|
||||||
(values (left current) stream)
|
(values (left current) stream)
|
||||||
(let ()
|
(do-parse #'(rest ...) precedence left #'body.result))]
|
||||||
(define body (parse-all #'(stuff ...)))
|
|
||||||
(with-syntax ([body body])
|
|
||||||
(do-parse #'(rest ...) precedence left #'(let () body)))))]
|
|
||||||
;; expression or function application
|
;; expression or function application
|
||||||
[(#%parens args ...)
|
[(#%parens args ...)
|
||||||
(if current
|
(if current
|
||||||
|
|
Loading…
Reference in New Issue
Block a user