mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-06-22 23:19:25 -04:00
Compare commits
3 commits
7d354d9880
...
9fca125d66
Author | SHA1 | Date | |
---|---|---|---|
|
9fca125d66 | ||
|
f50b898e4c | ||
|
fa3b84d612 |
3 changed files with 10 additions and 3 deletions
|
@ -266,6 +266,7 @@ blueprints = custom_target('blueprints',
|
||||||
arguments in {Colors.UNDERLINE}{meson_file}{Colors.NO_UNDERLINE}:{Colors.CLEAR}
|
arguments in {Colors.UNDERLINE}{meson_file}{Colors.NO_UNDERLINE}:{Colors.CLEAR}
|
||||||
|
|
||||||
dependencies: blueprints,
|
dependencies: blueprints,
|
||||||
|
source_dir: meson.current_build_dir(),
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
enter()
|
enter()
|
||||||
|
|
|
@ -81,8 +81,8 @@ class AdwBreakpointSetter(AstNode):
|
||||||
return self.tokens["property"]
|
return self.tokens["property"]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def value(self) -> Value:
|
def value(self) -> T.Optional[Value]:
|
||||||
return self.children[Value][0]
|
return self.children[Value][0] if len(self.children[Value]) > 0 else None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def gir_class(self) -> T.Optional[GirType]:
|
def gir_class(self) -> T.Optional[GirType]:
|
||||||
|
@ -106,7 +106,10 @@ class AdwBreakpointSetter(AstNode):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def document_symbol(self) -> DocumentSymbol:
|
def document_symbol(self) -> T.Optional[DocumentSymbol]:
|
||||||
|
if self.value is None:
|
||||||
|
return None
|
||||||
|
|
||||||
return DocumentSymbol(
|
return DocumentSymbol(
|
||||||
f"{self.object_id}.{self.property_name}",
|
f"{self.object_id}.{self.property_name}",
|
||||||
SymbolKind.Property,
|
SymbolKind.Property,
|
||||||
|
|
|
@ -308,6 +308,9 @@ class XmlOutput(OutputFormat):
|
||||||
|
|
||||||
elif isinstance(extension, AdwBreakpointSetters):
|
elif isinstance(extension, AdwBreakpointSetters):
|
||||||
for setter in extension.setters:
|
for setter in extension.setters:
|
||||||
|
if setter.value is None:
|
||||||
|
continue
|
||||||
|
|
||||||
attrs = {}
|
attrs = {}
|
||||||
|
|
||||||
if isinstance(setter.value.child, Translated):
|
if isinstance(setter.value.child, Translated):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue