Tracking bound syntax pattern variables with syntax-parse
Go to file
Georges Dupéron 377884f5e8 bug: propagation-tamper-accessor: contract violation
expected: propagation-tamper?
  given: (list (parsed-app #f ...))
  compilation context...:
   /home/georges/phc/racket-packages/stxparse-info/case/stxloc.rkt
   /home/georges/phc/racket-packages/stxparse-info/case/bug.rkt
  context...:
   syntax-disarm4
   loop
   [repeats 1 more time]
   for-loop
   finish-bodys
   for-loop
   finish-bodys
   for-loop
   finish-bodys
   for-loop
   finish-bodys
   lambda-clause-expander
   loop
   expand+eval-for-syntaxes-binding74
   finish
   [repeats 2 more times]
   ...
2018-03-11 14:54:08 +01:00
case bug: propagation-tamper-accessor: contract violation 2018-03-11 14:54:08 +01:00
parse Partial inclusion of upstream changes, to avoid a compilation error. 2017-09-01 13:55:02 +02:00
scribblings Tweak title to include mentions of syntax-parse and syntax-case. 2017-12-21 23:25:27 +01:00
test bug: propagation-tamper-accessor: contract violation 2018-03-11 14:54:08 +01:00
.gitignore Added package files 2017-01-28 05:16:16 +01:00
.travis.yml Don't building versions > 6.11, they need another version of this library (in branch racket-6.12) 2018-01-18 19:01:40 +01: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 bug: propagation-tamper-accessor: contract violation 2018-03-11 14:54:08 +01:00
info.rkt Tweak title to include mentions of syntax-parse and syntax-case. 2017-12-21 23:25:27 +01: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
parse.rkt Failed attempt at making metafunctions from syntax/parse/experimental/template and stxparse-info/parse/experimental/template compatible. I can manage to extract the binding from syntax/parse/…, but it seems to recognize a different struct (e.g. as if they were struct instances from two different phases) 2017-01-28 05:16:50 +01: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.