Fix TypeAliasName to store name instead of load

This commit is contained in:
Zanie 2023-07-26 16:14:22 -05:00
parent 704eb40108
commit 17fa74b006
2 changed files with 3 additions and 3 deletions

View file

@ -981,7 +981,7 @@ FuncDef: ast::Stmt = {
TypeAliasName: ast::Expr = {
<location:@L> <name:Identifier> <end_location:@R> => ast::Expr::Name(
ast::ExprName { id: name, ctx: ast::ExprContext::Load, range: (location..end_location).into() },
ast::ExprName { id: name, ctx: ast::ExprContext::Store, range: (location..end_location).into() },
),
}

4
parser/src/python.rs generated
View file

@ -1,5 +1,5 @@
// auto-generated: "lalrpop 0.20.0"
// sha3: 3831150e20de8eaf8849292a753e75259c3c34703bbfa26319e8faf5f9a853b5
// sha3: de5ffc51d44962eb297cbbf668fae33652eed69586405ebef2229fc02d183bc8
use crate::{
ast::{self as ast, Ranged, bigint::BigInt},
lexer::{LexicalError, LexicalErrorType},
@ -32200,7 +32200,7 @@ fn __action159<
) -> ast::Expr
{
ast::Expr::Name(
ast::ExprName { id: name, ctx: ast::ExprContext::Load, range: (location..end_location).into() },
ast::ExprName { id: name, ctx: ast::ExprContext::Store, range: (location..end_location).into() },
)
}