Skip to content

Commit e0d663f

Browse files
Copilottausbn
andauthored
yeast: address review wording in phase docs
Agent-Logs-Url: https://github.com/github/codeql/sessions/6d23db05-a6e9-4de4-8951-b465980fd0ef Co-authored-by: tausbn <1104778+tausbn@users.noreply.github.com>
1 parent 957c89b commit e0d663f

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

shared/yeast/doc/yeast.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,9 @@ capture name to a field of the same name on the output node.
321321
A YEAST desugaring pass is configured with a [`DesugaringConfig`], which
322322
carries one or more named [`Phase`]s of rules and an optional output
323323
node-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
326327
to enable rewriting:
327328

328329
```rust
@@ -349,5 +350,5 @@ is converted to JSON internally).
349350

350351
For 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
353354
unused at code-generation time.

shared/yeast/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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.
642643
pub struct Phase {
643644
/// Name used in error messages.
644645
pub name: String,

0 commit comments

Comments
 (0)