Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/v2/02_parse.dag
Original file line number Diff line number Diff line change
Expand Up @@ -706,8 +706,8 @@ fn parser_helper_state_arg_expr(call_node: Node, source_indices: Map<String, New
let idx = pair.first
let arg_node = pair.second
let matches_state = match arg_name_at(n: arg_node, source_indices: source_indices) {
Some { value: name } => name == "state"
None => idx == 1
Some { value: name } => name == "state" || name == "tokens"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invariant violation: parser_helper_state_arg_expr now identifies the carried token list by the names "state"/"tokens" and by positional fallback idx == 0, which violates Heuristics indicate lost structure and Minimal information per interface.

None => idx == 0
}
if matches_state {
Some { value: arg_value(n: arg_node) }
Expand Down
Loading
Loading