Phase 13 (languages): code intelligence now reads 19 languages#56
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.def/end) · PHP · Kotlin · Swift (brace)def/do..end) · SQL (CREATE-keyword scanner)Each reuses the shared
brace.gomachinery (brace family) or mirrorsruby.go/python.go(theend-delimited family), carries a compile-timelanguageParserguard + 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 viaNILCORE_LSP_COMMAND). Registration in the singleparsersmap auto-broadensSupportedExtensions+ thelive.IndexDirwalk — no gate edit. The semantic (HNSW) lens was already language-agnostic.Docs (README/ARCHITECTURE/CODE-INTELLIGENCE) + CHANGELOG updated.
Gate
make verifygreen ·go test -race ./internal/codeintel/...green ·golangci-lint run ./internal/codeintel/...0 issues · stdlib only,go.mod/go.sumunchanged · I6 holds.🤖 Generated with Claude Code