diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-10-23 13:40:54 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-10-23 18:45:45 +0200 |
commit | ace0b643ac34b5aa68668614204f231fe0440207 (patch) | |
tree | f3fb844e1e858d94cfcf852193e062cab9da060d /vala/valalockstatement.vala | |
parent | 508d5d07ad6938e806d36eb085890944361b56aa (diff) | |
download | vala-ace0b643ac34b5aa68668614204f231fe0440207.tar.gz |
vala: Fix several AST construction/parenting issues
Diffstat (limited to 'vala/valalockstatement.vala')
-rw-r--r-- | vala/valalockstatement.vala | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/vala/valalockstatement.vala b/vala/valalockstatement.vala index 65d8ff09e..7099383fa 100644 --- a/vala/valalockstatement.vala +++ b/vala/valalockstatement.vala @@ -36,12 +36,29 @@ public class Vala.LockStatement : CodeNode, Statement { /** * Expression representing the resource to be locked. */ - public Expression resource { get; set; } + public Expression resource { + get { return _resource; } + set { + _resource = value; + _resource.parent_node = this; + } + } /** * The statement during its execution the resource is locked. */ - public Block? body { get; set; } + public Block? body { + get { return _body; } + set { + _body = value; + if (_body != null) { + _body.parent_node = this; + } + } + } + + private Expression _resource; + private Block _body; public LockStatement (Expression resource, Block? body, SourceReference? source_reference = null) { this.body = body; |