From 9d84c5fdf7acacd726ab2c1c439888b88f34caf1 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Thu, 28 Feb 2013 18:42:04 -0500 Subject: [PATCH] add #:commit, fix other typos --- collects/syntax/parse/experimental/contract.rkt | 1 + collects/syntax/parse/experimental/provide.rkt | 4 +++- collects/syntax/parse/experimental/splicing.rkt | 1 + collects/syntax/parse/private/litconv.rkt | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/collects/syntax/parse/experimental/contract.rkt b/collects/syntax/parse/experimental/contract.rkt index e52a1139df..fe34d6b231 100644 --- a/collects/syntax/parse/experimental/contract.rkt +++ b/collects/syntax/parse/experimental/contract.rkt @@ -16,6 +16,7 @@ #:name [expr-name not-given] #:context [ctx #f]) #:attributes (c) + #:commit (pattern y:expr #:with c (wrap-expr/c ctc-stx diff --git a/collects/syntax/parse/experimental/provide.rkt b/collects/syntax/parse/experimental/provide.rkt index 772478d724..fd25e459ae 100644 --- a/collects/syntax/parse/experimental/provide.rkt +++ b/collects/syntax/parse/experimental/provide.rkt @@ -112,8 +112,9 @@ (define-syntax-class stxclass-ctc #:description "syntax-class/c or splicing-syntax-class/c form" - #:literals (syntax-class/c) + #:literals (syntax-class/c splicing-syntax-class/c) #:attributes (rec) + #:commit (pattern ((~or syntax-class/c splicing-syntax-class/c) mand:ctclist (~optional opt:ctclist)) @@ -126,6 +127,7 @@ (define-syntax-class ctclist #:attributes ([pc.c 1] [kw 1] [kwc.c 1]) + #:commit (pattern ((~or pc:expr (~seq kw:keyword kwc:expr)) ...) #:with (pc.c ...) (for/list ([pc-expr (in-list (syntax->list #'(pc ...)))]) (wrap-expr/c #'contract? pc-expr)) diff --git a/collects/syntax/parse/experimental/splicing.rkt b/collects/syntax/parse/experimental/splicing.rkt index de5f112a39..a32f68ee02 100644 --- a/collects/syntax/parse/experimental/splicing.rkt +++ b/collects/syntax/parse/experimental/splicing.rkt @@ -18,6 +18,7 @@ (define-syntax (define-primitive-splicing-syntax-class stx) (define-syntax-class attr + #:commit (pattern name:id #:with depth #'0) (pattern [name:id depth:nat])) diff --git a/collects/syntax/parse/private/litconv.rkt b/collects/syntax/parse/private/litconv.rkt index 0b84d52f46..69edc6634d 100644 --- a/collects/syntax/parse/private/litconv.rkt +++ b/collects/syntax/parse/private/litconv.rkt @@ -30,6 +30,7 @@ (define-syntax-class header #:description "name or name with formal parameters" + #:commit (pattern name:id #:with formals #'() #:attr arity (arity 0 0 null null))