improve code comments

pull/10/head
Matthew Butterick 7 years ago
parent 711fa643bf
commit cf505f2995

@ -187,7 +187,7 @@ This would be the place to check a syntax property for hiding.
;; each `component-list` is a list that's either empty, or has a single component-stx object ;; each `component-list` is a list that's either empty, or has a single component-stx object
;; inside `component-stx` is a name followed by subcomponents ;; inside `component-stx` is a name followed by subcomponents
(for*/list ([component-list (in-list component-lists)] (for*/list ([component-list (in-list component-lists)]
[component-stx (in-list component-list)]) ; this has the effect of omitting empty component-lists [component-stx (in-list component-list)]) ; this has the effect of omitting any empty `component-list`
(list (list
(cond (cond
[(eq? (syntax-property component-stx 'hide-or-splice) 'hide) [(eq? (syntax-property component-stx 'hide-or-splice) 'hide)

@ -96,7 +96,7 @@
#f) #f)
$2))] $2))]
[(RULE_HEAD_HIDDEN pattern) ; bang indicates hiding [(RULE_HEAD_HIDDEN pattern) ; slash indicates hiding
(begin (begin
(define trimmed (cadr (regexp-match (pregexp (format "~a(\\S+)\\s*:$" hide-char)) $1))) (define trimmed (cadr (regexp-match (pregexp (format "~a(\\S+)\\s*:$" hide-char)) $1)))
(rule (position->pos $1-start-pos) (rule (position->pos $1-start-pos)
@ -111,7 +111,7 @@
''hide) ; symbol needs to be double quoted in this case ''hide) ; symbol needs to be double quoted in this case
$2))] $2))]
[(RULE_HEAD_SPLICED pattern) ;atsign indicates splicinh [(RULE_HEAD_SPLICED pattern) ; atsign indicates splicing
(begin (begin
(define trimmed (cadr (regexp-match (pregexp (format "~a(\\S+)\\s*:$" splice-char)) $1))) (define trimmed (cadr (regexp-match (pregexp (format "~a(\\S+)\\s*:$" splice-char)) $1)))
(rule (position->pos $1-start-pos) (rule (position->pos $1-start-pos)

Loading…
Cancel
Save