summaryrefslogtreecommitdiffstats
path: root/Lib/compiler/ast.py
Commit message (Collapse)AuthorAgeFilesLines
* patches from Mark HammondJeremy Hylton2000-05-021-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attached is a set of diffs for the .py compiler that adds support for the new extended call syntax. compiler/ast.py: CallFunc node gets 2 new children to support extended call syntax - "star_args" (for "*args") and "dstar_args" (for "**args") compiler/pyassem.py It appear that self.lnotab is supposed to be responsible for tracking line numbers, but self.firstlineno was still hanging around. Removed self.firstlineno completely. NOTE - I didnt actually test that the generated code has the correct line numbers!! Stack depth tracking appeared a little broken - the checks never made it beyond the "self.patterns" check - thus, the custom methods were never called! Fixed this. (XXX Jeremy notes: I think this code is still broken because it doesn't track stack effects across block bounaries.) Added support for the new extended call syntax opcodes for depth calculations. compiler/pycodegen.py Added support for the new extended call syntax opcodes. compiler/transformer.py Added support for the new extended call syntax.
* change node Classdef to ClassJeremy Hylton2000-03-061-4/+4
| | | | | | | add doc string to transformer module add two helper functions: parse(buf) -> AST parseFile(path) -> AST
* add varargs and kwargs flags to Lambda nodesJeremy Hylton2000-02-171-0/+5
|
* tidy up tryexcept and tryfinally nodesJeremy Hylton2000-02-151-14/+20
|
* LeftShift & RightShift: fix reprs, change attr names to left and rightJeremy Hylton2000-02-141-10/+10
| | | | (so they are common with other binary ops)
* rename several of the generic attribute names for nodes. new node attrs are:Jeremy Hylton2000-02-141-12/+12
| | | | | | Exec: expr, locals, globals Dict: items Assert: test, fail
* make all unary operators have a single child node called exprJeremy Hylton2000-02-081-4/+4
|
* move constants out of transformer so that they can be shared with astJeremy Hylton2000-02-081-0/+7
| | | | add varargs and kwargs attributes to Function nodes
* three files from the p2c cvs tree. the message here indicates theJeremy Hylton2000-02-041-0/+689
revision number the p2c cvs tree. COPYRIGHT: 1.1 ast.py: 1.3 transformer.py: 1.11