mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-26 01:44:19 +00:00
parser: Detect function declaration (#580)
This commit is contained in:
@@ -78,6 +78,11 @@ class ParserError(Enum):
|
||||
# they annotate are different.
|
||||
WRONG_STRING = 205
|
||||
|
||||
# ERROR: This lineref FUNCTION marker is next to a function declaration or
|
||||
# forward reference. The correct place for the marker is where the function
|
||||
# is implemented so we can match with the PDB.
|
||||
NO_IMPLEMENTATION = 206
|
||||
|
||||
|
||||
@dataclass
|
||||
class ParserAlert:
|
||||
|
||||
@@ -487,6 +487,9 @@ class DecompParser:
|
||||
):
|
||||
self._function_starts_here()
|
||||
self._function_done()
|
||||
elif self.function_sig.endswith(");"):
|
||||
# Detect forward reference or declaration
|
||||
self._syntax_error(ParserError.NO_IMPLEMENTATION)
|
||||
else:
|
||||
self.state = ReaderState.WANT_CURLY
|
||||
|
||||
|
||||
Reference in New Issue
Block a user