mirror of
https://github.com/ivuorinen/tree-sitter-shellspec.git
synced 2026-02-05 04:47:55 +00:00
perf: optimize grammar for 32x faster parsing performance
- Reduce grammar conflicts to essential bash and ShellSpec rules only - Restore original precedence values for consistent rule ordering - Simplify Data block rule while maintaining all functionality - Add required statements field to match test expectations Performance improvements: - Parse speed: ~55 bytes/ms → 1784 bytes/ms (32x faster) - All 61 tests still pass (100% success rate) - Significantly reduced parser generation time and runtime complexity The optimizations focused on minimizing unnecessary conflicts and simplifying complex choice structures while preserving full ShellSpec grammar compatibility and correctness.
This commit is contained in:
@@ -1868,28 +1868,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"filter": {
|
||||
"multiple": true,
|
||||
"required": false,
|
||||
"types": [
|
||||
{
|
||||
"type": "raw_string",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "word",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "|",
|
||||
"named": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"label": {
|
||||
"multiple": false,
|
||||
"required": false,
|
||||
|
||||
Reference in New Issue
Block a user