javalang icon indicating copy to clipboard operation
javalang copied to clipboard

Errors occurs when parsing 'i=0'

Open yuanyehome opened this issue 5 years ago • 0 comments

when I execute "list(javalang.tokenizer.tokenize('i=0'))", I got the error below: Traceback (most recent call last): File "", line 1, in File "/mnt/yuanye_work/javalang/javalang/tokenizer.py", line 538, in tokenize token_type = self.read_integer_or_float(c, c_next) File "/mnt/yuanye_work/javalang/javalang/tokenizer.py", line 370, in read_integer_or_float if c == '0' and c_next in 'xX': TypeError: 'in ' requires string as left operand, not NoneType

Perhaps in function 'read_integer_or_float' should add a condition when c_next is None?

yuanyehome avatar Sep 03 '20 03:09 yuanyehome