hgranthorner b8e55fcd50 Parser: corpus parse rate 81% -> 90%
A bare procedure *type* parameter such as 'proc: (info: *Info, data: T)' has no
arrow, directive or body after the parentheses, so isProcHeaderAhead now accepts
any parenthesised group that contains a ':' or '$' at depth 1.

Also: compound-assignment operator overloads, 'for <=REVERSE *=BY_POINTER',
backticked loop variables and returns, 'cast(T, value)', postfix 'x.(T)' casts,
'{}' as the zero value, '#asm AVX, AVX2 { … }', 'push_context,defer_pop', and
'#string,\%' here-strings (used in how_to/018_print_functions.jai, which the
shipped Jai_Lexer module itself rejects).

A directive prefixing a declaration no longer takes a bare operand: '#add_context
deep_copy_depth: int;' had the directive eating the declared name.

Ratchet raised to 640/714.
2026-08-04 12:24:02 -04:00
2026-08-04 10:12:15 -04:00
2026-08-04 10:12:15 -04:00
2026-08-04 10:12:15 -04:00
2026-08-04 12:24:02 -04:00
2026-08-04 10:12:15 -04:00
2026-08-04 10:12:15 -04:00
2026-08-04 10:12:15 -04:00
2026-08-04 10:12:15 -04:00
2026-08-04 10:12:15 -04:00
2026-08-04 10:12:15 -04:00
2026-08-04 10:12:15 -04:00

Jai plugin for IntelliJ IDEA

Support for the Jai programming language. Everything here is derived from the local Jai distribution at ~/.local/jai, never from online material (see AGENTS.md).

What works today

  • .jai file type with its own icon
  • Syntax highlighting: keywords, built-in type names, compiler directives (#import, #run, …), notes (@Cleanup), numbers (hex / binary / hexfloat / _ separators), strings, here-strings (#string DONE … DONE), nesting block comments, operators, ---, $/$$, it / it_index
  • Colour settings page (Settings → Editor → Color Scheme → Jai)
  • Comment / uncomment (// and nesting /* */)
  • Brace matching, including the Jai-only .{ struct-literal and .[ array-literal openers

Not yet: parser and PSI, so no structure view, go-to-definition, completion, formatting, or inspections. See docs/BUILD_PLAN.md for the phase plan.

Install it locally

./jaigradle buildPlugin
# -> build/distributions/intellijai-1.0.0-SNAPSHOT.zip

In the IDE: Settings → Plugins → ⚙ → Install Plugin from Disk…, pick that ZIP, restart when prompted. Requires build 253 (2025.3) or newer; verified compatible with IU-253, IU-261 and IU-262 by the JetBrains Plugin Verifier.

To try it, open any file from ~/.local/jai/how_to/.

Uninstall or update the same way — installing a new ZIP over the old one replaces it.

Develop

./jaigradle test     # or ./jaitest, which reports the JUnit XML
./jaigradle check    # full verification

Never call ./gradlew directly: there is no JDK on PATH, and ./jaigradle resolves one via mise first. Read AGENTS.md before changing anything.

Key docs:

File What it is
AGENTS.md how to work in this repo; current state
docs/JAI_LANGUAGE_REFERENCE.md the language, transcribed from the compiler
docs/BUILD_PLAN.md phased plan and testing strategy

Local IntelliJ references are available in ~/programming/thirdparty:

  • fortran-plugin — a simple language plugin to use as reference.
  • intellij-elixir — a more complex plugin to use as reference.
  • intellij-sdk-docs — local versions of the IntelliJ SDK documentation.
Description
A Jai plugin for Intellij.
Readme 342 KiB
Languages
Kotlin 97.3%
Shell 2.7%