[honu] add assignment operator
This commit is contained in:
parent
b110671c5c
commit
6c75b60d1b
|
@ -136,6 +136,13 @@
|
|||
[right right])
|
||||
#'(right left))))
|
||||
|
||||
(provide honu-assignment)
|
||||
(define-honu-operator/syntax honu-assignment 0.0001 'left
|
||||
(lambda (left right)
|
||||
(with-syntax ([left left]
|
||||
[right right])
|
||||
#'(set! left right))))
|
||||
|
||||
(define-binary-operator honu-+ 1 'left +)
|
||||
(define-binary-operator honu-- 1 'left -)
|
||||
(define-binary-operator honu-* 2 'left *)
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
(:~ #\")))
|
||||
(define-lex-abbrev string (:: #\" (:* string-character) #\"))
|
||||
(define-lex-abbrev operator (:or "+" "=" "*" "/" "-" "^" "||" "|" "&&" "<="
|
||||
">=" "<-" "<" ">" "!" "::"))
|
||||
">=" "<-" "<" ">" "!" "::" ":="))
|
||||
(define-lex-abbrev block-comment (:: "/*"
|
||||
(complement (:: any-string "*/" any-string))
|
||||
"*/"))
|
||||
|
|
Loading…
Reference in New Issue
Block a user