Kaydet (Commit) 156a9754 authored tarafından Jeremy Hylton's avatar Jeremy Hylton

make all unary operators have a single child node called expr

üst 1851901a
...@@ -414,7 +414,7 @@ class Backquote(Node): ...@@ -414,7 +414,7 @@ class Backquote(Node):
nodes['backquote'] = 'Backquote' nodes['backquote'] = 'Backquote'
def __init__(self, node): def __init__(self, node):
self.node = node self.expr = node
self._children = ('backquote', node) self._children = ('backquote', node)
def __repr__(self): def __repr__(self):
...@@ -657,7 +657,7 @@ class UnaryAdd(Node): ...@@ -657,7 +657,7 @@ class UnaryAdd(Node):
nodes['unary+'] = 'UnaryAdd' nodes['unary+'] = 'UnaryAdd'
def __init__(self, node): def __init__(self, node):
self.node = node self.expr = node
self._children = ('unary+', node) self._children = ('unary+', node)
def __repr__(self): def __repr__(self):
...@@ -667,7 +667,7 @@ class UnarySub(Node): ...@@ -667,7 +667,7 @@ class UnarySub(Node):
nodes['unary-'] = 'UnarySub' nodes['unary-'] = 'UnarySub'
def __init__(self, node): def __init__(self, node):
self.node = node self.expr = node
self._children = ('unary-', node) self._children = ('unary-', node)
def __repr__(self): def __repr__(self):
...@@ -677,7 +677,7 @@ class Invert(Node): ...@@ -677,7 +677,7 @@ class Invert(Node):
nodes['invert'] = 'Invert' nodes['invert'] = 'Invert'
def __init__(self, node): def __init__(self, node):
self.node = node self.expr = node
self._children = ('invert', node) self._children = ('invert', node)
def __repr__(self): def __repr__(self):
......
...@@ -414,7 +414,7 @@ class Backquote(Node): ...@@ -414,7 +414,7 @@ class Backquote(Node):
nodes['backquote'] = 'Backquote' nodes['backquote'] = 'Backquote'
def __init__(self, node): def __init__(self, node):
self.node = node self.expr = node
self._children = ('backquote', node) self._children = ('backquote', node)
def __repr__(self): def __repr__(self):
...@@ -657,7 +657,7 @@ class UnaryAdd(Node): ...@@ -657,7 +657,7 @@ class UnaryAdd(Node):
nodes['unary+'] = 'UnaryAdd' nodes['unary+'] = 'UnaryAdd'
def __init__(self, node): def __init__(self, node):
self.node = node self.expr = node
self._children = ('unary+', node) self._children = ('unary+', node)
def __repr__(self): def __repr__(self):
...@@ -667,7 +667,7 @@ class UnarySub(Node): ...@@ -667,7 +667,7 @@ class UnarySub(Node):
nodes['unary-'] = 'UnarySub' nodes['unary-'] = 'UnarySub'
def __init__(self, node): def __init__(self, node):
self.node = node self.expr = node
self._children = ('unary-', node) self._children = ('unary-', node)
def __repr__(self): def __repr__(self):
...@@ -677,7 +677,7 @@ class Invert(Node): ...@@ -677,7 +677,7 @@ class Invert(Node):
nodes['invert'] = 'Invert' nodes['invert'] = 'Invert'
def __init__(self, node): def __init__(self, node):
self.node = node self.expr = node
self._children = ('invert', node) self._children = ('invert', node)
def __repr__(self): def __repr__(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment