Tracking bound syntax pattern variables with syntax-parse
Go to file
2021-03-02 02:11:55 +00:00
6-11 Removed spurious parts of the diff 2021-03-02 02:11:55 +00:00
6-12 Fixed path 2021-03-02 01:03:19 +00:00
6-90-0-29 Fixed path 2021-03-02 01:03:19 +00:00
7-3-0-1 Fixed path 2021-03-02 01:03:19 +00:00
7-0-0-20 Fixed path 2021-03-02 01:03:19 +00:00
case Fixed path 2021-03-02 01:03:19 +00:00
parse fixed path 2021-02-28 01:34:46 +00:00
scribblings fixed includes & paths 2021-02-27 02:06:59 +00:00
test Fixed incompatibility with Racket 7 which lacks syntax-local-get-shadower 2018-03-25 20:48:14 +02:00
.gitignore Added package files 2017-01-28 05:16:16 +01:00
.travis.yml Test on more versions 2021-02-27 00:04:24 +00:00
case.rkt Modified syntax-case & friends to use with-pvars. Closes 181 current-pvars: use in syntax-case, with-syntax, define/with-syntax, is there any with-parse? 2017-01-28 05:16:48 +01:00
current-pvars.rkt Merge Racket ≤ 6.12 and Racket ≥ 7 versions using version-case 2018-03-25 23:49:32 +02:00
info.rkt Omit 6-xxx and 7-xxx paths for tests 2021-03-01 21:36:23 +00:00
LICENSE Imported files from 28f1df4cff 2017-01-28 05:16:11 +01:00
LICENSE.txt Changed my name :) 2021-02-26 23:48:26 +00:00
main.rkt Fixed docs for (define-pvars (pvar ...)), should be (define-pvars pvar ...) 2017-01-28 05:16:54 +01:00
my-include.rkt fixed includes & paths 2021-02-27 02:06:59 +00:00
parse.rkt fixed includes & paths 2021-02-27 02:06:59 +00:00
README.md Improved coverage 2017-01-28 05:17:00 +01:00

Build Status, Coverage Status, Build Stats, Online Documentation,

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.