[honu] define parsing macro in the transformer phase. also provide a bunch of things from main
This commit is contained in:
parent
70589a7033
commit
23cbc505cc
|
@ -3,10 +3,14 @@
|
||||||
(require "private/honu-typed-scheme.rkt"
|
(require "private/honu-typed-scheme.rkt"
|
||||||
"private/honu2.rkt"
|
"private/honu2.rkt"
|
||||||
"private/macro2.rkt"
|
"private/macro2.rkt"
|
||||||
(for-syntax (only-in "private/macro2.rkt" honu-syntax))
|
(for-syntax "private/honu2.rkt")
|
||||||
|
(for-syntax (only-in "private/macro2.rkt" honu-syntax mergeSyntax))
|
||||||
"private/class.rkt"
|
"private/class.rkt"
|
||||||
|
(for-meta 2 (prefix-in racket: racket/base))
|
||||||
|
(for-syntax (prefix-in racket: racket/base))
|
||||||
(for-syntax (prefix-in class: syntax/parse))
|
(for-syntax (prefix-in class: syntax/parse))
|
||||||
(for-syntax (only-in "private/parse2.rkt" honu-expression honu-identifier))
|
(for-syntax (only-in "private/parse2.rkt" honu-expression honu-identifier))
|
||||||
|
(for-syntax (prefix-in literal: "private/literals.rkt"))
|
||||||
(prefix-in literal: "private/literals.rkt"))
|
(prefix-in literal: "private/literals.rkt"))
|
||||||
|
|
||||||
(provide #%top
|
(provide #%top
|
||||||
|
@ -14,7 +18,16 @@
|
||||||
print printf true false
|
print printf true false
|
||||||
(for-syntax (rename-out [honu-expression expression]
|
(for-syntax (rename-out [honu-expression expression]
|
||||||
[honu-identifier identifier]
|
[honu-identifier identifier]
|
||||||
[honu-syntax syntax]))
|
[honu-function function]
|
||||||
|
[literal:#%parens #%parens]
|
||||||
|
[literal:#%braces #%braces]
|
||||||
|
[literal:#%brackets #%brackets]
|
||||||
|
[literal:honu-comma %comma]
|
||||||
|
[honu--> %arrow]
|
||||||
|
[honu-syntax syntax])
|
||||||
|
(rename-out [racket:#%datum #%datum])
|
||||||
|
withSyntax
|
||||||
|
mergeSyntax)
|
||||||
(rename-out [#%dynamic-honu-module-begin #%module-begin]
|
(rename-out [#%dynamic-honu-module-begin #%module-begin]
|
||||||
[honu-top-interaction #%top-interaction]
|
[honu-top-interaction #%top-interaction]
|
||||||
[honu-with-input-from-file with_input_from_file]
|
[honu-with-input-from-file with_input_from_file]
|
||||||
|
@ -23,6 +36,7 @@
|
||||||
[honu-function function]
|
[honu-function function]
|
||||||
[honu-require require]
|
[honu-require require]
|
||||||
[honu-macro macro]
|
[honu-macro macro]
|
||||||
|
[define-make-honu-operator operator]
|
||||||
[honu-syntax syntax]
|
[honu-syntax syntax]
|
||||||
[honu-while while]
|
[honu-while while]
|
||||||
[honu-match match]
|
[honu-match match]
|
||||||
|
|
|
@ -8,8 +8,11 @@
|
||||||
"literals.rkt"
|
"literals.rkt"
|
||||||
"parse2.rkt"
|
"parse2.rkt"
|
||||||
"debug.rkt"
|
"debug.rkt"
|
||||||
"compile.rkt"
|
|
||||||
racket/base)
|
racket/base)
|
||||||
|
(for-meta 2 syntax/parse
|
||||||
|
racket/base
|
||||||
|
"parse2.rkt"
|
||||||
|
"compile.rkt")
|
||||||
"literals.rkt"
|
"literals.rkt"
|
||||||
#;
|
#;
|
||||||
(for-syntax "honu-typed-scheme.rkt")
|
(for-syntax "honu-typed-scheme.rkt")
|
||||||
|
@ -45,10 +48,11 @@
|
||||||
[(thing:pattern-type ...)
|
[(thing:pattern-type ...)
|
||||||
(filter (lambda (x) (syntax-e x)) (syntax->list #'(thing.result ...)))]))
|
(filter (lambda (x) (syntax-e x)) (syntax->list #'(thing.result ...)))]))
|
||||||
|
|
||||||
|
(begin-for-syntax
|
||||||
(define-syntax (parse-stuff stx)
|
(define-syntax (parse-stuff stx)
|
||||||
(syntax-parse stx
|
(syntax-parse stx
|
||||||
[(_ stuff ...)
|
[(_ stuff ...)
|
||||||
(honu->racket (parse-all #'(stuff ...)))]))
|
(honu->racket (parse-all #'(stuff ...)))])))
|
||||||
|
|
||||||
(provide honu-macro)
|
(provide honu-macro)
|
||||||
(define-honu-syntax honu-macro
|
(define-honu-syntax honu-macro
|
||||||
|
|
Loading…
Reference in New Issue
Block a user