Correctly abort the failed grammar requests & Improve the handling of abort (#6803)
This commit is contained in:
@@ -60,7 +60,7 @@ class BaseGrammarObject:
|
||||
raise NotImplementedError()
|
||||
|
||||
def copy(self) -> "BaseGrammarObject":
|
||||
raise NotImplementedError()
|
||||
return self
|
||||
|
||||
@property
|
||||
def finished(self):
|
||||
@@ -99,9 +99,12 @@ class BaseGrammarObject:
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
INVALID_GRAMMAR_OBJ = BaseGrammarObject()
|
||||
|
||||
|
||||
@dataclass
|
||||
class CacheEntry:
|
||||
value: Optional[BaseGrammarObject]
|
||||
value: BaseGrammarObject
|
||||
event: Event
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user