Add support for parsing BOOL to AST

This commit is contained in:
Bartłomiej Pluta
2019-07-10 13:54:21 +02:00
parent 26a2b27def
commit 9408c63e06
4 changed files with 18 additions and 1 deletions

13
smnp/ast/node/bool.py Normal file
View File

@@ -0,0 +1,13 @@
from smnp.ast.node.access import AccessNode
from smnp.ast.node.literal import LiteralNode
from smnp.token.type import TokenType
class BoolLiteralNode(LiteralNode, AccessNode):
def __init__(self, pos):
super().__init__(pos)
del self.children[1]
@classmethod
def _getTokenType(cls):
return TokenType.BOOL