Tracking bound syntax pattern variables with syntax-parse
Go to file
2019-04-24 20:57:37 +02:00
case Included upstream changes until a2ab778ddbb86f4ff890f3a8391873a44fcef3d4 (included) 2018-06-11 22:17:43 +02:00
parse Included upstream changes until 55dcdf553878f475fc4c59ba83556482d11499c9 (included) 2019-04-24 20:57:37 +02:00
scribblings Included upstream changes until 55dcdf553878f475fc4c59ba83556482d11499c9 (included) 2019-04-24 20:57:37 +02: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 Updated Racket versions in .travis.yml 2019-04-22 23:22:23 +02: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
generate-dispatch-6-11--6-12.sh Made generate-dispatch script more generic 2018-06-03 13:40:35 +02:00
info.rkt Merge Racket ≤ 6.11 and Racket ≥ 6.12, using version-case (part 3: add dispatch files which include the 6.11 or 6.12 files) 2018-03-26 08:56:15 +02:00
LICENSE Imported files from 28f1df4cff 2017-01-28 05:16:11 +01:00
LICENSE.txt Added package files 2017-01-28 05:16:16 +01: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 Removed spurious display during build 2018-03-26 19:54:51 +02:00
parse.rkt Included upstream changes until 55dcdf553878f475fc4c59ba83556482d11499c9 (included) 2019-04-24 20:57:37 +02:00
parse.rkt-7-3-0-1 Included upstream changes until 55dcdf553878f475fc4c59ba83556482d11499c9 (included) 2019-04-24 20:57:37 +02:00
parse.rkt-7-0-0-20 Included upstream changes until 55dcdf553878f475fc4c59ba83556482d11499c9 (included) 2019-04-24 20:57:37 +02: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.