mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-09 22:25:23 +00:00
Regenerate code with latest ASDL
This commit is contained in:
parent
25b23998ad
commit
df2b5dfed0
10 changed files with 9288 additions and 19364 deletions
|
@ -138,6 +138,29 @@ impl Parse for ast::StmtAssign {
|
|||
}
|
||||
}
|
||||
|
||||
impl Parse for ast::StmtTypeAlias {
|
||||
fn lex_starts_at(
|
||||
source: &str,
|
||||
offset: TextSize,
|
||||
) -> SoftKeywordTransformer<Lexer<std::str::Chars>> {
|
||||
ast::Stmt::lex_starts_at(source, offset)
|
||||
}
|
||||
fn parse_tokens(
|
||||
lxr: impl IntoIterator<Item = LexResult>,
|
||||
source_path: &str,
|
||||
) -> Result<Self, ParseError> {
|
||||
let node = ast::Stmt::parse_tokens(lxr, source_path)?;
|
||||
match node {
|
||||
ast::Stmt::TypeAlias(node) => Ok(node),
|
||||
node => Err(ParseError {
|
||||
error: ParseErrorType::InvalidToken,
|
||||
offset: node.range().start(),
|
||||
source_path: source_path.to_owned(),
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Parse for ast::StmtAugAssign {
|
||||
fn lex_starts_at(
|
||||
source: &str,
|
||||
|
|
27489
parser/src/python.rs
generated
27489
parser/src/python.rs
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue