Regenerate code with latest ASDL

This commit is contained in:
Zanie 2023-07-10 13:45:36 -05:00
parent 25b23998ad
commit df2b5dfed0
10 changed files with 9288 additions and 19364 deletions

View file

@ -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

File diff suppressed because it is too large Load diff