17 Commits

Author SHA1 Message Date
hgranthorner
c6b30e32d6 Add unresolved import and load inspection 2026-08-06 16:18:34 -04:00
hgranthorner
0658550d09 Serialize Gradle and test runs 2026-08-06 13:07:31 -04:00
hgranthorner
427269ad78 Implement Jai formatter 2026-08-06 11:10:07 -04:00
hgranthorner
98e25c5468 improved completion 2026-08-05 16:32:40 -04:00
hgranthorner
ede8522716 Document completion scope and gaps 2026-08-05 10:43:30 -04:00
hgranthorner
2bc1b9f4be Phase 5a: add configurable Jai module roots 2026-08-05 10:24:32 -04:00
hgranthorner
9122b5a5c0 Document configurable module roots as next phase 2026-08-04 16:01:59 -04:00
hgranthorner
460fc969db Phase 5: add rename and find usages 2026-08-04 15:54:31 -04:00
hgranthorner
4758bf12e2 Phase 5: add completion and symbol navigation 2026-08-04 15:25:11 -04:00
hgranthorner
c4e1d92c9a Phase 4: add structure, folding, and references 2026-08-04 14:49:03 -04:00
hgranthorner
bb54639ce5 Parser: cover full Jai corpus 2026-08-04 13:44:59 -04:00
hgranthorner
b14d285b5e Assert the PSI wiring the ParserDefinition unblocked
JaiFileTypeTest could previously only check the virtual file's type, because
without a ParserDefinition the PSI file fell back to plain text. It now asserts
the PSI file is a JaiFile in the Jai language and that JaiParserDefinition is the
registered definition - the wiring every PSI-dependent feature needs.

Also records the in-memory-fixture flake ('Cannot create child file at /src') as
infrastructure, with the note that JaiCorpusParserTest sidesteps it by using
PsiFileFactory directly.
2026-08-04 12:51:22 -04:00
hgranthorner
e1fced9bdf Update AGENTS.md and the plan for phase 3
Records the parser design facts a future agent needs before touching Jai.bnf:
the token-factory requirement, what lives in JaiParserUtil and why, the PSI
element that truncates an enclosing expression, longest-first operator ordering,
and directive-flag adjacency. Adds the stale-output symptoms and the sticky
--tests filter to the environment gotchas, and writes down the grammar
iteration loop.

Phase 3 is marked done; the remaining 58 corpus files are listed as the pick-up
point with the three known gaps named.
2026-08-04 12:50:12 -04:00
hgranthorner
37809b8aa7 Phase 3: Grammar-Kit parser, PSI and ParserDefinition
Adds src/main/grammar/Jai.bnf, the generated parser/PSI in src/main/gen, a
JaiParserDefinition, and the Tier 3 corpus parse gate (406/714 files clean).

Two things were not obvious:

- Grammar-Kit mints its own token instances from the .bnf 'tokens' block, which
  are different objects from the ones JaiLexer emits, so every rule silently
  failed to match. Fixed with tokenTypeFactory -> JaiTokenTypes.byName.
- A backslash inside an identifier is a continuation in the compiler's lexer
  (Jai_Lexer/module.jai:444): 'left\_margin' is one identifier. JaiLexer now
  does the same; the Tier 0 round-trip still holds because the token span
  covers the backslash and the skipped spaces.

Constructs that BNF alone cannot express live in JaiParserUtil: directive-name
tests (#ident is one token), '==' before '{' for the switch form, procedure
header vs parenthesised expression, and the declaration lookahead.
2026-08-04 12:05:42 -04:00
hgranthorner
746647d27d Build an installable plugin ZIP: real README/CHANGELOG, cache-poisoning recovery
- README documents install-from-disk and what actually works today
- jaitest prints the recovery steps when a poisoned build cache makes
  :test report NO-SOURCE, and AGENTS.md records the failure mode
2026-08-04 10:42:10 -04:00
hgranthorner
f52b8c5899 Update AGENTS.md for phases 0-2: verified state, lexer design facts, gotchas 2026-08-04 10:35:48 -04:00
hgranthorner
cb5a1d9555 initial commit 2026-08-04 10:12:15 -04:00