Refactored Parsers. Introduced BaseCustomGrammarParser. Renamed DefaultParser into DefConceptParser
This commit is contained in:
@@ -68,7 +68,7 @@ class Token:
|
||||
if self.type == TokenKind.IDENTIFIER:
|
||||
value = str(self.value)
|
||||
elif self.type == TokenKind.WHITESPACE:
|
||||
value = "<tab>" if self.value[0] == "\t" else "<ws>"
|
||||
value = "<ws!>" if self.value == "" else "<tab>" if self.value[0] == "\t" else "<ws>"
|
||||
elif self.type == TokenKind.NEWLINE:
|
||||
value = "<nl>"
|
||||
elif self.type == TokenKind.EOF:
|
||||
@@ -148,6 +148,8 @@ class Keywords(Enum):
|
||||
POST = "post"
|
||||
ISA = "isa"
|
||||
RET = "ret"
|
||||
WHEN = "when"
|
||||
PRINT = "print"
|
||||
|
||||
|
||||
class Tokenizer:
|
||||
|
||||
Reference in New Issue
Block a user