Feature
Go Language Support for Axon
Proposed Solution
The Go parser will utilize tree-sitter-go to
extract the following constructs:
- Core Symbols:
- function_declaration → FUNCTION
- method_declaration → METHOD (associated with receiver type)
- type_spec (struct) → CLASS
- type_spec (interface) → INTERFACE
- type_spec (other) → TYPE_ALIAS
- Heritage (Embedding & Implementation):
- Struct Embedding: Extract anonymous fields in structs as EXTENDS relationships (e.g., type B struct { A } → (B, "extends", "A")). Because ofcourse go supports composition instead of inheritance
- Interface Embedding: Extract embedded interfaces as EXTENDS relationships.
- Interface Implementation: While Go is implicit, we will extract explicit type references that suggest intended implementation where possible, though the core focus is structural embedding which maps directly to Axon's heritage model.
- Type References (
TypeRef):
- Extraction of parameter and return types for functions/methods to enable cross-file type-aware search and coupling analysis.
- Imports: Support for both single and grouped imports, including handling of aliases and module paths.
- Call Expressions: Extraction of standard function calls and selector expressions (method calls).
- Exported Symbols: Automatic identification of public symbols based on Go's casing rules (Uppercase = Exported).
Scope
This would touch codebases related to parsers module, ingestion, add test cases as well. This new tree-sitter-go will be added to toml file and hence be utilised using that.
Feature
Go Language Support for Axon
Proposed Solution
The Go parser will utilize tree-sitter-go to
extract the following constructs:
TypeRef):Scope
This would touch codebases related to parsers module, ingestion, add test cases as well. This new
tree-sitter-gowill be added to toml file and hence be utilised using that.