Skip to content

Phase 13 (languages): code intelligence now reads 19 languages#56

Merged
RNT56 merged 4 commits into
mainfrom
feat/p13-languages
Jun 21, 2026
Merged

Phase 13 (languages): code intelligence now reads 19 languages#56
RNT56 merged 4 commits into
mainfrom
feat/p13-languages

Conversation

@RNT56

@RNT56 RNT56 commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Expands NilCore's code-intelligence AST layer from 4 languages to 19 (34 file extensions) — 15 new pure-Go heuristic backends, all additive, stdlib-only, no go.mod/cgo change.

  • Tier 1 (brace): Java · C · C++ · C#
  • Tier 2: Ruby (def/end) · PHP · Kotlin · Swift (brace)
  • Tier 3: Scala · Dart · Zig · Bash (brace) · Lua · Elixir (def/do..end) · SQL (CREATE-keyword scanner)

Each reuses the shared brace.go machinery (brace family) or mirrors ruby.go/python.go (the end-delimited family), carries a compile-time languageParser guard + inline-source tests (Symbols/References/Calls over each language's real constructs), and documents its honest heuristic limits per file (full type/template/macro/metaprogramming resolution stays the LSP's precise lens via NILCORE_LSP_COMMAND). Registration in the single parsers map auto-broadens SupportedExtensions + the live.IndexDir walk — no gate edit. The semantic (HNSW) lens was already language-agnostic.

Docs (README/ARCHITECTURE/CODE-INTELLIGENCE) + CHANGELOG updated.

Gate

make verify green · go test -race ./internal/codeintel/... green · golangci-lint run ./internal/codeintel/... 0 issues · stdlib only, go.mod/go.sum unchanged · I6 holds.

🤖 Generated with Claude Code

RNT56 and others added 4 commits June 21, 2026 03:06
Four pure-Go heuristic language backends in internal/codeintel/ast, all brace-family,
reusing the shared brace.go machinery (stripLine/braceDelta/matchHeader/pushBraceFunc/
groupBraceCalls) and mirroring js.go/rust.go:

- java.go (.java) — classes/interfaces/enums/records/@interface; methods (generics,
  throws, annotations, constructors) with enclosing-class Recv; nested classes.
- c.go (.c .h) — functions, struct/union/enum, typedef; no receivers; prototypes
  excluded; control/sizeof/return excluded from calls.
- cpp.go (.cc .cpp .cxx .hpp .hh .hxx) — class/struct/namespace; in-class + out-of-line
  Type::method (Recv = the qualifier); templates/operators/ctors-dtors; heuristic
  (full template/macro resolution stays the LSP's job).
- csharp.go (.cs) — classes/interfaces/structs/enums/records; methods + properties with
  Recv; namespaces; attributes/generics/expression-bodied tolerated.

11 extensions registered in the parsers map (the single source of truth, so
SupportedExtensions + the live.IndexDir walk auto-broaden — no gate edit needed). Each
carries a compile-time languageParser guard + inline-source tests (Symbols/Refs/Calls,
incl. C++ Type::method, Java generics, C# properties, C typedef). Honest heuristic
limits documented per file. make verify green; -race green; golangci-lint 0; stdlib only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n, Swift

- php.go (.php) — functions/class/interface/trait/enum + methods (Recv), namespaces;
  strips <?php tags + # comments; $obj->method / Class::method calls. (brace family)
- kotlin.go (.kt .kts) — fun (top-level + member + extension `fun Foo.bar`), class/
  interface/object/data/sealed, companion object; annotations + expr bodies. (brace)
- swift.go (.swift) — func/class/struct/enum/protocol/extension/actor, init; attributes
  + generics + arg labels tolerated. (brace)
- ruby.go (.rb) — NON-brace def/class/module + `end` nesting scanner (mirrors python.go);
  `def self.name` singletons + module nesting resolve Recv; unambiguous call forms only.

5 extensions registered (parsers map → SupportedExtensions + live walk auto-broaden).
Inline-source tests per backend; compile-time languageParser guards; honest heuristic
limits documented (metaprogramming/dynamic dispatch stays the LSP lens). make verify
green; -race green; golangci-lint 0; stdlib only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…, Bash, Lua, Elixir, SQL

- scala.go (.scala .sc), dart.go (.dart), zig.go (.zig), bash.go (.sh .bash) — brace family
  (reuse brace.go). zig handles the `const NAME = struct {}` container idiom; bash builds an
  intra-file call graph (only calls to file-defined functions).
- lua.go (.lua), elixir.go (.ex .exs) — NON-brace function/do..end scanners (mirror ruby.go):
  lua `Tbl.method`/`Tbl:method` receivers; elixir defmodule + def/defp/defmacro with module Recv.
- sql.go (.sql) — CREATE-keyword scanner: TABLE/VIEW/MATVIEW/TRIGGER/INDEX/TYPE/SCHEMA -> type,
  FUNCTION/PROCEDURE -> func; intra-file routine call graph.

10 extensions registered; dispatch_test updated. Inline-source tests + languageParser guards;
honest heuristic limits documented per file (optional-braces/metaprogramming/macros = LSP lens).
make verify green; -race green; golangci-lint 0; stdlib only, no go.mod/cgo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ions

README + ARCHITECTURE + CODE-INTELLIGENCE updated from "Go·Python·TS/JS·Rust" to the
full set (Go, Python, TS/JS, Rust, Java, C, C++, C#, Ruby, PHP, Kotlin, Swift, Scala,
Dart, Zig, Bash, Lua, Elixir, SQL); CHANGELOG [Unreleased] gains the P13-languages entry.
Historical wave records (D3/R2 row, the [1.0.0] section) left intact (append-only).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@RNT56 RNT56 merged commit 23348d7 into main Jun 21, 2026
@RNT56 RNT56 deleted the feat/p13-languages branch June 21, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant