diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-02-08 21:06:19 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-02-08 21:06:19 (GMT) |
commit | 156a9754760585bbf7fbe1d124300bdc1c2b019d (patch) | |
tree | 058469d03d2499fae953dd7868c057d06f35dae4 | |
parent | 1851901a05201a2c34b35adb23fcb9da8a5fdb9f (diff) | |
download | cpython-156a9754760585bbf7fbe1d124300bdc1c2b019d.zip cpython-156a9754760585bbf7fbe1d124300bdc1c2b019d.tar.gz cpython-156a9754760585bbf7fbe1d124300bdc1c2b019d.tar.bz2 |
make all unary operators have a single child node called expr
-rw-r--r-- | Lib/compiler/ast.py | 8 | ||||
-rw-r--r-- | Tools/compiler/compiler/ast.py | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Lib/compiler/ast.py b/Lib/compiler/ast.py index 1715a7f..b6744b6 100644 --- a/Lib/compiler/ast.py +++ b/Lib/compiler/ast.py @@ -414,7 +414,7 @@ class Backquote(Node): nodes['backquote'] = 'Backquote' def __init__(self, node): - self.node = node + self.expr = node self._children = ('backquote', node) def __repr__(self): @@ -657,7 +657,7 @@ class UnaryAdd(Node): nodes['unary+'] = 'UnaryAdd' def __init__(self, node): - self.node = node + self.expr = node self._children = ('unary+', node) def __repr__(self): @@ -667,7 +667,7 @@ class UnarySub(Node): nodes['unary-'] = 'UnarySub' def __init__(self, node): - self.node = node + self.expr = node self._children = ('unary-', node) def __repr__(self): @@ -677,7 +677,7 @@ class Invert(Node): nodes['invert'] = 'Invert' def __init__(self, node): - self.node = node + self.expr = node self._children = ('invert', node) def __repr__(self): diff --git a/Tools/compiler/compiler/ast.py b/Tools/compiler/compiler/ast.py index 1715a7f..b6744b6 100644 --- a/Tools/compiler/compiler/ast.py +++ b/Tools/compiler/compiler/ast.py @@ -414,7 +414,7 @@ class Backquote(Node): nodes['backquote'] = 'Backquote' def __init__(self, node): - self.node = node + self.expr = node self._children = ('backquote', node) def __repr__(self): @@ -657,7 +657,7 @@ class UnaryAdd(Node): nodes['unary+'] = 'UnaryAdd' def __init__(self, node): - self.node = node + self.expr = node self._children = ('unary+', node) def __repr__(self): @@ -667,7 +667,7 @@ class UnarySub(Node): nodes['unary-'] = 'UnarySub' def __init__(self, node): - self.node = node + self.expr = node self._children = ('unary-', node) def __repr__(self): @@ -677,7 +677,7 @@ class Invert(Node): nodes['invert'] = 'Invert' def __init__(self, node): - self.node = node + self.expr = node self._children = ('invert', node) def __repr__(self): |