1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//! Go language parser implementation
//!
//! This module provides comprehensive Go language support for Codanna's code intelligence system,
//! enabling precise symbol extraction, relationship tracking, and semantic analysis of Go codebases.
//!
//! ## Overview
//!
//! The Go parser implementation uses Tree-sitter-go v0.23.4 to provide full support for modern Go
//! language features including generics (Go 1.18+), method receivers, embedded types, and Go's
//! unique package system with capitalization-based visibility.
//!
//! ## Key Features
//!
//! ### Symbol Extraction
//! - **Functions and Methods**: Complete signature extraction including receivers, parameters, and return types
//! - **Struct Types**: Field extraction, embedded struct detection, and method association
//! - **Interface Types**: Method signatures, embedded interface composition
//! - **Variables and Constants**: Package-level and function-scoped declarations
//! - **Type Aliases**: Full support for custom type definitions
//! - **Generic Types**: Type parameters and constraints (Go 1.18+)
//!
//! ### Go-Specific Language Features
//! - **Package System**: Import path resolution, module system integration
//! - **Visibility Rules**: Exported/unexported symbol detection via capitalization
//! - **Method Receivers**: Both value and pointer receiver methods
//! - **Interface Implementations**: Structural compatibility checking (implicit)
//! - **Embedded Types**: Struct and interface composition
//! - **Channel Operations**: Basic channel type recognition
//!
//! ### Performance Characteristics
//! - **Indexing Speed**: >10,000 symbols/second target
//! - **Memory Efficiency**: ~100 bytes per symbol
//! - **Resolution Speed**: <10ms semantic search operations
//!
//! ## Module Components
//!
//! - [`parser`]: Core Tree-sitter integration and symbol extraction
//! - [`behavior`]: Go-specific language behaviors and formatting rules
//! - [`definition`]: Language registration and Tree-sitter node mappings
//! - [`resolution`]: Symbol resolution, scope management, and type system integration
//!
//! ## Integration
//!
//! The Go parser integrates seamlessly with Codanna's MCP server, providing these tools:
//! - `find_symbol` / `search_symbols` - Locate Go symbols by name or pattern
//! - `get_calls` / `find_callers` - Navigate function call relationships
//! - `analyze_impact` - Assess change impact across Go packages
//! - `semantic_search_docs` - Natural language queries over Go code
//!
//! ## Example Usage
//!
//! ```rust,no_run
//! use codanna::parsing::go::{GoParser, GoBehavior};
//! use codanna::parsing::{LanguageParser, LanguageBehavior};
//!
//! // Create parser instance
//! let parser = GoParser::new();
//! let behavior = GoBehavior::new();
//!
//! // Parser handles all Go language constructs automatically
//! // through the unified LanguageParser interface
//! ```
//!
//! ## Documentation References
//!
//! For detailed implementation information, see:
//! - [`definition`] module for complete AST node mappings
//! - `contributing/parsers/go/NODE_MAPPING.md` for Tree-sitter node types
//! - `tests/fixtures/go/` for comprehensive code examples
//! - [`parser`] module for symbol extraction implementation details
pub use GoBehavior;
pub use GoLanguage;
pub use GoParser;
pub use ;
// Re-export for registry registration
pub use register;