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
//! Common trait for symbol information.
//!
//! This module provides a unified interface for accessing symbol information
//! across different symbol representations in the codebase.
use SymbolType;
/// Common interface for symbol information.
///
/// This trait provides a unified way to access symbol properties across
/// different representations:
/// - [`DefinedSymbol`](super::symbols::DefinedSymbol) - Used in analysis/diagnostics
/// - [`Symbol`](super::symbol_table::Symbol) - Used in flattening/scope resolution
/// - [`WorkspaceSymbol`](crate::lsp::workspace::WorkspaceSymbol) - Used in LSP features
///
/// # Example
///
/// ```
/// use rumoca::ir::analysis::symbol_trait::SymbolInfo;
///
/// fn print_symbol_info(sym: &impl SymbolInfo) {
/// println!("Symbol: {} at line {}", sym.name(), sym.line());
/// if sym.is_parameter() {
/// println!(" (parameter)");
/// }
/// }
/// ```