mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Fix error type on non-var global identifier in expression.
The error message should be EParseUndefined, not EParseTypeMismatch.
This commit is contained in:
parent
7419ac4982
commit
c71b0eea2f
1 changed files with 1 additions and 3 deletions
|
@ -913,11 +913,9 @@ class parser(object):
|
||||||
return {'nt':'FNCALL', 't':sym['Type'], 'name':name, 'ch':args}
|
return {'nt':'FNCALL', 't':sym['Type'], 'name':name, 'ch':args}
|
||||||
|
|
||||||
sym = self.FindSymbolFull(val)
|
sym = self.FindSymbolFull(val)
|
||||||
if sym is None:
|
if sym is None or sym['Kind'] != 'v':
|
||||||
raise EParseUndefined(self)
|
raise EParseUndefined(self)
|
||||||
|
|
||||||
if sym['Kind'] != 'v':
|
|
||||||
raise EParseTypeMismatch(self)
|
|
||||||
typ = sym['Type']
|
typ = sym['Type']
|
||||||
lvalue = {'nt':'IDENT', 't':typ, 'name':name, 'scope':sym['Scope']}
|
lvalue = {'nt':'IDENT', 't':typ, 'name':name, 'scope':sym['Scope']}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue