fix a bug where the js tokenizer would fail if the last character of the source was an operator

This commit is contained in:
rolux 2011-10-07 00:42:31 +02:00
parent 409d5da90d
commit a7aba40790

View file

@ -125,6 +125,7 @@ def tokenize(source):
cursor += 1 cursor += 1
elif char in OPERATOR: elif char in OPERATOR:
type = 'operator' type = 'operator'
if cursor < length:
string = char + source[cursor] string = char + source[cursor]
while cursor < length and string in OPERATOR: while cursor < length and string in OPERATOR:
cursor += 1 cursor += 1