Skip to main content

vyre_libs/parsing/python/
mod.rs

1//! Python 3.12 structural frontend.
2//!
3//! The frontend keeps the runtime path GPU-native: the lexer and every
4//! structural extractor return `vyre_foundation::ir::Program` kernels over raw source
5//! bytes. Tests may use host helpers for reference expectations, but the
6//! shipping path never links a CPU parser.
7
8/// Python byte lexer.
9pub mod lex;
10/// Python structural extractors.
11pub mod parse;
12/// Content-keyed pipeline Program cache.
13pub mod source_cache;
14
15#[cfg(test)]
16mod tests;
17
18pub(crate) const INVALID_POS: u32 = u32::MAX;
19
20pub(crate) const MAX_DOTTED_SEGMENTS: u32 = 8;
21
22pub(crate) const DEF_RECORD_WORDS: u32 = 6;
23pub(crate) const IMPORT_RECORD_WORDS: u32 = 6;
24pub(crate) const WITH_RECORD_WORDS: u32 = 6;
25pub(crate) const CALL_RECORD_WORDS: u32 = 7;
26pub(crate) const KWARG_RECORD_WORDS: u32 = 2;
27pub(crate) const DECORATOR_RECORD_WORDS: u32 = 6;