Add TypeParser (handling types list - specifiers etc.)

This commit is contained in:
Bartłomiej Pluta
2019-07-11 23:36:52 +02:00
parent 261530eb10
commit af3cb7027a
7 changed files with 87 additions and 14 deletions

View File

@@ -3,7 +3,7 @@ from smnp.token.type import TokenType
from smnp.type.model import Type
typeTokenizer = separated(keywordsTokenizer(TokenType.TYPE, *[type.name.lower() for type in Type]))
typeTokenizer = separated(keywordsTokenizer(TokenType.TYPE, *[type.name.lower() for type in Type], mapKeyword=lambda value: Type[value.upper()]))