From 17fa74b006d362f103f6e38b844d04228da5c99b Mon Sep 17 00:00:00 2001 From: Zanie Date: Wed, 26 Jul 2023 16:14:22 -0500 Subject: [PATCH] Fix `TypeAliasName` to store name instead of load --- parser/src/python.lalrpop | 2 +- parser/src/python.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parser/src/python.lalrpop b/parser/src/python.lalrpop index a77bf7b..e1b8cbc 100644 --- a/parser/src/python.lalrpop +++ b/parser/src/python.lalrpop @@ -981,7 +981,7 @@ FuncDef: ast::Stmt = { TypeAliasName: 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() }, ), } diff --git a/parser/src/python.rs b/parser/src/python.rs index dca2d78..369499a 100644 --- a/parser/src/python.rs +++ b/parser/src/python.rs @@ -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() }, ) }