parse assignment
This commit is contained in:
parent
a998a57000
commit
9a984fcc2b
|
@ -285,17 +285,17 @@
|
||||||
[operator operator-stuff])
|
[operator operator-stuff])
|
||||||
(make name1 name2 operator)))
|
(make name1 name2 operator)))
|
||||||
(syntax-case stx ()
|
(syntax-case stx ()
|
||||||
[(_ first last operator-stuff ...)
|
[(_ first last operator-stuff ...)
|
||||||
(with-syntax ([(name ...) (generate-temporaries #'(operator-stuff ...))])
|
(with-syntax ([(name ...) (generate-temporaries #'(operator-stuff ...))])
|
||||||
(with-syntax ([(result ...)
|
(with-syntax ([(result ...)
|
||||||
(create-stuff (cons #'first
|
(create-stuff (cons #'first
|
||||||
(append
|
(append
|
||||||
(drop-last (syntax->list #'(name ...)))
|
(drop-last (syntax->list #'(name ...)))
|
||||||
(list #'last)))
|
(list #'last)))
|
||||||
|
|
||||||
(syntax->list #'(operator-stuff ...)))])
|
(syntax->list #'(operator-stuff ...)))])
|
||||||
#'(begin
|
#'(begin
|
||||||
result ...)))]))
|
result ...)))]))
|
||||||
|
|
||||||
;; infix operators in the appropriate precedence level
|
;; infix operators in the appropriate precedence level
|
||||||
;; things defined lower in the table have a higher precedence.
|
;; things defined lower in the table have a higher precedence.
|
||||||
|
@ -350,6 +350,12 @@
|
||||||
|
|
||||||
(define-syntax-class (expression-top context)
|
(define-syntax-class (expression-top context)
|
||||||
#:literals (semicolon)
|
#:literals (semicolon)
|
||||||
|
[pattern ((~var left honu-identifier)
|
||||||
|
honu-=
|
||||||
|
(~var right (ternary context))
|
||||||
|
semicolon
|
||||||
|
. rest)
|
||||||
|
#:with result #'1]
|
||||||
[pattern ((~var x0 (debug-here (format "expression top\n")))
|
[pattern ((~var x0 (debug-here (format "expression top\n")))
|
||||||
(~var e (ternary context))
|
(~var e (ternary context))
|
||||||
(~var x1 (debug-here (format "expression top 1 ~a\n" (syntax->datum #'e))))
|
(~var x1 (debug-here (format "expression top 1 ~a\n" (syntax->datum #'e))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user