summaryrefslogtreecommitdiffstats
path: root/Include/ast.h
Commit message (Collapse)AuthorAgeFilesLines
* bpo-41746: Add type information to asdl_seq objects (GH-22223)Pablo Galindo2020-09-161-1/+1
| | | | | | | | | | | | | * Add new capability to the PEG parser to type variable assignments. For instance: ``` | a[asdl_stmt_seq*]=';'.small_stmt+ [';'] NEWLINE { a } ``` * Add new sequence types from the asdl definition (automatically generated) * Make `asdl_seq` type a generic aliasing pointer type. * Create a new `asdl_generic_seq` for the generic case using `void*`. * The old `asdl_seq_GET`/`ast_seq_SET` macros now are typed. * New `asdl_seq_GET_UNTYPED`/`ast_seq_SET_UNTYPED` macros for dealing with generic sequences. * Changes all possible `asdl_seq` types to use specific versions everywhere.
* bpo-40939: Remove the old parser (Part 2) (GH-21005)Lysandros Nikolaou2020-06-201-11/+0
| | | Remove some remaining files and Makefile targets for the old parser
* bpo-21120: Exclude Python-ast.h, ast.h and asdl.h from the limited API (#14634)Zackery Spytz2019-09-121-4/+2
| | | | The PyArena type is not part of the limited API, so these headers shouldn't be part of it either.
* Fix typos in comments, docs and test names (#15018)Min ho Kim2019-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Fix typos in comments, docs and test names * Update test_pyparse.py account for change in string length * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: Dealloccte -> Deallocate Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Update posixmodule checksum. * Reverse idlelib changes.
* bpo-35177: Add dependencies between header files (GH-10361)Victor Stinner2018-11-111-0/+3
| | | | | | | | | | | | | | * ast.h now includes Python-ast.h and node.h * parsetok.h now includes node.h and grammar.h * symtable.h now includes Python-ast.h * Modify asdl_c.py to enhance Python-ast.h: * Add #ifndef/#define Py_PYTHON_AST_H to be able to include the header twice * Add "extern { ... }" for C++ * Undefine "Yield" macro conflicting with winbase.h * Remove "#undef Yield" from C files, it's now done in Python-ast.h * Remove now useless includes in C files
* bpo-33691: Add _PyAST_GetDocString(). (GH-7236)Serhiy Storchaka2018-05-301-0/+5
|
* bpo-33475: Fix and improve converting annotations to strings. (GH-6774)Serhiy Storchaka2018-05-171-3/+1
|
* String annotations [PEP 563] (#4390)Guido van Rossum2018-01-261-0/+9
| | | | | | | | * Document `from __future__ import annotations` * Provide plumbing and tests for `from __future__ import annotations` * Implement unparsing the AST back to string form This is required for PEP 563 and as such only implements a part of the unparsing process that covers expressions.
* Close #11619: The parser and the import machinery do not encode UnicodeVictor Stinner2013-08-261-0/+5
| | | | filenames anymore on Windows.
* add a AST validator (closes #12575)Benjamin Peterson2011-08-091-0/+1
|
* Issue #9738: Document encodings of AST, compiler, parser and PyRun functionsVictor Stinner2010-12-271-2/+5
|
* Merge from ast-arena. This reduces the code in Python/ast.c by ~300 lines,Neal Norwitz2005-12-171-1/+1
| | | | simplifies a lot of error handling code, and fixes many memory leaks.
* use PyAPI_FUNC instead of DL_IMPORT. are we going to deprecate the old ↵Neal Norwitz2005-10-241-2/+2
| | | | non-Py PREFIXED macros, etc?
* Merge ast-branch to headJeremy Hylton2005-10-201-0/+13
This change implements a new bytecode compiler, based on a transformation of the parse tree to an abstract syntax defined in Parser/Python.asdl. The compiler implementation is not complete, but it is in stable enough shape to run the entire test suite excepting two disabled tests.