1#![forbid(unsafe_code)]
8#![deny(missing_docs)]
9
10mod codec;
11mod grammar;
12mod lexer;
13mod lower;
14mod parser;
15mod types;
16
17pub use codec::{PythonCodec, PythonCodecLib};
18pub use grammar::{CORPUS_SHA256, GRAMMAR_SHA256, PYTHON_VERSION, frozen_productions};
19pub use lexer::{tokenize, tokenize_with_limits};
20pub use lower::{
21 decode_python, decode_python_located, decode_python_tree, encode_python, lower_python,
22};
23pub use parser::{parse_module, parse_module_with_limits};
24pub use types::{
25 Diagnostic, DiagnosticCode, Limits, Node, NodeKind, Span, SyntaxTree, Token, TokenKind,
26};
27
28pub const PYTHON_CODEC_ID: sim_kernel::CodecId = sim_kernel::CodecId(0x50_59_00_00);
30
31pub static RECIPES: sim_cookbook::EmbeddedDir =
33 include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
34
35#[cfg(test)]
36mod tests;