Enable tokenizer to support separators between keywords and integers

This commit is contained in:
Bartłomiej Pluta
2019-07-06 13:35:21 +02:00
parent 675b1774fe
commit 9c4046ac2a
14 changed files with 90 additions and 57 deletions

View File

@@ -1,5 +1,5 @@
from smnp.token.tools import tokenizeRegexPattern
from smnp.token.tools import regexPatternTokenizer, separate
from smnp.token.type import TokenType
def tokenizeInteger(input, current, line):
return tokenizeRegexPattern(TokenType.INTEGER, r'\d', input, current, line)
return separate(regexPatternTokenizer(TokenType.INTEGER, r'\d'))(input, current, line)