diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-03-06 18:50:48 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-03-06 18:50:48 (GMT) |
commit | fa974a9d06a216ca55bd81985fe75b17bdc3630a (patch) | |
tree | ddbf7c278462bef3dc45a4e5c896bbf20bb556c0 /Lib/compiler/ast.py | |
parent | ed9586174de17e4841e156a3a59fa283f23da1e2 (diff) | |
download | cpython-fa974a9d06a216ca55bd81985fe75b17bdc3630a.zip cpython-fa974a9d06a216ca55bd81985fe75b17bdc3630a.tar.gz cpython-fa974a9d06a216ca55bd81985fe75b17bdc3630a.tar.bz2 |
change node Classdef to Class
add doc string to transformer module
add two helper functions:
parse(buf) -> AST
parseFile(path) -> AST
Diffstat (limited to 'Lib/compiler/ast.py')
-rw-r--r-- | Lib/compiler/ast.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/compiler/ast.py b/Lib/compiler/ast.py index dfed562..5686d8b 100644 --- a/Lib/compiler/ast.py +++ b/Lib/compiler/ast.py @@ -114,18 +114,18 @@ class Lambda(Node): def __repr__(self): return "Lambda(%s,%s,%s,%s)" % self._children[1:] -class Classdef(Node): - nodes['classdef'] = 'Classdef' +class Class(Node): + nodes['class'] = 'Class' def __init__(self, name, bases, doc, code): self.name = name self.bases = bases self.doc = doc self.code = code - self._children = ('classdef', name, bases, doc, code) + self._children = ('class', name, bases, doc, code) def __repr__(self): - return "Classdef(%s,%s,%s,%s)" % self._children[1:] + return "Class(%s,%s,%s,%s)" % self._children[1:] class Pass(EmptyNode): nodes['pass'] = 'Pass' |