File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -321,8 +321,9 @@ capture name to a field of the same name on the output node.
321321A YEAST desugaring pass is configured with a [ ` DesugaringConfig ` ] , which
322322carries one or more named [ ` Phase ` ] s of rules and an optional output
323323node-types schema (in YAML format). Each phase is a complete traversal
324- that runs to completion before the next phase starts; rules in different
325- phases never compete for matches. Attach the config to a language spec
324+ that runs to completion before the next phase starts; only the current
325+ phase's rules are considered during that traversal. Attach the config to
326+ a language spec
326327to enable rewriting:
327328
328329``` rust
@@ -349,5 +350,5 @@ is converted to JSON internally).
349350
350351For the dbscheme/QL code generator, set ` Language::desugar ` to a
351352` DesugaringConfig ` carrying the same YAML; the generator converts it to
352- JSON for downstream code generation. The ` rules ` field of the config is
353+ JSON for downstream code generation. The ` phases ` field of the config is
353354unused at code-generation time.
Original file line number Diff line number Diff line change @@ -638,7 +638,8 @@ fn apply_rules_inner(
638638/// One phase of a desugaring pass: a named bundle of rules that runs to
639639/// completion (a full traversal applying its rules) before the next phase
640640/// starts. Rules within a phase compete for matches as usual; rules in
641- /// different phases never compete because they don't see each other's input.
641+ /// different phases never compete because each traversal only considers the
642+ /// current phase's rules.
642643pub struct Phase {
643644 /// Name used in error messages.
644645 pub name : String ,
You can’t perform that action at this time.
0 commit comments