Conversation
|
Caution Review failedThe pull request is closed. WalkthroughExpanded token/keyword set across highlighting, grammar, node-types, and parser: added DROP, PEEK_ALL, POP_ALL (with reorderings); updated grammar/builtin tokens and parser tables/lexer states; bumped parser symbol/token counts; minor package and dependency changes. Changes
Sequence Diagram(s)sequenceDiagram
participant Src as Source text
participant Lexer as Lexer (tokenizer)
participant Parser as Parser (parse tables)
participant AST as AST / Node types
note over Lexer,Parser #e6f2ff: Lex rules & token set updated (DROP, PEEK_ALL, POP_ALL, NEWLINE)
Src->>Lexer: scan input
alt matches new builtin token
Lexer-->>Parser: emit DROP / PEEK_ALL / POP_ALL / NEWLINE
else matches existing token
Lexer-->>Parser: emit existing token
end
Parser->>AST: map tokens via updated ts_symbol_map
AST-->>Parser: produce nodes (includes new node-types)
Parser-->>Src: parse result or recovery (tables/lex states updated)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
queries/highlights.scm(1 hunks)
🧰 Additional context used
🪛 GitHub Actions: CI
queries/highlights.scm
[error] 50-50: tree-sitter test failed: Query error in highlights.scm at line 50:4 - Invalid node type DROP.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
src/node-types.json (1)
246-273: Node type set still omitsPUSH_LITERALSince
PUSH_LITERALremains absent from the grammar, there’s no corresponding node-type entry here either. Once you add the grammar/lexer support, remember to extend this list so downstream tooling exposes the keyword properly.src/grammar.json (1)
456-482: Add thePUSH_LITERALalternative
PUSH_LITERALis still absent from the builtin choice, so grammars using that keyword won’t parse. Please add it alongsideDROP,PEEK_ALL, andPOP_ALL, and regenerate the parser afterward to keep everything in sync.src/parser.c (1)
20-86: Regenerate parser withPUSH_LITERALsupportThe regenerated parser still lacks any symbol/lexer entry for
PUSH_LITERAL, so even after updating the grammar the parser must be regenerated to emit the new token (enum, lex branches, parse tables). Once you add the keyword in the grammar, please reruntree-sitter generateso this file picks up the new symbol map and transitions.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
bun.lockbis excluded by!**/bun.lockb
📒 Files selected for processing (6)
grammar.js(1 hunks)package.json(1 hunks)queries/highlights.scm(1 hunks)src/grammar.json(2 hunks)src/node-types.json(2 hunks)src/parser.c(96 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- queries/highlights.scm
Close #1
https://github.com/pest-parser/pest/blob/d2dd16c5bf361eaaf36b4f7b9657ee48252883f3/meta/src/validator.rs#L47-L67
Summary by CodeRabbit
New Features
Bug Fixes
Chores
Documentation