[honu] return a parsed syntax object immediately if the parser has a current expression

This commit is contained in:
Jon Rafkind 2012-11-30 01:01:30 -07:00
parent 943ac799d8
commit 67c6da058b

View File

@ -387,7 +387,9 @@
[(parsed-syntax? #'head)
(debug "Parsed syntax ~a\n" #'head)
(emit-local-step #'head #'head #:id #'do-parse)
(do-parse #'(rest ...) precedence left #'head)]
(if current
(values current stream)
(do-parse #'(rest ...) precedence left #'head))]
[(honu-fixture? #'head)
(debug 2 "Fixture ~a\n" #'head)
(define transformer (fixture:fixture-ref (syntax-local-value #'head) 0))