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
//! Raw AST - Phase 1 of the Two-Phase IR Architecture.
//!
//! This module contains AST types that are directly parsed from YAML with
//! full span tracking. All string values are preserved as-is, and all nodes
//! carry their source location for precise error reporting.
//!
//! # Two-Phase Architecture
//!
//! ```text
//! ┌─────────────────┐
//! │ YAML Source │ workflow.nika.yaml
//! └────────┬────────┘
//! │ marked_yaml
//! ▼
//! ┌─────────────────┐
//! │ raw::Workflow │ ← THIS MODULE
//! │ ├── Spanned<T> │ All nodes have line:col
//! │ └── strings │ Unresolved references
//! └────────┬────────┘
//! │ analyze()
//! ▼
//! ┌─────────────────┐
//! │ analyzed::Workflow │ (see ast/analyzed/)
//! │ ├── TaskId(u32) │ Interned identifiers
//! │ └── resolved refs │ All references validated
//! └─────────────────┘
//! ```
//!
//! # Example
//!
//! ```ignore
//! use nika::ast::raw;
//! use nika::source::SourceRegistry;
//!
//! let mut sources = SourceRegistry::new();
//! let file_id = sources.add_file("workflow.yaml", content);
//!
//! // Phase 1: Parse to raw AST
//! let raw_workflow = raw::parse(&content, file_id)?;
//!
//! // Phase 2: Analyze to resolved AST
//! let analyzed = analyze(&sources, raw_workflow)?;
//! ```
//!
//! # Design Principles
//!
//! 1. **Every node has a span** - For precise error locations
//! 2. **Strings are unresolved** - Task IDs are strings, not interned
//! 3. **No validation** - Structure only, semantics checked in Phase 2
//! 4. **Preserves YAML order** - Uses indexmap for key ordering
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;