1
This commit is contained in:
Christoph
2021-08-13 11:59:38 +02:00
parent 57447098b3
commit c91f3f89e7
7 changed files with 2 additions and 2 deletions

13
mytests/test_sugar_lex.py Normal file
View File

@ -0,0 +1,13 @@
from rply import Token
from simplelexer import lex
def test_lexing():
token = lex("+ - * / ++ %")
assert Token("Plus", "+") == token[0]
assert Token("Minus", "-") == token[1]
assert Token("Multiply", "*") == token[2]
assert Token("Divide", "/") == token[3]
assert Token("Increment", "++") == token[4]
assert Token("Modulo", "%") == token[5]