Both [grammars.*] blocks now reference the v0.2 SHA, so a fresh
`zed: install dev extension` clones each grammar from the right
revision via its `path` subdirectory.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reorganize into grammars/<name>/ subdirs ( Zed's [grammars.*] supports
a `path` field, so both grammars ship from this repo without a sibling-
repo split ). Vendor tree-sitter-lua as the fork base for tree-sitter-
pico8-lua; upstream MIT license preserved at grammars/pico-8-lua/
UPSTREAM-LICENSE.md.
Dialect features added: != as ~= alias, \ integer divide, ^^ binary xor,
>>> / <<> / >>< shifts and rotates, compound-assignment statements,
memory peek prefixes @ % $ (% coexists with binary modulo), single-line
`if (cond) stmt [else stmt]` and `while (cond) stmt`, statement-level
print shorthand ?, and `#include path` directives. Identifier rule no
longer accepts ! ? @ $ ( upstream did ).
Pico-8 Lua language ( languages/pico-8-lua/, suffix .p8lua ) ships
highlights with the full ~110 PICO-8 builtins as @function.builtin.
The cart injection now hands __lua__ bodies to pico-8-lua, so .p8 carts
and bare .p8lua files share the dialect-aware grammar. Examples updated
to exercise the dialect end-to-end.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Zed's [grammars.*] block requires a real Git SHA — "HEAD" does not
resolve. Lock to 3f209ef so a fresh `zed: install dev extension` can
clone the grammar.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The grammar parses the .p8 cartridge container ( header, version, and
the named __lua__/__gfx__/__gff__/__label__/__map__/__sfx__/__music__
sections, plus a fallback unknown_section ). The Zed language definition
hands the __lua__ body to Zed's built-in Lua via injections.scm, so
non-dialect Lua code highlights correctly today; PICO-8-specific syntax
(?, +=, !=, single-line if, etc.) will fall back to error highlighting
in those regions only — see README roadmap for the dialect grammar fork.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>