Create factor level

This commit is contained in:
Bartłomiej Pluta
2019-07-10 22:00:01 +02:00
parent 9dc8d5a650
commit 29820fb2ee
2 changed files with 13 additions and 2 deletions

11
smnp/ast/node/factor.py Normal file
View File

@@ -0,0 +1,11 @@
from smnp.ast.node.chain import ChainParser
from smnp.ast.node.operator import BinaryOperator
from smnp.ast.parser import Parser
from smnp.token.type import TokenType
class Factor(BinaryOperator):
pass
FactorParser = Parser.leftAssociativeOperatorParser(ChainParser, [TokenType.DOUBLE_ASTERISK], ChainParser, lambda left, op, right: Factor.withValues(left, op, right))