fix(ast): export/extern 变量 AnnAssign 固定 simple=1,Equal 判定显式 != 0
This commit is contained in:
1 parent
f854f7e99a
commit
9011878459
1 file changed
+1
-2
+1
-2
@@ -3912,8 +3912,7 @@ def _parse_export_extern_var(ps: rawptr[Parser]) -> rawptr[AST]:
|
||||
return None
|
||||
target: rawptr[AST] = Name(ps.pool, name, ASTCtx.Store)
|
||||
_set_pos(target, lineno, col, 0, 0)
|
||||
node: rawptr[AST] = AnnAssign(ps.pool, target, annotation, value,
|
||||
1 if value is not None else 0)
|
||||
node: rawptr[AST] = AnnAssign(ps.pool, target, annotation, value, 1)
|
||||
_set_pos(node, lineno, col, 0, 0)
|
||||
_skip_nl(ps)
|
||||
if _cur_type(ps) != TokenType.NewLine and _cur_type(ps) != TokenType.EndMarker:
|
||||
|
||||
Reference in new issue
Block a user