change lhs-id key from 'hide to 'splice

pull/2/head
Matthew Butterick 9 years ago
parent f6181b90d7
commit 992fccdb1d

@ -54,7 +54,7 @@
(define generated-rule-codes (map flat-rule->yacc-rule flattened-rules))
#|
MB: `generated-rule-codes` loses the 'hide syntax property (but not for lhs-ids)
MB: `generated-rule-codes` loses the 'hide syntax property (but lhs-ids carry 'splice)
|#
#;(report generated-rule-codes)
@ -179,7 +179,7 @@
;; stx :== (name (U tokens rule-stx) ...)
;;
(define (flat-rule->yacc-rule a-flat-rule)
;; lhs-ids still carry 'hide property on #'name field
;; lhs-ids still carry 'splice property on #'name field
#;(report a-flat-rule)
(syntax-case a-flat-rule ()
[(rule-type origin name clauses ...)
@ -253,7 +253,7 @@
#`[(translated-pattern ...)
(rule-components->syntax '#,rule-name/false translated-action ...
#:srcloc #,whole-rule-loc
#:splice? #,(syntax-property rule-name/false 'hide))]))
#:splice? #,(syntax-property rule-name/false 'splice))]))

@ -12,7 +12,7 @@
(struct rule (start end lhs pattern)
#:transparent)
(struct lhs-id (start end val hide)
(struct lhs-id (start end val splice)
#:transparent)

@ -33,7 +33,7 @@
(- (pos-offset (lhs-id-end (rule-lhs a-rule)))
(pos-offset (lhs-id-start (rule-lhs a-rule))))
#f)))
'hide (lhs-id-hide (rule-lhs a-rule))))
'splice (lhs-id-splice (rule-lhs a-rule))))
(define pattern-stx (pattern->stx source (rule-pattern a-rule)))
(define line (pos-line (rule-start a-rule)))
(define column (pos-col (rule-start a-rule)))

Loading…
Cancel
Save