Do some refactor with multiple left associative operators
This commit is contained in:
15
smnp/ast/node/operator.py
Normal file
15
smnp/ast/node/operator.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from smnp.ast.node.model import Node
|
||||
|
||||
|
||||
class OperatorNode(Node):
|
||||
def __init__(self, pos):
|
||||
super().__init__(pos)
|
||||
self.children = [None]
|
||||
|
||||
@property
|
||||
def value(self):
|
||||
return self[0]
|
||||
|
||||
@value.setter
|
||||
def value(self, value):
|
||||
self[0] = value
|
||||
Reference in New Issue
Block a user