mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Raise EParseSyntax on wrong minus sign (not followed by int or float)
While not strictly a bug because it would be caught later in the function (it passes the tests either way), it made me nervous to leave a dangling NextToken().
This commit is contained in:
parent
dc30d461e2
commit
4ebd84f0ed
1 changed files with 1 additions and 0 deletions
|
@ -832,6 +832,7 @@ class parser(object):
|
|||
self.NextToken()
|
||||
return nr(nt=CONST, value=-val,
|
||||
t='integer' if type(val) == int else 'float')
|
||||
raise EParseSyntax(self)
|
||||
if tok0 == 'INTEGER_VALUE':
|
||||
self.NextToken()
|
||||
return nr(nt=CONST, t='integer', value=val)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue