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
85
86
87
88
89
//! # verter_core — Vue SFC compiler
//!
//! Core Rust crate for the Verter Vue compiler. Handles the full compilation
//! pipeline from Vue Single File Components (SFCs) to compiled output:
//!
//! ```text
//! Vue SFC source
//! ↓ tokenizer — byte-level SFC tokenization
//! ↓ parser — builds arena-based template AST + extracts script/style blocks
//! ↓ script — macro processing, binding extraction, component wrapper
//! ↓ template — render function codegen (VDOM or Vapor backends)
//! ↓ style/css — scoped CSS, CSS Modules, v-bind() replacement
//! ↓ compile — orchestrates the above, applies CodeTransform, emits output
//! ```
//!
//! ## Crate boundaries
//!
//! - **Rust** (this crate): tokenization → parsing → AST → template/script/style codegen
//! - **TypeScript** (`@verter/core`): SFC-to-TSX transformation for IDE type checking
//! - **NAPI** (`verter_napi`): bridges this crate to Node.js for build-time use (unplugin)
//! - **WASM** (`verter_wasm`): bridges this crate to the browser for the playground
//!
//! ## Visibility
//!
//! Modules used only by `verter_bench` (`ast`, `code_transform`, `script`,
//! `style`, `template`) are feature-gated behind the `bench` feature.
//! They are `pub(crate)` by default and become `pub` when
//! `features = ["bench"]` is enabled.
// Shared infrastructure
pub
// Diagnostic infrastructure
// Core compilation modules
pub
pub
pub
pub
// IDE code generation (TSX for TS projects, JSX+JSDoc for JS projects)
pub
// TSC code generation (vue-tsc replacement)
// Re-export the @verter/types declarations for the LSP and verter-tsc
pub use VERTER_TYPES_AMBIENT_MODULE;
pub use VERTER_TYPES_STANDALONE_DTS;
pub