created racket/syntax from parts of unstable/syntax
original commit: 73ab1675222761363f6633061bc1156189f4ba59
This commit is contained in:
commit
4a36940fd4
|
@ -1,5 +1,6 @@
|
|||
#lang racket/base
|
||||
(require racket/match
|
||||
(for-syntax racket/base)
|
||||
"../util/eomap.rkt"
|
||||
"stx-util.rkt"
|
||||
"deriv-util.rkt"
|
||||
|
@ -34,9 +35,16 @@
|
|||
|
||||
;; Syntax
|
||||
|
||||
(define-syntax-rule (match/count x . clauses)
|
||||
(define-syntax-rule (match/count x clause ...)
|
||||
(begin (sequence-number (add1 (sequence-number)))
|
||||
(match x . clauses)))
|
||||
(let ([v x])
|
||||
(match v
|
||||
clause ...
|
||||
[_ (error 'match "failed to match ~e at line ~s" v (line-of x))]))))
|
||||
|
||||
(define-syntax (line-of stx)
|
||||
(syntax-case stx ()
|
||||
[(line-of x) #`(quote #,(syntax-line #'x))]))
|
||||
|
||||
;; Derivations => Steps
|
||||
|
||||
|
@ -472,7 +480,10 @@
|
|||
;; Add remark step?
|
||||
]]
|
||||
[(struct local-remark (contents))
|
||||
(R [#:reductions (list (walk/talk 'remark contents))])]))
|
||||
(R [#:reductions (list (walk/talk 'remark contents))])]
|
||||
|
||||
[#f
|
||||
(R)]))
|
||||
|
||||
;; List : ListDerivation -> RST
|
||||
(define (List ld)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#lang racket/base
|
||||
(require (for-syntax racket/base
|
||||
unstable/syntax)
|
||||
racket/syntax)
|
||||
"yacc-ext.rkt")
|
||||
(provide ! ? !!
|
||||
define-production-splitter
|
||||
|
|
|
@ -117,8 +117,8 @@
|
|||
(send -text change-style clickback-style a b)))))
|
||||
|
||||
(define/public (add-syntax stx
|
||||
#:binders [binders #f]
|
||||
#:shift-table [shift-table #f]
|
||||
#:binders [binders '#hash()]
|
||||
#:shift-table [shift-table '#hash()]
|
||||
#:definites [definites #f]
|
||||
#:hi-colors [hi-colors null]
|
||||
#:hi-stxss [hi-stxss null]
|
||||
|
|
|
@ -84,9 +84,9 @@
|
|||
(show-poststep step shift-table)]))
|
||||
|
||||
(define/public (add-syntax stx
|
||||
#:binders [binders #f]
|
||||
#:binders [binders '#hash()]
|
||||
#:definites [definites #f]
|
||||
#:shift-table [shift-table #f])
|
||||
#:shift-table [shift-table '#hash()])
|
||||
(send/i sbview sb:syntax-browser<%> add-syntax stx
|
||||
#:binders binders
|
||||
#:definites definites
|
||||
|
|
Loading…
Reference in New Issue
Block a user