mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-19 11:05:45 +00:00
Update parser/build.rs to embed python.rs
This commit is contained in:
parent
d66d935879
commit
e1f70100ac
6 changed files with 75558 additions and 31 deletions
|
@ -116,14 +116,12 @@ pub use rustpython_ast as ast;
|
|||
|
||||
mod function;
|
||||
// Skip flattening lexer to distinguish from full parser
|
||||
mod context;
|
||||
pub mod lexer;
|
||||
mod mode;
|
||||
mod parser;
|
||||
mod string;
|
||||
#[rustfmt::skip]
|
||||
mod python;
|
||||
mod context;
|
||||
mod soft_keywords;
|
||||
mod string;
|
||||
mod token;
|
||||
|
||||
pub use mode::Mode;
|
||||
|
@ -133,3 +131,15 @@ pub use parser::{
|
|||
};
|
||||
pub use string::FStringErrorType;
|
||||
pub use token::{StringKind, Tok};
|
||||
|
||||
#[rustfmt::skip]
|
||||
mod python {
|
||||
#![allow(clippy::all)]
|
||||
#![allow(unused)]
|
||||
|
||||
#[cfg(feature = "lalrpop")]
|
||||
include!(concat!(env!("OUT_DIR"), "/src/python.rs"));
|
||||
|
||||
#[cfg(not(feature = "lalrpop"))]
|
||||
include!("python.rs");
|
||||
}
|
||||
|
|
1884
parser/src/python.lalrpop
Normal file
1884
parser/src/python.lalrpop
Normal file
File diff suppressed because it is too large
Load diff
75511
parser/src/python.rs
75511
parser/src/python.rs
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue