summaryrefslogtreecommitdiff
path: root/Python/Python-ast.c
AgeCommit message (Collapse)AuthorLines
2018-07-31[2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)Serhiy Storchaka-1/+1
2017-08-04Fix a shadow-compatible-local warning (#2182)Yuan Chao Chou-135/+135
Change the shadowing naming, 'value' (Python-ast.c:3814), to 'val' to prevent the variables from being misused.
2016-10-07Issue #24098: Fixed possible crash when AST is changed in process ofSerhiy Storchaka-0/+180
compiling it.
2012-12-13Make PyAST_obj2mod C89 compliant. (Follow-up commit from asdl_c.py.)Trent Nelson-3/+11
2011-07-22allow None identifiersBenjamin Peterson-3/+3
2011-07-22verify the types of AST strings and identifiers (closes #12609 and #12610)Benjamin Peterson-4/+21
2010-06-22bump revisionBenjamin Peterson-2/+2
2010-06-09fix code formattingBenjamin Peterson-2/+3
2010-01-11Update version information for AST changes in r77422.Alexandre Vassalotti-2/+2
2010-01-11Issue #2333: Backport set and dict comprehensions syntax.Alexandre Vassalotti-0/+214
2010-01-10Update the version # of Python-ast.c based on the backport of set literals fromBrett Cannon-2/+2
r77400.
2010-01-09Issue #2335: Backport set literals syntax from Python 3.x.Alexandre Vassalotti-0/+66
2009-12-13account for PyObject_IsInstance's new ability to failBenjamin Peterson-86/+440
2009-06-13update ast versionBenjamin Peterson-2/+2
2009-06-13when no module is given in a 'from' relative import, make ImportFrom.module NULLBenjamin Peterson-7/+1
2008-10-19fix compiler warningBenjamin Peterson-1/+1
2008-10-19Fixed #4067 by implementing _attributes and _fields for the AST root node.Armin Ronacher-0/+18
2008-09-10#3743: PY_FORMAT_SIZE_T is designed for the OS "printf" functions, not forAmaury Forgeot d'Arc-1/+1
PyString_FromFormat which has an independent implementation, and uses "%zd". This makes a difference on win64, where printf needs "%Id" to display 64bit values. For example, queue.__repr__ was incorrect. Reviewed by Martin von Loewis.
2008-06-09This reverts r63675 based on the discussion in this thread:Gregory P. Smith-14/+14
http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
2008-05-26Renamed PyString to PyBytesChristian Heimes-14/+14
2008-03-30Make AST nodes pickleable.Georg Brandl-2/+27
2008-03-30Fix error message -- "expects either 0 or 0 arguments"Georg Brandl-2/+4
2008-03-30Make _fields attr for no fields consistent with _attributes attr.Georg Brandl-8/+3
2008-03-30#2505: allow easier creation of AST nodes.Georg Brandl-22/+113
2008-03-30Patch #2511: Give the "excepthandler" AST item proper attributes by making ↵Georg Brandl-79/+107
it a Sum.
2008-03-29Properly check for consistency with the third argument ofGeorg Brandl-4/+11
compile() when compiling an AST node.
2008-03-28Silence a compilation warningAmaury Forgeot d'Arc-1/+1
2008-03-28Patch #1810 by Thomas Lee, reviewed by myself:Georg Brandl-5/+2861
allow compiling Python AST objects into code objects in compile().
2008-02-23Issue #2051 and patch from Alexander Belopolsky:Christian Heimes-2/+2
Permission for pyc and pyo files are inherited from the py file.
2008-02-23Patch #1759: Backport of PEP 3129 class decoratorsChristian Heimes-8/+19
with some help from Georg
2007-02-26Fix a couple of problems in generating the AST code:Neal Norwitz-166/+56
* use %r instead of backticks since backticks are going away in Py3k * PyArena_Malloc() already sets PyErr_NoMemory so we don't need to do it again * the signature for ast2obj_int incorrectly used a bool, rather than a long
2007-02-12Modify Parser/asdl_c.py so that the __version__ number for Python/Python-ast.cBrett Cannon-1/+10
is specified at the top of the file. Also add a note that Python/Python-ast.c needs to be committed separately after a change to the AST grammar to capture the revision number of the change (which is what __version__ is set to).
2007-02-11Check in changed Python-ast.c from a cosmetic change to Python.asdl (inBrett Cannon-1/+1
r53731).
2006-04-13Introduce asdl_int_seq, to hold cmpop_ty.Martin v. Löwis-3/+3
2006-04-11Regenerate.Martin v. Löwis-2/+0
2006-04-11Make _kind types global for C++ compilation.Martin v. Löwis-1/+1
Explicitly cast void* to int to cmpop_ty.
2006-04-11low-hanging fruit in Python/ - g++ still hates all the enum_kind declarationsAnthony Baxter-0/+2
in Python/Python-ast.c. Not sure what to do about those.
2006-04-07Regenerate.Martin v. Löwis-1/+1
2006-04-04Add lineno, col_offset to excephandler to enable future fix forJeremy Hylton-3/+18
tracing/line number table in except blocks. Reflow long lines introduced by col_offset changes. Update test_ast to handle new fields in excepthandler. As note in Python.asdl says, we might want to rethink how attributes are handled. Perhaps they should be the same as other fields, with the primary difference being how they are defined for all types within a sum. Also fix asdl_c so that constructors with int fields don't fail when passed a zero value.
2006-04-03* Fix a refleak of *_attributes.Neal Norwitz-144/+146
* Cleanup formatting a bit (add spaces). * Move static var initialized inside init_types() since that's the only place it's used.
2006-03-02Fix memory leak on attributes.Martin v. Löwis-5/+13
2006-03-01Patch #1440601: Add col_offset attribute to AST nodes.Martin v. Löwis-51/+118
2006-02-28Don't pollute namespace as bad as before. All the types are static now.Neal Norwitz-152/+152
2006-02-28from __future__ import with_statement addon for 'with', mostly written byThomas Wouters-2/+2
Neal.
2006-02-28SF patch #1438387, PEP 328: relative and absolute imports.Thomas Wouters-2/+10
- IMPORT_NAME takes an extra argument from the stack: the relativeness of the import. Only passed to __import__ when it's not -1. - __import__() takes an optional 5th argument for the same thing; it __defaults to -1 (old semantics: try relative, then absolute) - 'from . import name' imports name (be it module or regular attribute) from the current module's *package*. Likewise, 'from .module import name' will import name from a sibling to the current module. - Importing from outside a package is not allowed; 'from . import sys' in a toplevel module will not work, nor will 'from .. import sys' in a (single-level) package. - 'from __future__ import absolute_import' will turn on the new semantics for import and from-import: imports will be absolute, except for from-import with dots. Includes tests for regular imports and importhooks, parser changes and a NEWS item, but no compiler-package changes or documentation changes.
2006-02-28Regenerate.Martin v. Löwis-0/+2
2006-02-27PEP 343 -- the with-statement.Guido van Rossum-0/+52
This was started by Mike Bland and completed by Guido (with help from Neal). This still needs a __future__ statement added; Thomas is working on Michael's patch for that aspect. There's a small amount of code cleanup and refactoring in ast.c, compile.c and ceval.c (I fixed the lltrace behavior when EXT_POP is used -- however I had to make lltrace a static global).
2006-02-27Create _ast module.Martin v. Löwis-29/+345
Cleanup Python-ast.c generation.
2006-02-27PEP 308 implementation, including minor refdocs and some testcases. ItThomas Wouters-0/+58
breaks the parser module, because it adds the if/else construct as well as two new grammar rules for backward compatibility. If no one else fixes parsermodule, I guess I'll go ahead and fix it later this week. The TeX code was checked with texcheck.py, but not rendered. There is actually a slight incompatibility: >>> (x for x in lambda:0) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: iteration over non-sequence changes into >>> (x for x in lambda: 0) File "<stdin>", line 1 (x for x in lambda: 0) ^ SyntaxError: invalid syntax Since there's no way the former version can be useful, it's probably a bugfix ;)
2006-02-27Avoid reinitializing the types twice.Martin v. Löwis-0/+1