slicc: isinstance bugfix

This fix prevents spurious errors when searching for a symbol that may be
located in one of multiple symbol tables.
This commit is contained in:
David Hashe 2015-07-20 09:15:18 -05:00
parent a72c75dcea
commit a254786a19

View file

@ -85,8 +85,8 @@ class SymbolTable(object):
if types is not None: if types is not None:
if not isinstance(symbol, types): if not isinstance(symbol, types):
symbol.error("Symbol '%s' is not of types '%s'.", continue # there could be a name clash with other symbol
symbol, types) # so rather than producing an error, keep trying
return symbol return symbol