diff --git a/core/parser.py b/core/parser.py index 4582d8f..3d6be35 100755 --- a/core/parser.py +++ b/core/parser.py @@ -51,7 +51,7 @@ def try_register(self, res: ParseResult[U]) -> Optional[U]: return None return self.register(res) - def success(self, node: T) -> ParseResult[T]: + def success(self, node: T) -> Optional[ParseResult[T]]: self.node = node return self