-
Notifications
You must be signed in to change notification settings - Fork 2
Yaml&keywords #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
812851a
Fixes for highlights.scm
bobrocke 9a0f40b
Front Matter and keywords
bobrocke d0e4341
Initial plan
Copilot 1c3c794
Initial plan
Copilot e7ba6e6
Initial plan
Copilot 40e54c0
Update package.json keywords to match CHANGELOG
Copilot c0b2fbc
Remove Rust binding entries from CHANGELOG that weren't included in PR
Copilot df008b3
Update version to 0.21.0 in package.json and Cargo.toml
Copilot 10f8bee
Merge pull request #10 from ventojs/copilot/sub-pr-7-another-one
bobrocke 50900b6
Merge pull request #8 from ventojs/copilot/sub-pr-7
bobrocke 03139bb
Merge pull request #9 from ventojs/copilot/sub-pr-7-again
bobrocke 982fc92
Initial plan
Copilot af80521
Merge pull request #11 from ventojs/copilot/sub-pr-7-yet-again
bobrocke 580d258
Initial plan
Copilot 19bde4b
Merge pull request #12 from ventojs/copilot/sub-pr-7-one-more-time
bobrocke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to tree-sitter-vento will be documented in this file. | ||
|
|
||
| Version changes are relative to 0.20.0. | ||
|
|
||
| ## 0.21.0 | ||
|
|
||
| ### Added | ||
|
|
||
| - `locals.scm` query file for local scope and variable reference tracking | ||
|
||
| - Support for single-character variable names (e.g., `{{ i }}`, `{{ x }}`) | ||
| - Example file `examples/for-loop-scoping.vto` demonstrating variable scoping in loops | ||
| - Example file `examples/with-frontmatter.vto` demonstrating YAML front matter with Vento | ||
| - Example file `examples/all-keywords.vto` demonstrating all supported Vento keywords | ||
| - `tree-sitter.json` configuration file | ||
| - **Front matter support**: YAML front matter delimited by `---` with proper YAML injection | ||
| - **New keywords**: `echo`, `slot`/`/slot`, and `default`/`/default` tags | ||
| - Grammar rules: `front_matter`, `echo_tag`, `slot_block`, `slot_tag_start`, `slot_tag_end`, `default_block`, `default_tag_start`, `default_tag_end` | ||
| - Syntax highlighting for front matter delimiters and all new keywords | ||
| - Test cases for front matter and new keyword tags | ||
|
|
||
| ### Changed | ||
|
|
||
| - Modified `code_snippet` rule in `grammar.js` to make external code scanner optional | ||
| - This allows single-character variables to be parsed correctly | ||
| - Updated precedence levels for expression parsing to ensure correct keyword vs. variable resolution | ||
| - Improved external scanner to handle YAML front matter and `of` keyword detection | ||
|
|
||
| ### Fixed | ||
|
|
||
| - YAML front matter is recognized and styled with proper language injection | ||
| - Single-character loop variables (like `i` in `for i of items`) are now properly recognized as code blocks | ||
| - Variable scoping now works correctly in for loops - variables like `i` in `aria-label="Page {{ i }}"` are properly scoped within their containing for loop | ||
| - Keywords (such as `layout`, `slot`, `echo`, and `default`) are now recognized as keywords rather than variable references | ||
| - `of` in `{{ for menu of site.menu }}` is recognized as a keyword rather than a variable reference | ||
| - **Scanner**: Added `echo`, `slot`, and `default` to the KEYWORDS array for proper keyword detection | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.