c8ad7e74e7
PICO-8's shorthand `if (cond) stmt [else stmt]` is line-bounded, but tree-sitter has no built-in newline awareness. Without an external scanner ( the same mechanism tree-sitter-python uses for INDENT / DEDENT / NEWLINE ), the grammar greedily binds `else` to the nearest `if` and takes only one consequence statement for the shorthand body. Token classification is unaffected, so syntax highlighting renders identically to a correct parse; only auto-indent and semantic selection are subtly off, in a code pattern that is uncommon in real PICO-8 code. New `grammars/pico-8-lua/KNOWN_LIMITATIONS.md` walks through both incorrect cases ( the dangling-else mis-bind and the multi-statement shorthand body ), tabulates which Zed features are and aren't affected, and sketches the fix. README cross-links it from the "Known limitations" block and adds it as a prerequisite to the v0.3 LSP work. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
16 lines
466 B
Plaintext
16 lines
466 B
Plaintext
node_modules/
|
|
build/
|
|
*.wasm
|
|
|
|
# tree-sitter-cli scratch and parser-clone caches.
|
|
# tree-sitter-cli creates `grammars/<grammar_name>/` ( underscore form,
|
|
# matching the C identifier ) when it auto-clones a grammar repo for
|
|
# parser binary caching. Our hand-maintained dirs use hyphens, so the
|
|
# underscore variants are always cache.
|
|
.tree-sitter/
|
|
grammars/p8_cart/
|
|
grammars/pico8_lua/
|
|
|
|
# scratch directory for stuff to show an AI agent or reference in the IDE
|
|
.local/
|