diff --git a/blueprintcompiler/completions.py b/blueprintcompiler/completions.py index fd203c5..ea58422 100644 --- a/blueprintcompiler/completions.py +++ b/blueprintcompiler/completions.py @@ -34,6 +34,7 @@ Pattern = T.List[T.Tuple[TokenType, T.Optional[str]]] def debug(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) + def _complete( lsp, ast_node: AstNode, tokens: T.List[Token], idx: int, token_idx: int ) -> T.Iterator[Completion]: diff --git a/blueprintcompiler/gir.py b/blueprintcompiler/gir.py index f569f0a..336c0b1 100644 --- a/blueprintcompiler/gir.py +++ b/blueprintcompiler/gir.py @@ -342,6 +342,8 @@ class GirNode: el = self.xml.get_elements("doc") if len(el) == 1: return el[0].cdata.strip().partition("\n")[0] + else: + return None except: return None