diff --git a/collects/honu/core/main.rkt b/collects/honu/core/main.rkt index 5fe7fd0a5e..cba733b1dc 100644 --- a/collects/honu/core/main.rkt +++ b/collects/honu/core/main.rkt @@ -12,6 +12,8 @@ [honu-var var] [honu-val val] [honu-for for] + [honu-quote quote] + [honu-quasiquote quasiquote] [honu-+ +] [honu-- -] [honu-* *] [honu-/ /] [honu-^ ^] diff --git a/collects/honu/core/private/honu2.rkt b/collects/honu/core/private/honu2.rkt index ea0fb9acbe..ac15ba3eed 100644 --- a/collects/honu/core/private/honu2.rkt +++ b/collects/honu/core/private/honu2.rkt @@ -61,6 +61,20 @@ (parse #'(rest ...))) (values parsed unparsed #t)]))) +(provide honu-quote) +(define-honu-syntax honu-quote + (lambda (code context) + (syntax-parse code + [(_ expression rest ...) + (values #'(quote expression) #'(rest ...) #f)]))) + +(provide honu-quasiquote) +(define-honu-syntax honu-quasiquote + (lambda (code context) + (syntax-parse code + [(_ expression rest ...) + (values #'(quasiquote expression) #'(rest ...) #f)]))) + (define-syntax-rule (define-binary-operator name precedence operator) (begin (provide name) diff --git a/collects/honu/core/read.rkt b/collects/honu/core/read.rkt index 01b1904e20..c2131c06aa 100644 --- a/collects/honu/core/read.rkt +++ b/collects/honu/core/read.rkt @@ -65,6 +65,8 @@ ["." (token-identifier '|.|)] ["," (token-identifier '|,|)] ["!" (token-identifier '!)] + ["'" (token-identifier 'quote)] + ["`" (token-identifier 'quasiquote)] ["=" (token-identifier '=)] ["*" (token-identifier '*)] ["/" (token-identifier '/)]