Skip to content

Yaml&keywords#7

Merged
bobrocke merged 15 commits intomainfrom
yaml&keywords
Feb 20, 2026
Merged

Yaml&keywords#7
bobrocke merged 15 commits intomainfrom
yaml&keywords

Conversation

@bobrocke
Copy link
Contributor

Adding YAML front matter injection and some keyword updates.

@bobrocke
Copy link
Contributor Author

I don't think this messes up the broader approach to keywords that @savetheclocktower implemented in the previous PR.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds YAML front matter support and three new keywords (echo, slot, default) to the tree-sitter-vento grammar, along with comprehensive documentation and examples.

Changes:

  • Added YAML front matter parsing with --- delimiters and language injection for syntax highlighting
  • Implemented three new keywords: echo for output expressions, slot//slot for slot definitions, and default//default for default content blocks
  • Updated grammar rules, scanner, syntax highlighting queries, and test cases to support the new features
  • Added comprehensive examples demonstrating front matter, keyword usage, and for-loop scoping
  • Added documentation files (CHANGELOG.md, RUST_FIXES.md) and updated README.md with feature descriptions

Reviewed changes

Copilot reviewed 15 out of 17 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
grammar.js Added front_matter, echo_tag, slot_block, and default_block grammar rules with proper precedence
src/grammar.json Auto-generated grammar JSON reflecting the new rules
src/scanner.c Added echo, slot, and default to KEYWORDS array for proper keyword detection
src/node-types.json Auto-generated node types including new front_matter, echo_tag, slot_block, and default_block nodes
queries/highlights.scm Comprehensive syntax highlighting rules for all keywords and front matter delimiters
queries/injections.scm Added YAML language injection for front_matter_content
test/corpus/main.txt Added test cases for front matter and new keywords with expected parse trees
test/corpus/new-keywords-test.vto Example file demonstrating new keywords (contains invalid syntax on line 75)
examples/with-frontmatter.vto Example demonstrating YAML front matter with Vento templates
examples/for-loop-scoping.vto Example showing variable scoping in for loops
examples/all-keywords.vto Comprehensive example using all supported Vento keywords
tree-sitter.json Configuration file with highlights field and formatting improvements
pnpm-lock.yaml New lockfile for dependency management
README.md Updated with features section documenting keywords and front matter support
CHANGELOG.md Documents changes for version 0.21.0 (contains discrepancies with actual PR changes)
RUST_FIXES.md Documentation of Rust binding fixes (describes changes not present in this PR)
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


### Added

- `locals.scm` query file for local scope and variable reference tracking
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The CHANGELOG mentions adding a locals.scm query file, but this file is not present in the PR and does not exist in the queries directory. Either the file should be added, or this entry should be removed from the CHANGELOG.

Copilot uses AI. Check for mistakes.
CHANGELOG.md Outdated
- **Rust bindings**: Complete rewrite of `bindings/rust/lib.rs` to properly reference Vento
- **Rust bindings**: Comprehensive rewrite of `bindings/rust/README.md` with usage examples
- Updated `Cargo.toml` metadata (version, authors format, repository URL)
- Updated `package.json` metadata (name, keywords)
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The CHANGELOG states that package.json metadata (name, keywords) was updated, but looking at the actual changes in this PR, the package.json keywords still show ["parser", "json"] instead of the claimed ["parser", "vento", "template", "tree-sitter"]. The name also remains unchanged. This discrepancy should be corrected by either making the actual changes or removing this entry from the CHANGELOG.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Copy link
Contributor

Copilot AI commented Feb 11, 2026

@bobrocke I've opened a new pull request, #8, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Feb 11, 2026

@bobrocke I've opened a new pull request, #9, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Feb 11, 2026

@bobrocke I've opened a new pull request, #10, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 7 commits February 11, 2026 00:16
Co-authored-by: bobrocke <2962426+bobrocke@users.noreply.github.com>
Co-authored-by: bobrocke <2962426+bobrocke@users.noreply.github.com>
Co-authored-by: bobrocke <2962426+bobrocke@users.noreply.github.com>
[WIP] WIP Address feedback on Yaml and keywords pull request
[WIP] Address feedback on Yaml&keywords pull request
Copy link
Contributor

Copilot AI commented Feb 11, 2026

@bobrocke I've opened a new pull request, #11, to work on those changes. Once the pull request is ready, I'll request review from you.

bobrocke and others added 2 commits February 10, 2026 19:24
[WIP] Work in progress to address feedback on Yaml and keywords implementation
Copy link
Contributor

Copilot AI commented Feb 11, 2026

@bobrocke I've opened a new pull request, #12, to work on those changes. Once the pull request is ready, I'll request review from you.

[WIP] Fix issues based on feedback for Yaml&keywords PR
@bobrocke bobrocke merged commit 93939f2 into main Feb 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants