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
// Copyright Two Neutron Stars Incorporated and contributors
// SPDX-License-Identifier: BlueOak-1.0.0
//! Core types and traits for the symbol table system.
//!
//! This module defines the fundamental building blocks used throughout the
//! symbolique crate:
//! - **Ident**: Trait for identifier types that represent names in the source
//! language
//! - **Span**: Re-exported `laburnum::Span` for source location tracking
//! - **Symbol**: The core enum representing different kinds of symbols
//! - **Value**: Trait for literal values stored in symbols
//! - **SymbolId**: Stable, unique identifier for symbols
//!
//! # Design Principles
//!
//! The core module separates structural concerns (how symbols are organized)
//! from semantic concerns (what symbols mean in a specific language). This
//! allows the same symbol table infrastructure to support diverse language
//! designs.
//!
//! # Type Relationships
//!
//! ```text
//! SymbolEngine<V, I>
//! ├─ V: Value (literal values)
//! └─ I: Ident (identifiers)
//! ```
//!
//! The type parameters are interconnected: identifiers know their source spans,
//! values can reference identifiers, and everything tracks source locations for
//! error reporting.
pub use ;
/// Allows value types to report all their internal spans for position indexing.
///
/// When a value has multiple source locations (e.g., a struct literal with
/// separate field spans), implementing this trait enables LSP features like
/// "find references" and "go to definition" to locate each individual part.
///
/// The spans returned are indexed by
/// `SymbolEngine::create_definition_with_value_indexing` so that cursor
/// positions within any part of the value resolve to the containing symbol.