You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package MINOR bump reflects a third language and a new runtime dependency
(tree-sitter-go); no previously emitted number changed, so the spec bump is a
MINOR too (1.1.0 -> 1.2.0).
Go language support (spec 1.2.0)
Go is the third language, and the first added since the extension seam was
tightened. It is confined to the languages/ package: languages/go.py plus
its registry entry, no edit to the metric engines, readability, model, API,
CLI or grammar loader. Nine new rulings (CC-GO-0001..0005, COG-GO-0001,
TOK-GO-0001, BW-GO-0001, BW-GO-0002); every other rule is a reused -ALL-
ruling. Spec bumped 1.1.0 -> 1.2.0 (MINOR: additive, no existing corpus value
changed).
Notable Go-specific rulings: for is the only loop keyword and covers every
loop form; select communication cases are a distinct cyclomatic ruling from
switch cases; labeled break/continue and goto are a fundamental cognitive
+1 in both modes; true/false/nil/iota are predeclared IDENTIFIERS, not
keywords (a spec-faithful divergence from Java's BW keyword set).
Cross-checked against lizard (the Go cyclomatic oracle), which concurs on
every Go probe. Eight hand-computed corpus cases. docs/adding-a-language.md
documents the whole procedure with Go as the worked example.
A new language is now confined to the languages/ package
No emitted number changed: this is a plumbing refactor, and the spec-drift
gate proves every corpus value is untouched.
Two duplications of the language set that used to sit outside languages/
were folded back in. syntax/grammars.py no longer keeps a _GRAMMAR_MODULES
dict; load(language_name, module) takes the tree-sitter package name from
the adapter, which now carries it as LanguageAdapter.grammar_module. cli.py
no longer hardcodes --lang choices; it derives them from the registry via available_languages(). Adding a language therefore touches only a new adapter
module and the registry in languages/__init__.py; the CLI and the grammar
loader need no edit. (Internal API: grammars.load gained a required module
argument.)