Closed Abhinavcode13 closed 5 months ago
Please review the linked PR, @jafingerhut.
In this particular code, it appears that the type
field of the Token object is initialized, but never used later in the code, so it doesn't appear like the bug would have caused any issues in the current code, but agreed it is nicer with your changes.
num
label (ts.append(Token('num', match.group(1)))). This would misrepresent the token, leading to confusion while differentiating between numbers and operators.NumParseError
to raiseOpParseError
to reflect the correct exception type.