Phase 4: add structure, folding, and references

This commit is contained in:
hgranthorner
2026-08-04 14:49:03 -04:00
parent bb54639ce5
commit c4e1d92c9a
16 changed files with 826 additions and 14 deletions

View File

@@ -15,9 +15,17 @@
structs, enums, unions, control flow including the `if x == { case }` switch
form, and compiler directives. The full 714-file Jai distribution parses with
no syntax errors; `JaiCorpusParserTest` is ratcheted at 100%.
- Structure view with source-ordered declarations and nested procedure/aggregate
members.
- Folding for blocks, nested comments, and multi-line here-strings.
- Go-to-definition references for `#import` and `#load`, including project-relative
files and the local Jai module layout (`Name.jai` or `Name/module.jai`).
### Known gaps
- `#asm` bodies are parsed as opaque blocks, so their assembly instructions do
not have inner PSI.
- Structure view, folding, and go-to-definition are not implemented yet.
- `#asm` bodies remain intentionally opaque; assembly instructions do not have
inner PSI or structure entries.
- Import resolution uses the project/module roots and the local Jai installation;
custom compiler `-import_dir` arguments are not discovered yet.