1.9 Unwindable State
Get or update the current syntax-parse
state. Updates to the
state are unwound when syntax-parse
backtracks. Keys are
compared using eq?
The state can be updated only within ~do patterns (or
#:do blocks). In addition, syntax-parse
automatically adds identifiers that match literals (from
~literal patterns and literals declared with
#:literals, but not from ~datum or
#:datum-literals) under the key 'literals.
'(#<syntax:eval:2:0 else> #<syntax:eval:2:0 =>>)
Added in version 18.104.22.168 of package base.
Add a 'disappeared-use syntax property
containing the information stored in the current
state under the key 'literals
already has a 'disappeared-use
added information is cons
ed onto the property’s current value.
Due to the way syntax-parse automatically adds identifiers that match
literals to the state under the key 'literals, as described in the
documentation for syntax-parse-state-ref,
syntax-parse-track-literals can be used to automatically add any
identifiers used as literals to the 'disappeared-use property.
If syntax-parse-track-literals is called within the dynamic
extent of a syntax transformer (see
syntax-transforming?), introduce? is not #f, and the
value in the current syntax-parse state under the key
'literals is a list, then syntax-local-introduce is applied to
any identifiers in the list before they are added to stx’s
Most of the time, it is unnecessary to call this function directly. Instead, the
#:track-literals option should be provided to syntax-parse,
which will automatically call syntax-parse-track-literals on
'(#<syntax:eval:4:0 else> #<syntax:eval:4:0 =>>)
Added in version 22.214.171.124 of package base.