6-11 | ||
6-12 | ||
6-90-0-29 | ||
7-3-0-1 | ||
7-4 | ||
7-0-0-20 | ||
8-0 | ||
case | ||
parse | ||
scribblings | ||
test | ||
.gitignore | ||
.travis.yml | ||
case.rkt | ||
current-pvars.rkt | ||
info.rkt | ||
LICENSE | ||
LICENSE.txt | ||
main.rkt | ||
my-include.rkt | ||
parse.rkt | ||
README.md |
stxparse-info
The module stxparse-info/parse
is a patched version of syntax/parse
which
tracks which syntax pattern variables are bound. This allows some libraries to
change the way syntax pattern variables work.
For example, phc-graph/subtemplate
automatically derives temporary
identifiers when a template contains yᵢ …
, and xᵢ
is a pattern
variable. To know from which varᵢ
the yᵢ …
identifiers must be derived,
phc-graph/subtemplate
needs to know which syntax pattern variables are
within scope.
To use this package, simply require stxparse-info/pares
instead of
syntax/parse
Additionally, it is possible to use the for-syntax function
(current-pvars)
from stxparse-info/current-pvars
to access the list of
currently-bound pattern variables, and the macro (with-pvars (pvar ...) . body)
can be used to add new pattern variables to the list.