Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | gh-122951: Simplify the grammar of the assignment rule (#124998) | Rigel Di Scala | 2024-10-06 | 1 | -1584/+1525 |
| | |||||
* | gh-124889: Remove redundant artificial rules in PEG parser (#124893) | efimov-mikhail | 2024-10-03 | 1 | -8512/+1671 |
| | | | | | | | | | | | | Cache in C PEG-generator reworked: we save artificial rules in cache by Node string representation as a key instead of Node object itself. As a result total count of artificial rules in parsers.c is lowered from 283 to 170. More natural number ordering is used for the names of artificial rules. Auxiliary method CCallMakerVisitor._generate_artificial_rule_call is added. Its purpose is abstracting work with artificial rules cache. Explicit using of "is_repeat1" kwarg is added to visit_Repeat0 and visit_Repeat1 methods. Its slightly improve code readabitily. | ||||
* | gh-123562: Improve `SyntaxError` message for `case ... as a.b` (#123563) | sobolevn | 2024-09-02 | 1 | -8/+6 |
| | |||||
* | gh-123440: Improve error message for `except as` used with not a name (#123442) | sobolevn | 2024-08-30 | 1 | -969/+1221 |
| | |||||
* | gh-120956: Avoid comparison of int to Py_ssize_t in parser (#120959) | Lysandros Nikolaou | 2024-06-24 | 1 | -116/+116 |
| | |||||
* | gh-119724: Revert "bpo-45759: Better error messages for non-matching ↵ | Petr Viktorin | 2024-06-04 | 1 | -548/+450 |
| | | | | | | 'elif'/'else' statements (#29513)" (#119974) This reverts commit 1c8f912ebdfdb146cd7dd2d7a3a67d2c5045ddb0. | ||||
* | gh-118235: Move RAISE_SYNTAX_ERROR actions to invalid rules and make sure ↵ | Petr Viktorin | 2024-05-30 | 1 | -1416/+1538 |
| | | | | | | | | they stay there (GH-119731) The Full Grammar specification in the docs omits rule actions, so grammar rules that raise a syntax error looked like valid syntax. This was solved in ef940de by hiding those rules in the custom syntax highlighter. This moves all syntax-error alternatives to invalid rules, adds a validator that ensures that actions containing RAISE_SYNTAX_ERROR are in invalid rules, and reverts the syntax highlighter hack. | ||||
* | gh-118090: Improve error message for empty type param brackets (GH-118091) | Nikita Sobolev | 2024-05-07 | 1 | -797/+962 |
| | |||||
* | gh-116126: Implement PEP 696 (#116129) | Jelle Zijlstra | 2024-05-03 | 1 | -443/+548 |
| | | | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> | ||||
* | gh-116988: Remove duplicates of `annotated_rhs` in the Grammar (#117004) | David Rubin | 2024-04-24 | 1 | -2091/+1560 |
| | |||||
* | gh-118082: Improve `import` without names syntax error message (#118083) | Nikita Sobolev | 2024-04-23 | 1 | -149/+200 |
| | |||||
* | gh-109120: Fix syntax error in handlinh of incorrect star expressions (#117444) | Grigoriev Semyon | 2024-04-02 | 1 | -1230/+1417 |
| | |||||
* | bpo-24612: Improve syntax error for 'not' after an operator (GH-28170) | Pablo Galindo Salgado | 2024-03-26 | 1 | -594/+970 |
| | | | Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> | ||||
* | gh-115881: Ensure `ast.parse()` parses conditional context managers even ↵ | Alex Waygood | 2024-02-26 | 1 | -1/+1 |
| | | | | with low `feature_version` passed (#115920) | ||||
* | gh-111488: Changed error message in case of no 'in' keyword after 'for' in ↵ | Grigoriev Semyon | 2024-01-06 | 1 | -1592/+1785 |
| | | | | cmp (#113656) | ||||
* | bpo-45759: Better error messages for non-matching 'elif'/'else' statements ↵ | Crowthebird | 2023-11-20 | 1 | -435/+533 |
| | | | | (#29513) | ||||
* | GH-111807: Lower the parser stack depth under WASI debug builds (#112225) | Brett Cannon | 2023-11-20 | 1 | -1/+5 |
| | |||||
* | gh-111420: Allow type comments in parenthesized `with` statements (#111468) | Tomas R | 2023-10-31 | 1 | -6/+9 |
| | |||||
* | gh-110938: Fix error messages for indented blocks with functions and classes ↵ | Pablo Galindo Salgado | 2023-10-17 | 1 | -19/+31 |
| | | | | with generic type parameters (#110973) | ||||
* | gh-110696: Fix incorrect syntax error message for incorrect argument ↵ | Pablo Galindo Salgado | 2023-10-12 | 1 | -1133/+1485 |
| | | | | unpacking (#110706) | ||||
* | gh-109596: Ensure repeated rules in the grammar are not allowed and fix ↵ | Pablo Galindo Salgado | 2023-09-22 | 1 | -1182/+1180 |
| | | | | incorrect soft keywords (#109606) | ||||
* | gh-109114: Relax the check for invalid lambdas inside f-strings to avoid ↵ | Pablo Galindo Salgado | 2023-09-08 | 1 | -1124/+1065 |
| | | | | false positives (#109121) | ||||
* | gh-108179: Add error message for parser stack overflows (#108256) | Dennis Sweeney | 2023-08-22 | 1 | -1060/+530 |
| | |||||
* | gh-107015: Remove async_hacks from the tokenizer (#107018) | Pablo Galindo Salgado | 2023-07-26 | 1 | -311/+313 |
| | |||||
* | gh-98931: Add custom error messages to invalid import/from with multiple ↵ | Pablo Galindo Salgado | 2023-06-22 | 1 | -596/+719 |
| | | | | | | targets (#105985) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> | ||||
* | gh-105194: Fix format specifier escaped characters in f-strings (#105231) | Pablo Galindo Salgado | 2023-06-02 | 1 | -1/+1 |
| | |||||
* | gh-104799: Move location of type_params AST fields (#104828) | Jelle Zijlstra | 2023-05-26 | 1 | -3/+3 |
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> | ||||
* | gh-104656: Rename typeparams AST node to type_params (#104657) | Jelle Zijlstra | 2023-05-22 | 1 | -15/+15 |
| | |||||
* | gh-103763: Implement PEP 695 (#103764) | Jelle Zijlstra | 2023-05-16 | 1 | -1958/+2557 |
| | | | | | | | | | | | | | | This implements PEP 695, Type Parameter Syntax. It adds support for: - Generic functions (def func[T](): ...) - Generic classes (class X[T](): ...) - Type aliases (type X = ...) - New scoping when the new syntax is used within a class body - Compiler and interpreter changes to support the new syntax and scoping rules Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: Eric Traut <eric@traut.com> Co-authored-by: Larry Hastings <larry@hastings.org> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> | ||||
* | gh-103656: Transfer f-string buffers to parser to avoid use-after-free ↵ | Lysandros Nikolaou | 2023-04-27 | 1 | -12/+12 |
| | | | | | (GH-103896) Co-authored-by: Pablo Galindo <pablogsal@gmail.com> | ||||
* | gh-102856: Initial implementation of PEP 701 (#102855) | Pablo Galindo Salgado | 2023-04-19 | 1 | -2434/+4636 |
| | | | | | | Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Batuhan Taskaya <isidentical@gmail.com> Co-authored-by: Marta Gómez Macías <mgmacias@google.com> Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com> | ||||
* | gh-102416: Do not memoize incorrectly loop rules in the parser (#102467) | Pablo Galindo Salgado | 2023-03-06 | 1 | -216/+0 |
| | |||||
* | gh-101046: Fix a potential memory leak in the parser when raising ↵ | Pablo Galindo Salgado | 2023-01-16 | 1 | -0/+108 |
| | | | | MemoryError (#101051) | ||||
* | gh-90994: Improve error messages upon call arguments syntax errors (GH-96893) | Lysandros Nikolaou | 2022-11-20 | 1 | -1149/+1395 |
| | |||||
* | gh-99211: Point to except/except* on syntax errors when mixing them (GH-99215) | Lysandros Nikolaou | 2022-11-20 | 1 | -671/+713 |
| | | | Automerge-Triggered-By: GH:lysnikolaou | ||||
* | gh-99153: set location on SyntaxError for try with both except and except* ↵ | Irit Katriel | 2022-11-06 | 1 | -3/+3 |
| | | | | (GH-99160) | ||||
* | gh-98931: Improve error message when the user types 'import x from y' ↵ | Pablo Galindo Salgado | 2022-11-01 | 1 | -391/+465 |
| | | | | instead of 'from y import x' (#98932) | ||||
* | gh-91210: Improve error message when non-default param follows default ↵ | Lysandros Nikolaou | 2022-09-17 | 1 | -345/+353 |
| | | | | | | (GH-95933) - Improve error message when parameter without a default follows one with a default - Show same error message when positional-only params precede the default/non-default sequence | ||||
* | gh-96587: Raise `SyntaxError` for PEP654 on older `feature_version` (#96588) | Nikita Sobolev | 2022-09-05 | 1 | -1/+1 |
| | |||||
* | gh-94996: Disallow lambda pos only params with feature_version < (3, 8) ↵ | Shantanu | 2022-08-12 | 1 | -2/+2 |
| | | | | (GH-95934) | ||||
* | gh-94996: Disallow parsing pos only params with feature_version < (3, 8) ↵ | Shantanu | 2022-08-12 | 1 | -2/+2 |
| | | | | (GH-94997) | ||||
* | gh-94949: Disallow parsing parenthesised ctx mgr with old feature_version ↵ | Shantanu | 2022-07-18 | 1 | -1/+1 |
| | | | | | | | | | | | (#94950) * gh-94949: Disallow parsing parenthesised ctx manager with old feature_version * 📜🤖 Added by blurb_it. * Allow it with feature_version=(3, 9) as well Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> | ||||
* | gh-94947: Disallow parsing walrus with feature_version < (3, 8) (#94948) | Shantanu | 2022-07-18 | 1 | -1/+1 |
| | | | | | | | | | * gh-94947: Disallow parsing walrus with feature_version < (3, 8) * oops, commit the parser * 📜🤖 Added by blurb_it. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> | ||||
* | gh-94192: Fix error for dictionary literals with invalid expression as ↵ | wookie184 | 2022-06-26 | 1 | -261/+326 |
| | | | | | | | value. (#94304) * Fix error for dictionary literals with invalid expression as value. * Remove trailing whitespace | ||||
* | gh-92858: Improve error message for some suites with syntax error before ':' ↵ | wookie184 | 2022-06-23 | 1 | -362/+500 |
| | | | | (#92894) | ||||
* | gh-93671: Avoid exponential backtracking in deeply nested sequence patterns ↵ | Pablo Galindo Salgado | 2022-06-10 | 1 | -0/+10 |
| | | | | | in match statements (GH-93680) Co-authored-by: Łukasz Langa <lukasz@langa.pl> | ||||
* | gh-93103: Parser uses PyConfig.parser_debug instead of Py_DebugFlag (#93106) | Victor Stinner | 2022-05-24 | 1 | -1/+1 |
| | | | | | | | * Replace deprecated Py_DebugFlag with PyConfig.parser_debug in the parser. * Add Parser.debug member. * Add tok_state.debug member. * Py_FrozenMain(): Replace Py_VerboseFlag with PyConfig.verbose. | ||||
* | gh-90473: Decrease recursion limit and skip tests on WASI (GH-92803) | Christian Heimes | 2022-05-19 | 1 | -1/+5 |
| | |||||
* | bpo-47212: Improve error messages for un-parenthesized generator expressions ↵ | Matthieu Dartiailh | 2022-04-05 | 1 | -3/+3 |
| | | | | (GH-32302) | ||||
* | bpo-43224: Implement PEP 646 grammar changes (GH-31018) | Matthew Rahtz | 2022-03-26 | 1 | -2101/+2465 |
| | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> |