diff --git a/blueprintcompiler/language/adw_response_dialog.py b/blueprintcompiler/language/adw_response_dialog.py index b1b43a4..7c307db 100644 --- a/blueprintcompiler/language/adw_response_dialog.py +++ b/blueprintcompiler/language/adw_response_dialog.py @@ -80,11 +80,14 @@ class ExtAdwResponseDialogResponse(AstNode): return not any(flag.flag == "disabled" for flag in self.flags) @property - def value(self) -> StringValue: + def value(self) -> T.Optional[StringValue]: return self.children[0] @property - def document_symbol(self) -> DocumentSymbol: + def document_symbol(self) -> T.Optional[DocumentSymbol]: + if self.value is None: + return None + return DocumentSymbol( self.id, SymbolKind.Field, diff --git a/blueprintcompiler/outputs/xml/__init__.py b/blueprintcompiler/outputs/xml/__init__.py index c8820aa..ee99777 100644 --- a/blueprintcompiler/outputs/xml/__init__.py +++ b/blueprintcompiler/outputs/xml/__init__.py @@ -364,6 +364,7 @@ class XmlOutput(OutputFormat): elif isinstance(extension, ExtAdwResponseDialog): xml.start_tag("responses") for response in extension.responses: + assert response.value is not None xml.start_tag( "response", id=response.id,