mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
validation: Writable/construct-only properties
Add two new errors, one for non-writable properties and another for binding construct-only properties.
This commit is contained in:
parent
3b39e0d541
commit
f78478bea1
5 changed files with 31 additions and 1 deletions
|
@ -184,6 +184,14 @@ class Property(GirNode):
|
|||
def signature(self):
|
||||
return f"{self.type_name} {self.container.name}.{self.name}"
|
||||
|
||||
@property
|
||||
def writable(self):
|
||||
return self.xml["writable"] == "1"
|
||||
|
||||
@property
|
||||
def construct_only(self):
|
||||
return self.xml["construct-only"] == "1"
|
||||
|
||||
|
||||
class Parameter(GirNode):
|
||||
def __init__(self, container: GirNode, xml: xml_reader.Element):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue