Skip to content
Open
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
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ async-trait = "0.1.89"
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
sysinfo = "0.39.2"
indexmap = { version = "2.14.0", features = ["serde"] }
tree-sitter-svelte-next = "0.1.1"

[dev-dependencies]
criterion = { version = "0.8.2", features = ["html_reports"] }
Expand Down
66 changes: 66 additions & 0 deletions contributing/parsers/svelte/AUDIT_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Svelte Parser Symbol Extraction Coverage Report

*Generated: 2026-05-22 19:33:09 UTC*

## Summary
- Key nodes: 5/20 (25%)
- Symbol kinds extracted: 4

> **Note:** Svelte delegates `<script>` bodies to the JS/TS parsers; the nodes below are the Svelte-level constructs handled directly.

## Coverage Table

| Node Type | ID | Status |
|-----------|-----|--------|
| document | 52 | ⚠️ gap |
| script_element | 56 | ✅ implemented |
| style_element | - | ❌ not found |
| start_tag | 58 | ⚠️ gap |
| end_tag | 62 | ⚠️ gap |
| raw_text | 47 | ✅ implemented |
| attribute | 64 | ⚠️ gap |
| attribute_name | 9 | ⚠️ gap |
| quoted_attribute_value | 65 | ⚠️ gap |
| element | 55 | ⚠️ gap |
| expression_tag | 107 | ⚠️ gap |
| render_tag | 114 | ⚠️ gap |
| snippet_statement | 100 | ✅ implemented |
| snippet_start | 102 | ✅ implemented |
| snippet_name | 32 | ✅ implemented |
| if_statement | 68 | ⚠️ gap |
| each_statement | 79 | ⚠️ gap |
| await_statement | - | ❌ not found |
| key_statement | - | ❌ not found |
| comment | 48 | ⚠️ gap |

## Legend

- ✅ **implemented**: Node type is recognized and handled by the parser
- ⚠️ **gap**: Node type exists in the grammar but not handled by parser (needs implementation)
- ❌ **not found**: Node type not present in the example file (may need better examples)

## Recommended Actions

### Priority 1: Implementation Gaps
These nodes exist in your code but aren't being captured:

- `document`: Add parsing logic in parser.rs
- `start_tag`: Add parsing logic in parser.rs
- `end_tag`: Add parsing logic in parser.rs
- `attribute`: Add parsing logic in parser.rs
- `attribute_name`: Add parsing logic in parser.rs
- `quoted_attribute_value`: Add parsing logic in parser.rs
- `element`: Add parsing logic in parser.rs
- `expression_tag`: Add parsing logic in parser.rs
- `render_tag`: Add parsing logic in parser.rs
- `if_statement`: Add parsing logic in parser.rs
- `each_statement`: Add parsing logic in parser.rs
- `comment`: Add parsing logic in parser.rs

### Priority 2: Missing Examples
These nodes aren't in the comprehensive example. Consider:

- `style_element`: Add example to comprehensive.svelte or verify node name
- `await_statement`: Add example to comprehensive.svelte or verify node name
- `key_statement`: Add example to comprehensive.svelte or verify node name

99 changes: 99 additions & 0 deletions contributing/parsers/svelte/GRAMMAR_ANALYSIS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Svelte Grammar Analysis

*Generated: 2026-05-22 19:33:09 UTC*

## Statistics
- Total nodes in grammar JSON: 54
- Nodes found in comprehensive.svelte: 53
- Nodes handled by parser: 5
- Symbol kinds extracted: 4

## Successfully Handled Nodes
These nodes are in examples and handled by parser:
- raw_text
- script_element
- snippet_name
- snippet_start
- snippet_statement

## Implementation Gaps
These nodes appear in comprehensive.svelte but aren't handled:
- "
- #
- (
- )
- /
- />
- :
- <
- </
- =
- >
- @
- as
- attribute
- attribute_name
- attribute_value
- block_end_tag
- block_start_tag
- block_tag
- comment
- document
- each
- each_end
- each_start
- each_statement
- element
- else
- else_block
- else_start
- end_tag
- expression
- expression_tag
- if
- if_end
- if_start
- if_statement
- quoted_attribute_value
- render
- render_tag
- self_closing_tag
- snippet
- snippet_end
- start_tag
- svelte_raw_text
- tag_name
- text
- {
- }

## Missing from Examples
These grammar nodes aren't in comprehensive.svelte:
- _node
- await_end
- await_start
- await_statement
- catch_block
- catch_start
- const_tag
- debug_tag
- doctype
- else_if_block
- else_if_start
- entity
- erroneous_end_tag
- erroneous_end_tag_name
- html_tag
- key_end
- key_start
- key_statement
- style_element
- then_block
- then_start

## Symbol Kinds Extracted
- Constant
- Function
- Interface
- Variable

Loading