mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Lazy imports grammar / AST changes
This commit is contained in:
parent
fb114cf497
commit
1c691ea756
25 changed files with 1016 additions and 338 deletions
|
|
@ -1916,7 +1916,7 @@ _PyPegen_concatenate_strings(Parser *p, asdl_expr_seq *strings,
|
|||
|
||||
stmt_ty
|
||||
_PyPegen_checked_future_import(Parser *p, identifier module, asdl_alias_seq * names, int level,
|
||||
int lineno, int col_offset, int end_lineno, int end_col_offset,
|
||||
int is_lazy, int lineno, int col_offset, int end_lineno, int end_col_offset,
|
||||
PyArena *arena) {
|
||||
if (level == 0 && PyUnicode_CompareWithASCIIString(module, "__future__") == 0) {
|
||||
for (Py_ssize_t i = 0; i < asdl_seq_LEN(names); i++) {
|
||||
|
|
@ -1926,7 +1926,7 @@ _PyPegen_checked_future_import(Parser *p, identifier module, asdl_alias_seq * na
|
|||
}
|
||||
}
|
||||
}
|
||||
return _PyAST_ImportFrom(module, names, level, lineno, col_offset, end_lineno, end_col_offset, arena);
|
||||
return _PyAST_ImportFrom(module, names, level, is_lazy, lineno, col_offset, end_lineno, end_col_offset, arena);
|
||||
}
|
||||
|
||||
asdl_stmt_seq*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue