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
//! Typed, span-carrying SurrealQL AST.
//!
//! Produced by [`crate::lower`] from the tree-sitter CST; consumed by
//! analyzers. The contract:
//!
//! - **Purely syntactic.** No name resolution, no schema, no environment.
//! - **Spans on everything.** Every node carries the byte range of the CST
//! node it came from; nothing holds a `tree_sitter::Node` or a lifetime.
//! - **Partiality is explicit.** Enums carry a `Partial(PartialNode)` variant
//! for positions that failed to lower; statement structs carry an
//! `unhandled` bucket for CST children the lowering did not consume.
//! Nothing is silently dropped.
//! - **Normalized.** Keywords are case-folded, function paths canonicalized,
//! grammar quirks flattened — before analyzers ever see the tree.
pub use *;
pub use *;
pub use *;
pub use *;
use crateByteRange;
/// A syntax node paired with the byte range it was lowered from.
///
/// `SourceId` travels separately (analysis knows which source it is
/// working on); spans are plain `Copy` byte ranges so the AST is `'static`.
/// A region of syntax the lowering could not (or does not) model:
/// a CST `ERROR`/`MISSING` node, or a construct outside the modeled tier.
///
/// Analyzers translate these into explicit partial analysis facts — they
/// must never be ignored.