From 85cfd74faae12e90275990b2b887adc9a1f71d1d Mon Sep 17 00:00:00 2001 From: Juerg Billeter Date: Sun, 13 Apr 2008 16:17:00 +0000 Subject: [PATCH] deprecate construct as parameter modifier, fixes bug 524138 2008-04-13 Juerg Billeter * vala/valaparser.vala: deprecate construct as parameter modifier, fixes bug 524138 * */*.vala: port to new syntax svn path=/trunk/; revision=1209 --- ChangeLog | 7 +++++++ ccode/valaccodecasestatement.vala | 3 ++- ccode/valaccodedeclaration.vala | 3 ++- ccode/valaccodeenum.vala | 3 ++- ccode/valaccodeenumvalue.vala | 4 +++- ccode/valaccodeforstatement.vala | 4 +++- ccode/valaccodefunction.vala | 4 +++- ccode/valaccodefunctioncall.vala | 3 ++- ccode/valaccodefunctiondeclarator.vala | 3 ++- ccode/valaccodegotostatement.vala | 3 ++- ccode/valaccodelabel.vala | 3 ++- ccode/valaccodemacroreplacement.vala | 8 ++++++-- ccode/valaccodestruct.vala | 3 ++- ccode/valaccodeswitchstatement.vala | 3 ++- gee/arraylist.vala | 6 ++++-- gee/hashmap.vala | 17 ++++++++++++----- gee/hashset.vala | 7 +++++-- gee/readonlycollection.vala | 3 ++- gee/readonlylist.vala | 3 ++- gee/readonlymap.vala | 3 ++- gee/readonlyset.vala | 3 ++- gobject/valaccodearraycreationexpressionbinding.vala | 4 +++- gobject/valaccodeassignmentbinding.vala | 4 +++- gobject/valaccodeelementaccessbinding.vala | 4 +++- gobject/valaccodemethodbinding.vala | 4 +++- gobject/valadbusmethod.vala | 5 ++++- gobject/valadbussignal.vala | 5 ++++- vala/valaaddressofexpression.vala | 4 +++- vala/valaarraycreationexpression.vala | 6 +++++- vala/valaarraylengthfield.vala | 3 ++- vala/valaarraymovemethod.vala | 3 ++- vala/valaarrayresizemethod.vala | 3 ++- vala/valaassignment.vala | 6 +++++- vala/valaattribute.vala | 4 +++- vala/valablock.vala | 3 ++- vala/valacastexpression.vala | 6 +++++- vala/valacatchclause.vala | 6 +++++- vala/valacfgbuilder.vala | 19 ++++++++++++++----- vala/valaclass.vala | 4 +++- vala/valaclasstype.vala | 3 ++- vala/valaconstant.vala | 6 +++++- vala/valacreationmethod.vala | 5 ++++- vala/valadelegate.vala | 5 ++++- vala/valadelegatetype.vala | 3 ++- vala/valadestructor.vala | 3 ++- vala/valadostatement.vala | 5 ++++- vala/valaelementaccess.vala | 4 +++- vala/valaenum.vala | 4 +++- vala/valaenumvalue.vala | 7 +++++-- vala/valaerrorcode.vala | 7 +++++-- vala/valaerrordomain.vala | 4 +++- vala/valaexpressionstatement.vala | 4 +++- vala/valafield.vala | 6 +++++- vala/valaforeachstatement.vala | 7 ++++++- vala/valaforstatement.vala | 5 ++++- vala/valainitializerlist.vala | 3 ++- vala/valaintegertype.vala | 3 ++- vala/valainterface.vala | 4 +++- vala/valainterfacetype.vala | 3 ++- vala/valainvocationexpression.vala | 4 +++- vala/valalambdaexpression.vala | 8 ++++++-- vala/valalocalvariabledeclaration.vala | 7 +++++-- vala/valalockstatement.vala | 5 ++++- vala/valamemberaccess.vala | 14 +++++++++++--- vala/valamemberinitializer.vala | 5 ++++- vala/valamethod.vala | 5 ++++- vala/valamethodtype.vala | 3 ++- vala/valanamespace.vala | 4 +++- vala/valanamespacereference.vala | 4 +++- vala/valaobjectcreationexpression.vala | 4 +++- vala/valaparser.vala | 6 +++++- vala/valapointerindirection.vala | 4 +++- vala/valapointertype.vala | 3 ++- vala/valapropertyaccessor.vala | 7 ++++++- vala/valareferencetransferexpression.vala | 4 +++- vala/valareturnstatement.vala | 4 +++- vala/valascope.vala | 3 ++- vala/valasignal.vala | 5 ++++- vala/valasignaltype.vala | 3 ++- vala/valasourcefile.vala | 5 ++++- vala/valastruct.vala | 4 +++- vala/valaswitchsection.vala | 3 ++- vala/valaswitchstatement.vala | 4 +++- vala/valathrowstatement.vala | 4 +++- vala/valatrystatement.vala | 5 ++++- vala/valavaluetype.vala | 3 ++- vala/valavariabledeclarator.vala | 5 ++++- vala/valawhilestatement.vala | 5 ++++- vapigen/valavapicheck.vala | 3 ++- 89 files changed, 318 insertions(+), 105 deletions(-) diff --git a/ChangeLog b/ChangeLog index 48a5398..f0a43ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-04-13 Jürg Billeter + * vala/valaparser.vala: deprecate construct as parameter modifier, + fixes bug 524138 + + * */*.vala: port to new syntax + +2008-04-13 Jürg Billeter + * vala/valaparser.vala: report warning when using obsolete syntax for non-null types diff --git a/ccode/valaccodecasestatement.vala b/ccode/valaccodecasestatement.vala index e2e9950..1ac924b 100644 --- a/ccode/valaccodecasestatement.vala +++ b/ccode/valaccodecasestatement.vala @@ -34,7 +34,8 @@ public class Vala.CCodeCaseStatement : CCodeStatement { private Gee.List statements = new ArrayList (); - public CCodeCaseStatement (construct CCodeExpression expression) { + public CCodeCaseStatement (CCodeExpression expression) { + this.expression = expression; } /** diff --git a/ccode/valaccodedeclaration.vala b/ccode/valaccodedeclaration.vala index 9c001bb..eb7ada5 100644 --- a/ccode/valaccodedeclaration.vala +++ b/ccode/valaccodedeclaration.vala @@ -39,7 +39,8 @@ public class Vala.CCodeDeclaration : CCodeStatement { private Gee.List declarators = new ArrayList (); - public CCodeDeclaration (construct string type_name) { + public CCodeDeclaration (string type_name) { + this.type_name = type_name; } /** diff --git a/ccode/valaccodeenum.vala b/ccode/valaccodeenum.vala index 7062065..ffe6dc3 100644 --- a/ccode/valaccodeenum.vala +++ b/ccode/valaccodeenum.vala @@ -34,7 +34,8 @@ public class Vala.CCodeEnum : CCodeNode { private Gee.List values = new ArrayList (); - public CCodeEnum (construct string name = null) { + public CCodeEnum (string name = null) { + this.name = name; } /** diff --git a/ccode/valaccodeenumvalue.vala b/ccode/valaccodeenumvalue.vala index 3de1e69..f802b5f 100644 --- a/ccode/valaccodeenumvalue.vala +++ b/ccode/valaccodeenumvalue.vala @@ -37,7 +37,9 @@ public class Vala.CCodeEnumValue : CCodeNode { */ public CCodeExpression value { get; set; } - public CCodeEnumValue (construct string name, construct CCodeExpression value = null) { + public CCodeEnumValue (string name, CCodeExpression value = null) { + this.value = value; + this.name = name; } public override void write (CCodeWriter writer) { diff --git a/ccode/valaccodeforstatement.vala b/ccode/valaccodeforstatement.vala index 28bcc5a..03ca7fe 100644 --- a/ccode/valaccodeforstatement.vala +++ b/ccode/valaccodeforstatement.vala @@ -40,7 +40,9 @@ public class Vala.CCodeForStatement : CCodeStatement { private Gee.List initializer = new ArrayList (); private Gee.List iterator = new ArrayList (); - public CCodeForStatement (construct CCodeExpression condition, construct CCodeStatement body = null) { + public CCodeForStatement (CCodeExpression condition, CCodeStatement body = null) { + this.body = body; + this.condition = condition; } /** diff --git a/ccode/valaccodefunction.vala b/ccode/valaccodefunction.vala index 7e51c31..38bdada 100644 --- a/ccode/valaccodefunction.vala +++ b/ccode/valaccodefunction.vala @@ -49,7 +49,9 @@ public class Vala.CCodeFunction : CCodeNode { private Gee.List parameters = new ArrayList (); - public CCodeFunction (construct string name, construct string return_type) { + public CCodeFunction (string name, string return_type) { + this.return_type = return_type; + this.name = name; } /** diff --git a/ccode/valaccodefunctioncall.vala b/ccode/valaccodefunctioncall.vala index da68f4e..bedd2d9 100644 --- a/ccode/valaccodefunctioncall.vala +++ b/ccode/valaccodefunctioncall.vala @@ -34,7 +34,8 @@ public class Vala.CCodeFunctionCall : CCodeExpression { private Gee.List arguments = new ArrayList (); - public CCodeFunctionCall (construct CCodeExpression call = null) { + public CCodeFunctionCall (CCodeExpression call = null) { + this.call = call; } /** diff --git a/ccode/valaccodefunctiondeclarator.vala b/ccode/valaccodefunctiondeclarator.vala index 9b32d2c..e3958e2 100644 --- a/ccode/valaccodefunctiondeclarator.vala +++ b/ccode/valaccodefunctiondeclarator.vala @@ -34,7 +34,8 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator { private Gee.List parameters = new ArrayList (); - public CCodeFunctionDeclarator (construct string name) { + public CCodeFunctionDeclarator (string name) { + this.name = name; } /** diff --git a/ccode/valaccodegotostatement.vala b/ccode/valaccodegotostatement.vala index 9c0a779..189cb20 100644 --- a/ccode/valaccodegotostatement.vala +++ b/ccode/valaccodegotostatement.vala @@ -31,7 +31,8 @@ public class Vala.CCodeGotoStatement : CCodeStatement { */ public string name { get; set construct; } - public CCodeGotoStatement (construct string name) { + public CCodeGotoStatement (string name) { + this.name = name; } public override void write (CCodeWriter writer) { diff --git a/ccode/valaccodelabel.vala b/ccode/valaccodelabel.vala index 9dd81da..2973a8b 100644 --- a/ccode/valaccodelabel.vala +++ b/ccode/valaccodelabel.vala @@ -31,7 +31,8 @@ public class Vala.CCodeLabel : CCodeStatement { */ public string name { get; set construct; } - public CCodeLabel (construct string name) { + public CCodeLabel (string name) { + this.name = name; } public override void write (CCodeWriter writer) { diff --git a/ccode/valaccodemacroreplacement.vala b/ccode/valaccodemacroreplacement.vala index f1fe7cc..52e0a0a 100644 --- a/ccode/valaccodemacroreplacement.vala +++ b/ccode/valaccodemacroreplacement.vala @@ -41,10 +41,14 @@ public class Vala.CCodeMacroReplacement : CCodeNode { */ public CCodeExpression replacement_expression { get; set; } - public CCodeMacroReplacement (construct string name, construct string replacement) { + public CCodeMacroReplacement (string name, string replacement) { + this.replacement = replacement; + this.name = name; } - public CCodeMacroReplacement.with_expression (construct string name, construct CCodeExpression replacement_expression) { + public CCodeMacroReplacement.with_expression (string name, CCodeExpression replacement_expression) { + this.name = name; + this.replacement_expression = replacement_expression; } public override void write (CCodeWriter writer) { diff --git a/ccode/valaccodestruct.vala b/ccode/valaccodestruct.vala index b9352d5..4964fd5 100644 --- a/ccode/valaccodestruct.vala +++ b/ccode/valaccodestruct.vala @@ -34,7 +34,8 @@ public class Vala.CCodeStruct : CCodeNode { private Gee.List declarations = new ArrayList (); - public CCodeStruct (construct string name) { + public CCodeStruct (string name) { + this.name = name; } /** diff --git a/ccode/valaccodeswitchstatement.vala b/ccode/valaccodeswitchstatement.vala index a0e9425..bcce265 100644 --- a/ccode/valaccodeswitchstatement.vala +++ b/ccode/valaccodeswitchstatement.vala @@ -35,7 +35,8 @@ public class Vala.CCodeSwitchStatement : CCodeStatement { private Gee.List case_statements = new ArrayList (); private Gee.List default_statements = new ArrayList (); - public CCodeSwitchStatement (construct CCodeExpression expression) { + public CCodeSwitchStatement (CCodeExpression expression) { + this.expression = expression; } /** diff --git a/gee/arraylist.vala b/gee/arraylist.vala index 08fdcdc..c0a42e6 100644 --- a/gee/arraylist.vala +++ b/gee/arraylist.vala @@ -43,7 +43,8 @@ public class Gee.ArrayList : Object, Iterable, Collection, List { // concurrent modification protection private int _stamp = 0; - public ArrayList (construct EqualFunc equal_func = GLib.direct_equal) { + public ArrayList (EqualFunc equal_func = GLib.direct_equal) { + this.equal_func = equal_func; } public Type get_element_type () { @@ -165,7 +166,8 @@ public class Gee.ArrayList : Object, Iterable, Collection, List { // concurrent modification protection public int _stamp = 0; - public Iterator (construct ArrayList list) { + public Iterator (ArrayList list) { + this.list = list; } public bool next () { diff --git a/gee/hashmap.vala b/gee/hashmap.vala index 737e3f6..c4847ea 100644 --- a/gee/hashmap.vala +++ b/gee/hashmap.vala @@ -58,7 +58,10 @@ public class Gee.HashMap : Object, Map { private const int MIN_SIZE = 11; private const int MAX_SIZE = 13845163; - public HashMap (construct HashFunc key_hash_func = GLib.direct_hash, construct EqualFunc key_equal_func = GLib.direct_equal, construct EqualFunc value_equal_func = GLib.direct_equal) { + public HashMap (HashFunc key_hash_func = GLib.direct_hash, EqualFunc key_equal_func = GLib.direct_equal, EqualFunc value_equal_func = GLib.direct_equal) { + this.key_hash_func = key_hash_func; + this.key_equal_func = key_equal_func; + this.value_equal_func = value_equal_func; } construct { @@ -185,7 +188,8 @@ public class Gee.HashMap : Object, Map { private HashMap _map; - public KeySet (construct HashMap map) { + public KeySet (HashMap map) { + this.map = map; } public Type get_element_type () { @@ -232,7 +236,8 @@ public class Gee.HashMap : Object, Map { // concurrent modification protection private int _stamp; - public KeyIterator (construct HashMap map) { + public KeyIterator (HashMap map) { + this.map = map; } public bool next () { @@ -260,7 +265,8 @@ public class Gee.HashMap : Object, Map { private HashMap _map; - public ValueCollection (construct HashMap map) { + public ValueCollection (HashMap map) { + this.map = map; } public Type get_element_type () { @@ -313,7 +319,8 @@ public class Gee.HashMap : Object, Map { // concurrent modification protection private int _stamp; - public ValueIterator (construct HashMap map) { + public ValueIterator (HashMap map) { + this.map = map; } public bool next () { diff --git a/gee/hashset.vala b/gee/hashset.vala index 4cfdfd3..aed8cad 100644 --- a/gee/hashset.vala +++ b/gee/hashset.vala @@ -53,7 +53,9 @@ public class Gee.HashSet : Object, Iterable, Collection, Set { private const int MIN_SIZE = 11; private const int MAX_SIZE = 13845163; - public HashSet (construct HashFunc hash_func = GLib.direct_hash, construct EqualFunc equal_func = GLib.direct_equal) { + public HashSet (HashFunc hash_func = GLib.direct_hash, EqualFunc equal_func = GLib.direct_equal) { + this.hash_func = hash_func; + this.equal_func = equal_func; } construct { @@ -176,7 +178,8 @@ public class Gee.HashSet : Object, Iterable, Collection, Set { // concurrent modification protection private int _stamp = 0; - public Iterator (construct HashSet set) { + public Iterator (HashSet set) { + this.set = set; } public bool next () { diff --git a/gee/readonlycollection.vala b/gee/readonlycollection.vala index 8dad8f8..c54226e 100644 --- a/gee/readonlycollection.vala +++ b/gee/readonlycollection.vala @@ -36,7 +36,8 @@ public class Gee.ReadOnlyCollection : Object, Iterable, Collection { private Collection _collection; - public ReadOnlyCollection (construct Collection collection = null) { + public ReadOnlyCollection (Collection collection = null) { + this.collection = collection; } public Type get_element_type () { diff --git a/gee/readonlylist.vala b/gee/readonlylist.vala index 2e995d7..83efd6f 100644 --- a/gee/readonlylist.vala +++ b/gee/readonlylist.vala @@ -36,7 +36,8 @@ public class Gee.ReadOnlyList : Object, Iterable, Collection, List { private List _list; - public ReadOnlyList (construct List list = null) { + public ReadOnlyList (List list = null) { + this.list = list; } public Type get_element_type () { diff --git a/gee/readonlymap.vala b/gee/readonlymap.vala index c038e7d..cba3a2d 100644 --- a/gee/readonlymap.vala +++ b/gee/readonlymap.vala @@ -36,7 +36,8 @@ public class Gee.ReadOnlyMap : Object, Map { private Map _map; - public ReadOnlyMap (construct Map map = null) { + public ReadOnlyMap (Map map = null) { + this.map = map; } public Set get_keys () { diff --git a/gee/readonlyset.vala b/gee/readonlyset.vala index 4605183..ecf64d9 100644 --- a/gee/readonlyset.vala +++ b/gee/readonlyset.vala @@ -36,7 +36,8 @@ public class Gee.ReadOnlySet : Object, Iterable, Collection, Set { private Set _set; - public ReadOnlySet (construct Set set = null) { + public ReadOnlySet (Set set = null) { + this.set = set; } public Type get_element_type () { diff --git a/gobject/valaccodearraycreationexpressionbinding.vala b/gobject/valaccodearraycreationexpressionbinding.vala index 222d331..ab311c1 100644 --- a/gobject/valaccodearraycreationexpressionbinding.vala +++ b/gobject/valaccodearraycreationexpressionbinding.vala @@ -30,7 +30,9 @@ using Gee; public class Vala.CCodeArrayCreationExpressionBinding : CCodeExpressionBinding { public ArrayCreationExpression array_creation_expression { get; set; } - public CCodeArrayCreationExpressionBinding (construct CodeGenerator codegen, construct ArrayCreationExpression array_creation_expression) { + public CCodeArrayCreationExpressionBinding (CodeGenerator codegen, ArrayCreationExpression array_creation_expression) { + this.array_creation_expression = array_creation_expression; + this.codegen = codegen; } public override void emit () { diff --git a/gobject/valaccodeassignmentbinding.vala b/gobject/valaccodeassignmentbinding.vala index 33f59fe..eed55de 100644 --- a/gobject/valaccodeassignmentbinding.vala +++ b/gobject/valaccodeassignmentbinding.vala @@ -30,7 +30,9 @@ using Gee; public class Vala.CCodeAssignmentBinding : CCodeExpressionBinding { public Assignment assignment { get; set; } - public CCodeAssignmentBinding (construct CodeGenerator codegen, construct Assignment assignment) { + public CCodeAssignmentBinding (CodeGenerator codegen, Assignment assignment) { + this.assignment = assignment; + this.codegen = codegen; } private void emit_property_assignment () { diff --git a/gobject/valaccodeelementaccessbinding.vala b/gobject/valaccodeelementaccessbinding.vala index 936684c..8c6ce75 100644 --- a/gobject/valaccodeelementaccessbinding.vala +++ b/gobject/valaccodeelementaccessbinding.vala @@ -30,7 +30,9 @@ using Gee; public class Vala.CCodeElementAccessBinding : CCodeExpressionBinding { public ElementAccess element_access { get; set; } - public CCodeElementAccessBinding (construct CodeGenerator codegen, construct ElementAccess element_access) { + public CCodeElementAccessBinding (CodeGenerator codegen, ElementAccess element_access) { + this.element_access = element_access; + this.codegen = codegen; } public override void emit () { diff --git a/gobject/valaccodemethodbinding.vala b/gobject/valaccodemethodbinding.vala index 376e542..3bed0fd 100644 --- a/gobject/valaccodemethodbinding.vala +++ b/gobject/valaccodemethodbinding.vala @@ -33,7 +33,9 @@ public class Vala.CCodeMethodBinding : CCodeBinding { get { return (method.get_attribute ("NoWrapper") == null); } } - public CCodeMethodBinding (construct CodeGenerator codegen, construct Method method) { + public CCodeMethodBinding (CodeGenerator codegen, Method method) { + this.method = method; + this.codegen = codegen; } public static CCodeMethodBinding get (Method method) { diff --git a/gobject/valadbusmethod.vala b/gobject/valadbusmethod.vala index e7774bf..4aaa596 100644 --- a/gobject/valadbusmethod.vala +++ b/gobject/valadbusmethod.vala @@ -27,7 +27,10 @@ using Gee; * Represents a dynamic bound DBus method. */ public class Vala.DBusMethod : Method { - public DBusMethod (construct string name, construct DataType return_type, construct SourceReference source_reference = null) { + public DBusMethod (string name, DataType return_type, SourceReference source_reference = null) { + this.return_type = return_type; + this.source_reference = source_reference; + this.name = name; } public override Collection get_cheader_filenames () { diff --git a/gobject/valadbussignal.vala b/gobject/valadbussignal.vala index 44d627c..f736575 100644 --- a/gobject/valadbussignal.vala +++ b/gobject/valadbussignal.vala @@ -26,6 +26,9 @@ using GLib; * Represents a dynamic bound DBus signal. */ public class Vala.DBusSignal : Signal { - public DBusSignal (construct string name, construct DataType return_type, construct SourceReference source_reference = null) { + public DBusSignal (string name, DataType return_type, SourceReference source_reference = null) { + this.return_type = return_type; + this.source_reference = source_reference; + this.name = name; } } diff --git a/vala/valaaddressofexpression.vala b/vala/valaaddressofexpression.vala index 68d169b..f556445 100644 --- a/vala/valaaddressofexpression.vala +++ b/vala/valaaddressofexpression.vala @@ -47,7 +47,9 @@ public class Vala.AddressofExpression : Expression { * @param inner variable whose address is to be computed * @return newly created address-of expression */ - public AddressofExpression (construct Expression inner, construct SourceReference source_reference = null) { + public AddressofExpression (Expression inner, SourceReference source_reference = null) { + this.source_reference = source_reference; + this.inner = inner; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valaarraycreationexpression.vala b/vala/valaarraycreationexpression.vala index bbac6f0..ec8dc95 100644 --- a/vala/valaarraycreationexpression.vala +++ b/vala/valaarraycreationexpression.vala @@ -70,7 +70,11 @@ public class Vala.ArrayCreationExpression : Expression { return new ReadOnlyList (sizes); } - public ArrayCreationExpression (construct DataType element_type, construct int rank, construct InitializerList initializer_list, construct SourceReference source_reference) { + public ArrayCreationExpression (DataType element_type, int rank, InitializerList initializer_list, SourceReference source_reference) { + this.rank = rank; + this.initializer_list = initializer_list; + this.source_reference = source_reference; + this.element_type = element_type; } public override void accept_children (CodeVisitor visitor) { diff --git a/vala/valaarraylengthfield.vala b/vala/valaarraylengthfield.vala index 4b9e1cc..57615b7 100644 --- a/vala/valaarraylengthfield.vala +++ b/vala/valaarraylengthfield.vala @@ -31,7 +31,8 @@ public class Vala.ArrayLengthField : Field { * * @return newly created field */ - public ArrayLengthField (construct SourceReference source_reference) { + public ArrayLengthField (SourceReference source_reference) { + this.source_reference = source_reference; name = "length"; } } diff --git a/vala/valaarraymovemethod.vala b/vala/valaarraymovemethod.vala index 19329fb..9d91189 100644 --- a/vala/valaarraymovemethod.vala +++ b/vala/valaarraymovemethod.vala @@ -31,7 +31,8 @@ public class Vala.ArrayMoveMethod : Method { * * @return newly created method */ - public ArrayMoveMethod (construct SourceReference source_reference) { + public ArrayMoveMethod (SourceReference source_reference) { + this.source_reference = source_reference; name = "move"; } } diff --git a/vala/valaarrayresizemethod.vala b/vala/valaarrayresizemethod.vala index 96cedf3..5df8943 100644 --- a/vala/valaarrayresizemethod.vala +++ b/vala/valaarrayresizemethod.vala @@ -31,7 +31,8 @@ public class Vala.ArrayResizeMethod : Method { * * @return newly created method */ - public ArrayResizeMethod (construct SourceReference source_reference) { + public ArrayResizeMethod (SourceReference source_reference) { + this.source_reference = source_reference; name = "resize"; } diff --git a/vala/valaassignment.vala b/vala/valaassignment.vala index 594d01b..426ebea 100644 --- a/vala/valaassignment.vala +++ b/vala/valaassignment.vala @@ -67,7 +67,11 @@ public class Vala.Assignment : Expression { * @param source_reference reference to source code * @return newly created assignment */ - public Assignment (construct Expression left, construct Expression right, construct AssignmentOperator operator = AssignmentOperator.SIMPLE, construct SourceReference source_reference = null) { + public Assignment (Expression left, Expression right, AssignmentOperator operator = AssignmentOperator.SIMPLE, SourceReference source_reference = null) { + this.right = right; + this.operator = operator; + this.source_reference = source_reference; + this.left = left; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valaattribute.vala b/vala/valaattribute.vala index 2c2dd4d..7c01c28 100644 --- a/vala/valaattribute.vala +++ b/vala/valaattribute.vala @@ -44,7 +44,9 @@ public class Vala.Attribute : CodeNode { * @param source_reference reference to source code * @return newly created attribute */ - public Attribute (construct string name, construct SourceReference source_reference) { + public Attribute (string name, SourceReference source_reference) { + this.source_reference = source_reference; + this.name = name; } /** diff --git a/vala/valablock.vala b/vala/valablock.vala index f742bf2..9208ff7 100644 --- a/vala/valablock.vala +++ b/vala/valablock.vala @@ -41,7 +41,8 @@ public class Vala.Block : Symbol, Statement { * * @param source reference to source code */ - public Block (construct SourceReference source_reference = null) { + public Block (SourceReference source_reference = null) { + this.source_reference = source_reference; } /** diff --git a/vala/valacastexpression.vala b/vala/valacastexpression.vala index 4b73c3e..ba35a20 100644 --- a/vala/valacastexpression.vala +++ b/vala/valacastexpression.vala @@ -66,7 +66,11 @@ public class Vala.CastExpression : Expression { * @param type target type * @return newly created cast expression */ - public CastExpression (construct Expression inner, construct DataType type_reference, construct SourceReference source_reference, construct bool is_silent_cast) { + public CastExpression (Expression inner, DataType type_reference, SourceReference source_reference, bool is_silent_cast) { + this.type_reference = type_reference; + this.source_reference = source_reference; + this.is_silent_cast = is_silent_cast; + this.inner = inner; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valacatchclause.vala b/vala/valacatchclause.vala index a0d895c..269ba88 100644 --- a/vala/valacatchclause.vala +++ b/vala/valacatchclause.vala @@ -65,7 +65,11 @@ public class Vala.CatchClause : CodeNode { * @param source_reference reference to source code * @return newly created catch clause */ - public CatchClause (construct DataType? type_reference, construct string variable_name, construct Block body, construct SourceReference source_reference = null) { + public CatchClause (DataType? type_reference, string variable_name, Block body, SourceReference source_reference = null) { + this.type_reference = type_reference; + this.variable_name = variable_name; + this.body = body; + this.source_reference = source_reference; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valacfgbuilder.vala b/vala/valacfgbuilder.vala index 0a08b19..faf0f2a 100644 --- a/vala/valacfgbuilder.vala +++ b/vala/valacfgbuilder.vala @@ -39,23 +39,32 @@ public class Vala.CFGBuilder : CodeVisitor { public BasicBlock? last_block { get; set; } public CatchClause? catch_clause { get; set; } - public JumpTarget.break_target (construct BasicBlock basic_block) { + public JumpTarget.break_target (BasicBlock basic_block) { + this.basic_block = basic_block; break_target = true; } - public JumpTarget.continue_target (construct BasicBlock basic_block) { + public JumpTarget.continue_target (BasicBlock basic_block) { + this.basic_block = basic_block; continue_target = true; } - public JumpTarget.return_target (construct BasicBlock basic_block) { + public JumpTarget.return_target (BasicBlock basic_block) { + this.basic_block = basic_block; return_target = true; } - public JumpTarget.error_target (construct BasicBlock basic_block, construct CatchClause catch_clause, construct Enum? error_domain, construct EnumValue? error_code) { + public JumpTarget.error_target (BasicBlock basic_block, CatchClause catch_clause, Enum? error_domain, EnumValue? error_code) { + this.basic_block = basic_block; + this.catch_clause = catch_clause; + this.error_domain = error_domain; + this.error_code = error_code; error_target = true; } - public JumpTarget.finally_clause (construct BasicBlock basic_block, construct BasicBlock last_block) { + public JumpTarget.finally_clause (BasicBlock basic_block, BasicBlock last_block) { + this.basic_block = basic_block; + this.last_block = last_block; finally_clause = true; } } diff --git a/vala/valaclass.vala b/vala/valaclass.vala index 54f128a..d7ab5a3 100644 --- a/vala/valaclass.vala +++ b/vala/valaclass.vala @@ -111,7 +111,9 @@ public class Vala.Class : Typesymbol { * @param source reference to source code * @return newly created class */ - public Class (construct string name, construct SourceReference source_reference = null) { + public Class (string name, SourceReference source_reference = null) { + this.source_reference = source_reference; + this.name = name; } /** diff --git a/vala/valaclasstype.vala b/vala/valaclasstype.vala index 2180d16..94ef2f9 100644 --- a/vala/valaclasstype.vala +++ b/vala/valaclasstype.vala @@ -31,7 +31,8 @@ public class Vala.ClassType : ReferenceType { */ public weak Class class_symbol { get; set; } - public ClassType (construct Class class_symbol) { + public ClassType (Class class_symbol) { + this.class_symbol = class_symbol; data_type = class_symbol; } diff --git a/vala/valaconstant.vala b/vala/valaconstant.vala index 8e5a2b9..3888ddf 100644 --- a/vala/valaconstant.vala +++ b/vala/valaconstant.vala @@ -57,7 +57,11 @@ public class Vala.Constant : Member, Lockable { * @param source_reference reference to source code * @return newly created constant */ - public Constant (construct string name, construct DataType type_reference, construct Expression initializer, construct SourceReference source_reference) { + public Constant (string name, DataType type_reference, Expression initializer, SourceReference source_reference) { + this.type_reference = type_reference; + this.initializer = initializer; + this.source_reference = source_reference; + this.name = name; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valacreationmethod.vala b/vala/valacreationmethod.vala index 787a427..cf020c6 100644 --- a/vala/valacreationmethod.vala +++ b/vala/valacreationmethod.vala @@ -44,7 +44,10 @@ public class Vala.CreationMethod : Method { * @param source_reference reference to source code * @return newly created method */ - public CreationMethod (construct string type_name, construct string name, construct SourceReference source_reference = null) { + public CreationMethod (string type_name, string name, SourceReference source_reference = null) { + this.name = name; + this.source_reference = source_reference; + this.type_name = type_name; return_type = new VoidType (); } diff --git a/vala/valadelegate.vala b/vala/valadelegate.vala index 0f3ac23..4cee764 100644 --- a/vala/valadelegate.vala +++ b/vala/valadelegate.vala @@ -94,7 +94,10 @@ public class Vala.Delegate : Typesymbol { * @param source reference to source code * @return newly created delegate */ - public Delegate (construct string name, construct DataType return_type, construct SourceReference source_reference = null) { + public Delegate (string name, DataType return_type, SourceReference source_reference = null) { + this.return_type = return_type; + this.source_reference = source_reference; + this.name = name; } construct { diff --git a/vala/valadelegatetype.vala b/vala/valadelegatetype.vala index 9b79190..3702f3d 100644 --- a/vala/valadelegatetype.vala +++ b/vala/valadelegatetype.vala @@ -29,7 +29,8 @@ using Gee; public class Vala.DelegateType : DataType { public Delegate delegate_symbol { get; set; } - public DelegateType (construct Delegate delegate_symbol) { + public DelegateType (Delegate delegate_symbol) { + this.delegate_symbol = delegate_symbol; } public override bool is_invokable () { diff --git a/vala/valadestructor.vala b/vala/valadestructor.vala index 2c3da0d..13dc25c 100644 --- a/vala/valadestructor.vala +++ b/vala/valadestructor.vala @@ -47,7 +47,8 @@ public class Vala.Destructor : Symbol { * @param source_reference reference to source code * @return newly created destructor */ - public Destructor (construct SourceReference source_reference = null) { + public Destructor (SourceReference source_reference = null) { + this.source_reference = source_reference; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valadostatement.vala b/vala/valadostatement.vala index 0b9beb8..b4ea716 100644 --- a/vala/valadostatement.vala +++ b/vala/valadostatement.vala @@ -63,7 +63,10 @@ public class Vala.DoStatement : CodeNode, Statement { * @param source reference to source code * @return newly created do statement */ - public DoStatement (construct Block body, construct Expression condition, construct SourceReference source_reference = null) { + public DoStatement (Block body, Expression condition, SourceReference source_reference = null) { + this.condition = condition; + this.source_reference = source_reference; + this.body = body; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valaelementaccess.vala b/vala/valaelementaccess.vala index 9dc6b27..7855350 100644 --- a/vala/valaelementaccess.vala +++ b/vala/valaelementaccess.vala @@ -47,7 +47,9 @@ public class Vala.ElementAccess : Expression { return new ReadOnlyList (indices); } - public ElementAccess (construct Expression container, construct SourceReference source_reference) { + public ElementAccess (Expression container, SourceReference source_reference) { + this.source_reference = source_reference; + this.container = container; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valaenum.vala b/vala/valaenum.vala index 38989dc..3993721 100644 --- a/vala/valaenum.vala +++ b/vala/valaenum.vala @@ -52,7 +52,9 @@ public class Vala.Enum : Typesymbol { * @param source_reference reference to source code * @return newly created enum */ - public Enum (construct string name, construct SourceReference source_reference = null) { + public Enum (string name, SourceReference source_reference = null) { + this.source_reference = source_reference; + this.name = name; } /** diff --git a/vala/valaenumvalue.vala b/vala/valaenumvalue.vala index d5d2e16..a985f91 100644 --- a/vala/valaenumvalue.vala +++ b/vala/valaenumvalue.vala @@ -39,7 +39,8 @@ public class Vala.EnumValue : Symbol { * @param name enum value name * @return newly created enum value */ - public EnumValue (construct string name, SourceReference source_reference = null) { + public EnumValue (string name, SourceReference source_reference = null) { + this.name = name; this.source_reference = source_reference; } @@ -50,7 +51,9 @@ public class Vala.EnumValue : Symbol { * @param value numerical representation * @return newly created enum value */ - public EnumValue.with_value (construct string name, construct Expression value, SourceReference source_reference = null) { + public EnumValue.with_value (string name, Expression value, SourceReference source_reference = null) { + this.name = name; + this.value = value; this.source_reference = source_reference; } diff --git a/vala/valaerrorcode.vala b/vala/valaerrorcode.vala index 3901fbb..18795db 100644 --- a/vala/valaerrorcode.vala +++ b/vala/valaerrorcode.vala @@ -39,7 +39,8 @@ public class Vala.ErrorCode : Symbol { * @param name enum value name * @return newly created enum value */ - public ErrorCode (construct string name) { + public ErrorCode (string name) { + this.name = name; } /** @@ -49,7 +50,9 @@ public class Vala.ErrorCode : Symbol { * @param value numerical representation * @return newly created enum value */ - public ErrorCode.with_value (construct string name, construct Expression value) { + public ErrorCode.with_value (string name, Expression value) { + this.name = name; + this.value = value; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valaerrordomain.vala b/vala/valaerrordomain.vala index 0207880..c15879a 100644 --- a/vala/valaerrordomain.vala +++ b/vala/valaerrordomain.vala @@ -41,7 +41,9 @@ public class Vala.ErrorDomain : Typesymbol { * @param source_reference reference to source code * @return newly created error domain */ - public ErrorDomain (construct string name, construct SourceReference source_reference = null) { + public ErrorDomain (string name, SourceReference source_reference = null) { + this.source_reference = source_reference; + this.name = name; } /** diff --git a/vala/valaexpressionstatement.vala b/vala/valaexpressionstatement.vala index bac7f7a..c1a0eab 100644 --- a/vala/valaexpressionstatement.vala +++ b/vala/valaexpressionstatement.vala @@ -49,7 +49,9 @@ public class Vala.ExpressionStatement : CodeNode, Statement { * @param source reference to source code * @return newly created expression statement */ - public ExpressionStatement (construct Expression expression, construct SourceReference source_reference = null) { + public ExpressionStatement (Expression expression, SourceReference source_reference = null) { + this.source_reference = source_reference; + this.expression = expression; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valafield.vala b/vala/valafield.vala index ac09e96..77dd412 100644 --- a/vala/valafield.vala +++ b/vala/valafield.vala @@ -80,7 +80,11 @@ public class Vala.Field : Member, Lockable { * @param source reference to source code * @return newly created field */ - public Field (construct string name, construct DataType type_reference, construct Expression initializer, construct SourceReference source_reference = null) { + public Field (string name, DataType type_reference, Expression initializer, SourceReference source_reference = null) { + this.type_reference = type_reference; + this.initializer = initializer; + this.source_reference = source_reference; + this.name = name; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valaforeachstatement.vala b/vala/valaforeachstatement.vala index 7c8eb96..6e522fe 100644 --- a/vala/valaforeachstatement.vala +++ b/vala/valaforeachstatement.vala @@ -98,7 +98,12 @@ public class Vala.ForeachStatement : Block { * @param source reference to source code * @return newly created foreach statement */ - public ForeachStatement (construct DataType type_reference, construct string variable_name, construct Expression collection, construct Block body, construct SourceReference source_reference) { + public ForeachStatement (DataType type_reference, string variable_name, Expression collection, Block body, SourceReference source_reference) { + this.variable_name = variable_name; + this.collection = collection; + this.body = body; + this.source_reference = source_reference; + this.type_reference = type_reference; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valaforstatement.vala b/vala/valaforstatement.vala index 610ef84..cfc7496 100644 --- a/vala/valaforstatement.vala +++ b/vala/valaforstatement.vala @@ -69,7 +69,10 @@ public class Vala.ForStatement : CodeNode, Statement { * @param source_reference reference to source code * @return newly created for statement */ - public ForStatement (construct Expression condition, construct Block body, construct SourceReference source_reference = null) { + public ForStatement (Expression condition, Block body, SourceReference source_reference = null) { + this.body = body; + this.source_reference = source_reference; + this.condition = condition; } /** diff --git a/vala/valainitializerlist.vala b/vala/valainitializerlist.vala index 55aba15..84cf370 100644 --- a/vala/valainitializerlist.vala +++ b/vala/valainitializerlist.vala @@ -61,7 +61,8 @@ public class Vala.InitializerList : Expression { * @param source_reference reference to source code * @return newly created initializer list */ - public InitializerList (construct SourceReference source_reference) { + public InitializerList (SourceReference source_reference) { + this.source_reference = source_reference; } public override void accept_children (CodeVisitor visitor) { diff --git a/vala/valaintegertype.vala b/vala/valaintegertype.vala index c7cdb36..04d51ac 100644 --- a/vala/valaintegertype.vala +++ b/vala/valaintegertype.vala @@ -28,7 +28,8 @@ using GLib; public class Vala.IntegerType : ValueType { public IntegerLiteral literal { get; set; } - public IntegerType (construct Typesymbol type_symbol) { + public IntegerType (Typesymbol type_symbol) { + this.type_symbol = type_symbol; data_type = type_symbol; } diff --git a/vala/valainterface.vala b/vala/valainterface.vala index e654c2a..4f24d66 100644 --- a/vala/valainterface.vala +++ b/vala/valainterface.vala @@ -62,7 +62,9 @@ public class Vala.Interface : Typesymbol { * @param source reference to source code * @return newly created interface */ - public Interface (construct string name, construct SourceReference source_reference = null) { + public Interface (string name, SourceReference source_reference = null) { + this.source_reference = source_reference; + this.name = name; } /** diff --git a/vala/valainterfacetype.vala b/vala/valainterfacetype.vala index 96b39c4..d728872 100644 --- a/vala/valainterfacetype.vala +++ b/vala/valainterfacetype.vala @@ -31,7 +31,8 @@ public class Vala.InterfaceType : ReferenceType { */ public weak Interface interface_symbol { get; set; } - public InterfaceType (construct Interface interface_symbol) { + public InterfaceType (Interface interface_symbol) { + this.interface_symbol = interface_symbol; data_type = interface_symbol; } diff --git a/vala/valainvocationexpression.vala b/vala/valainvocationexpression.vala index 3eeeadf..7409370 100644 --- a/vala/valainvocationexpression.vala +++ b/vala/valainvocationexpression.vala @@ -52,7 +52,9 @@ public class Vala.InvocationExpression : Expression { * @param source_reference reference to source code * @return newly created invocation expression */ - public InvocationExpression (construct Expression call, construct SourceReference source_reference = null) { + public InvocationExpression (Expression call, SourceReference source_reference = null) { + this.source_reference = source_reference; + this.call = call; } /** diff --git a/vala/valalambdaexpression.vala b/vala/valalambdaexpression.vala index eb2c8d4..13e8d2b 100644 --- a/vala/valalambdaexpression.vala +++ b/vala/valalambdaexpression.vala @@ -54,7 +54,9 @@ public class Vala.LambdaExpression : Expression { * @param source_reference reference to source code * @return newly created lambda expression */ - public LambdaExpression (construct Expression expression_body, construct SourceReference source_reference) { + public LambdaExpression (Expression expression_body, SourceReference source_reference) { + this.source_reference = source_reference; + this.expression_body = expression_body; } /** @@ -64,7 +66,9 @@ public class Vala.LambdaExpression : Expression { * @param source_reference reference to source code * @return newly created lambda expression */ - public LambdaExpression.with_statement_body (construct Block statement_body, construct SourceReference source_reference) { + public LambdaExpression.with_statement_body (Block statement_body, SourceReference source_reference) { + this.statement_body = statement_body; + this.source_reference = source_reference; } /** diff --git a/vala/valalocalvariabledeclaration.vala b/vala/valalocalvariabledeclaration.vala index 2d4c3ae..a1e0f02 100644 --- a/vala/valalocalvariabledeclaration.vala +++ b/vala/valalocalvariabledeclaration.vala @@ -49,7 +49,9 @@ public class Vala.LocalVariableDeclaration : CodeNode { * @param source_reference reference to source code * @return newly created local variable declaration */ - public LocalVariableDeclaration (construct DataType type_reference, construct SourceReference source_reference) { + public LocalVariableDeclaration (DataType type_reference, SourceReference source_reference) { + this.type_reference = type_reference; + this.source_reference = source_reference; } /** @@ -60,7 +62,8 @@ public class Vala.LocalVariableDeclaration : CodeNode { * @param source_reference reference to source code * @return newly created local variable declaration */ - public LocalVariableDeclaration.var_type (construct SourceReference source_reference) { + public LocalVariableDeclaration.var_type (SourceReference source_reference) { + this.source_reference = source_reference; } /** diff --git a/vala/valalockstatement.vala b/vala/valalockstatement.vala index 3c14cc1..ab57045 100644 --- a/vala/valalockstatement.vala +++ b/vala/valalockstatement.vala @@ -36,7 +36,10 @@ public class Vala.LockStatement : CodeNode, Statement { */ public Block body { get; set construct; } - public LockStatement (construct Expression resource, construct Block body, construct SourceReference source_reference = null) { + public LockStatement (Expression resource, Block body, SourceReference source_reference = null) { + this.body = body; + this.source_reference = source_reference; + this.resource = resource; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala index aaeec0d..1f0373c 100644 --- a/vala/valamemberaccess.vala +++ b/vala/valamemberaccess.vala @@ -74,13 +74,21 @@ public class Vala.MemberAccess : Expression { * @param source_reference reference to source code * @return newly created member access expression */ - public MemberAccess (construct Expression inner, construct string member_name, construct SourceReference source_reference = null) { + public MemberAccess (Expression inner, string member_name, SourceReference source_reference = null) { + this.inner = inner; + this.member_name = member_name; + this.source_reference = source_reference; } - public MemberAccess.simple (construct string member_name, construct SourceReference source_reference = null) { + public MemberAccess.simple (string member_name, SourceReference source_reference = null) { + this.member_name = member_name; + this.source_reference = source_reference; } - public MemberAccess.pointer (construct Expression inner, construct string member_name, construct SourceReference source_reference = null) { + public MemberAccess.pointer (Expression inner, string member_name, SourceReference source_reference = null) { + this.inner = inner; + this.member_name = member_name; + this.source_reference = source_reference; pointer_member_access = true; } diff --git a/vala/valamemberinitializer.vala b/vala/valamemberinitializer.vala index 4fe2066..364813e 100644 --- a/vala/valamemberinitializer.vala +++ b/vala/valamemberinitializer.vala @@ -50,7 +50,10 @@ public class Vala.MemberInitializer : CodeNode { * @param source_reference reference to source code * @return newly created member initializer */ - public MemberInitializer (construct string name, construct Expression initializer, construct SourceReference source_reference = null) { + public MemberInitializer (string name, Expression initializer, SourceReference source_reference = null) { + this.initializer = initializer; + this.source_reference = source_reference; + this.name = name; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valamethod.vala b/vala/valamethod.vala index eb948fd..e3718db 100644 --- a/vala/valamethod.vala +++ b/vala/valamethod.vala @@ -211,7 +211,10 @@ public class Vala.Method : Member { * @param source reference to source code * @return newly created method */ - public Method (construct string name, construct DataType return_type, construct SourceReference source_reference = null) { + public Method (string name, DataType return_type, SourceReference source_reference = null) { + this.return_type = return_type; + this.source_reference = source_reference; + this.name = name; } construct { diff --git a/vala/valamethodtype.vala b/vala/valamethodtype.vala index be0df49..95c39c2 100644 --- a/vala/valamethodtype.vala +++ b/vala/valamethodtype.vala @@ -29,7 +29,8 @@ using Gee; public class Vala.MethodType : DataType { public Method method_symbol { get; set; } - public MethodType (construct Method method_symbol) { + public MethodType (Method method_symbol) { + this.method_symbol = method_symbol; } public override bool is_invokable () { diff --git a/vala/valanamespace.vala b/vala/valanamespace.vala index 3be699e..8939943 100644 --- a/vala/valanamespace.vala +++ b/vala/valanamespace.vala @@ -56,7 +56,9 @@ public class Vala.Namespace : Symbol { * @param source_reference reference to source code * @return newly created namespace */ - public Namespace (construct string name, construct SourceReference source_reference = null) { + public Namespace (string name, SourceReference source_reference = null) { + this.source_reference = source_reference; + this.name = name; access = SymbolAccessibility.PUBLIC; } diff --git a/vala/valanamespacereference.vala b/vala/valanamespacereference.vala index faaa707..fb83039 100644 --- a/vala/valanamespacereference.vala +++ b/vala/valanamespacereference.vala @@ -43,7 +43,9 @@ public class Vala.NamespaceReference : CodeNode { * @param source_reference reference to source code * @return newly created namespace reference */ - public NamespaceReference (construct string name, construct SourceReference source_reference) { + public NamespaceReference (string name, SourceReference source_reference) { + this.source_reference = source_reference; + this.name = name; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valaobjectcreationexpression.vala b/vala/valaobjectcreationexpression.vala index e78eb07..97653d4 100644 --- a/vala/valaobjectcreationexpression.vala +++ b/vala/valaobjectcreationexpression.vala @@ -63,7 +63,9 @@ public class Vala.ObjectCreationExpression : Expression { * @param source_reference reference to source code * @return newly created object creation expression */ - public ObjectCreationExpression (construct MemberAccess member_name, construct SourceReference source_reference) { + public ObjectCreationExpression (MemberAccess member_name, SourceReference source_reference) { + this.source_reference = source_reference; + this.member_name = member_name; } /** diff --git a/vala/valaparser.vala b/vala/valaparser.vala index 84bfe77..99cd130 100644 --- a/vala/valaparser.vala +++ b/vala/valaparser.vala @@ -2471,7 +2471,11 @@ public class Vala.Parser : CodeVisitor { // varargs return context.create_formal_parameter_with_ellipsis (get_src (begin)); } - bool construct_param = accept (TokenType.CONSTRUCT); + bool construct_param = false; + if (accept (TokenType.CONSTRUCT)) { + Report.warning (get_last_src (), "deprecated syntax, use assignments in the method body"); + construct_param = true; + } var type = parse_type (); var ut = type as UnresolvedType; if (ut != null) { diff --git a/vala/valapointerindirection.vala b/vala/valapointerindirection.vala index a874e4b..9d95c9a 100644 --- a/vala/valapointerindirection.vala +++ b/vala/valapointerindirection.vala @@ -47,7 +47,9 @@ public class Vala.PointerIndirection : Expression { * @param inner pointer to be dereferenced * @return newly created pointer indirection */ - public PointerIndirection (construct Expression inner, construct SourceReference source_reference = null) { + public PointerIndirection (Expression inner, SourceReference source_reference = null) { + this.source_reference = source_reference; + this.inner = inner; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valapointertype.vala b/vala/valapointertype.vala index 97af5d1..6571142 100644 --- a/vala/valapointertype.vala +++ b/vala/valapointertype.vala @@ -32,7 +32,8 @@ public class Vala.PointerType : DataType { */ public DataType base_type { get; set; } - public PointerType (construct DataType base_type) { + public PointerType (DataType base_type) { + this.base_type = base_type; } public override string to_string () { diff --git a/vala/valapropertyaccessor.vala b/vala/valapropertyaccessor.vala index 3c82c11..a9e8855 100644 --- a/vala/valapropertyaccessor.vala +++ b/vala/valapropertyaccessor.vala @@ -81,7 +81,12 @@ public class Vala.PropertyAccessor : CodeNode { * @param source reference to source code * @return newly created property accessor */ - public PropertyAccessor (construct bool readable, construct bool writable, construct bool construction, construct Block body, construct SourceReference source_reference) { + public PropertyAccessor (bool readable, bool writable, bool construction, Block body, SourceReference source_reference) { + this.writable = writable; + this.construction = construction; + this.body = body; + this.source_reference = source_reference; + this.readable = readable; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valareferencetransferexpression.vala b/vala/valareferencetransferexpression.vala index b2ccf37..a761f04 100644 --- a/vala/valareferencetransferexpression.vala +++ b/vala/valareferencetransferexpression.vala @@ -47,7 +47,9 @@ public class Vala.ReferenceTransferExpression : Expression { * @param inner variable whose reference is to be transferred * @return newly created reference transfer expression */ - public ReferenceTransferExpression (construct Expression inner, construct SourceReference source_reference = null) { + public ReferenceTransferExpression (Expression inner, SourceReference source_reference = null) { + this.source_reference = source_reference; + this.inner = inner; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valareturnstatement.vala b/vala/valareturnstatement.vala index 77566e2..5ecd4e5 100644 --- a/vala/valareturnstatement.vala +++ b/vala/valareturnstatement.vala @@ -48,7 +48,9 @@ public class Vala.ReturnStatement : CodeNode, Statement { * @param source_reference reference to source code * @return newly created return statement */ - public ReturnStatement (construct Expression return_expression = null, construct SourceReference source_reference = null) { + public ReturnStatement (Expression return_expression = null, SourceReference source_reference = null) { + this.source_reference = source_reference; + this.return_expression = return_expression; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valascope.vala b/vala/valascope.vala index 94d821f..ac03889 100644 --- a/vala/valascope.vala +++ b/vala/valascope.vala @@ -44,7 +44,8 @@ public class Vala.Scope : Object { * * @return newly created scope */ - public Scope (construct Symbol owner = null) { + public Scope (Symbol owner = null) { + this.owner = owner; } /** diff --git a/vala/valasignal.vala b/vala/valasignal.vala index 2ca9c73..ef4e658 100644 --- a/vala/valasignal.vala +++ b/vala/valasignal.vala @@ -60,7 +60,10 @@ public class Vala.Signal : Member, Lockable { * @param source reference to source code * @return newly created signal */ - public Signal (construct string name, construct DataType return_type, construct SourceReference source_reference = null) { + public Signal (string name, DataType return_type, SourceReference source_reference = null) { + this.return_type = return_type; + this.source_reference = source_reference; + this.name = name; } /** diff --git a/vala/valasignaltype.vala b/vala/valasignaltype.vala index e5c0de9..727ff87 100644 --- a/vala/valasignaltype.vala +++ b/vala/valasignaltype.vala @@ -29,7 +29,8 @@ using Gee; public class Vala.SignalType : DataType { public Signal signal_symbol { get; set; } - public SignalType (construct Signal signal_symbol) { + public SignalType (Signal signal_symbol) { + this.signal_symbol = signal_symbol; } public override bool is_invokable () { diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala index 59ae8c8..3ea5339 100644 --- a/vala/valasourcefile.vala +++ b/vala/valasourcefile.vala @@ -96,7 +96,10 @@ public class Vala.SourceFile : Object { * @param pkg true if this is a VAPI package file * @return newly created source file */ - public SourceFile (construct CodeContext context, construct string filename, construct bool pkg = false) { + public SourceFile (CodeContext context, string filename, bool pkg = false) { + this.filename = filename; + this.pkg = pkg; + this.context = context; } /** diff --git a/vala/valastruct.vala b/vala/valastruct.vala index eeb873c..b31eef0 100644 --- a/vala/valastruct.vala +++ b/vala/valastruct.vala @@ -62,7 +62,9 @@ public class Vala.Struct : Typesymbol { * @param source_reference reference to source code * @return newly created struct */ - public Struct (construct string name, construct SourceReference source_reference = null) { + public Struct (string name, SourceReference source_reference = null) { + this.source_reference = source_reference; + this.name = name; } /** diff --git a/vala/valaswitchsection.vala b/vala/valaswitchsection.vala index 42c0afb..6ea08b4 100644 --- a/vala/valaswitchsection.vala +++ b/vala/valaswitchsection.vala @@ -36,7 +36,8 @@ public class Vala.SwitchSection : Block { * @param source_reference reference to source code * @return newly created switch section */ - public SwitchSection (construct SourceReference source_reference) { + public SwitchSection (SourceReference source_reference) { + this.source_reference = source_reference; } /** diff --git a/vala/valaswitchstatement.vala b/vala/valaswitchstatement.vala index 486f16e..ddfbed1 100644 --- a/vala/valaswitchstatement.vala +++ b/vala/valaswitchstatement.vala @@ -50,7 +50,9 @@ public class Vala.SwitchStatement : CodeNode, Statement { * @param source_reference reference to source code * @return newly created switch statement */ - public SwitchStatement (construct Expression expression, construct SourceReference source_reference) { + public SwitchStatement (Expression expression, SourceReference source_reference) { + this.source_reference = source_reference; + this.expression = expression; } /** diff --git a/vala/valathrowstatement.vala b/vala/valathrowstatement.vala index a2dc37d..fd6a5af 100644 --- a/vala/valathrowstatement.vala +++ b/vala/valathrowstatement.vala @@ -50,7 +50,9 @@ public class Vala.ThrowStatement : CodeNode, Statement { * @param source_reference reference to source code * @return newly created throw statement */ - public ThrowStatement (construct Expression error_expression, construct SourceReference source_reference = null) { + public ThrowStatement (Expression error_expression, SourceReference source_reference = null) { + this.source_reference = source_reference; + this.error_expression = error_expression; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valatrystatement.vala b/vala/valatrystatement.vala index f6a7fa3..1fbc2d4 100644 --- a/vala/valatrystatement.vala +++ b/vala/valatrystatement.vala @@ -47,7 +47,10 @@ public class Vala.TryStatement : CodeNode, Statement { * @param source_reference reference to source code * @return newly created try statement */ - public TryStatement (construct Block body, construct Block finally_body, construct SourceReference source_reference = null) { + public TryStatement (Block body, Block finally_body, SourceReference source_reference = null) { + this.finally_body = finally_body; + this.source_reference = source_reference; + this.body = body; } /** diff --git a/vala/valavaluetype.vala b/vala/valavaluetype.vala index 64f5832..43b07c9 100644 --- a/vala/valavaluetype.vala +++ b/vala/valavaluetype.vala @@ -31,7 +31,8 @@ public class Vala.ValueType : DataType { */ public weak Typesymbol type_symbol { get; set; } - public ValueType (construct Typesymbol type_symbol) { + public ValueType (Typesymbol type_symbol) { + this.type_symbol = type_symbol; data_type = type_symbol; } diff --git a/vala/valavariabledeclarator.vala b/vala/valavariabledeclarator.vala index b856c22..5aadf97 100644 --- a/vala/valavariabledeclarator.vala +++ b/vala/valavariabledeclarator.vala @@ -64,7 +64,10 @@ public class Vala.VariableDeclarator : Symbol { * @param source reference to source code * @return newly created variable declarator */ - public VariableDeclarator (construct string name, construct Expression initializer = null, construct SourceReference source_reference = null) { + public VariableDeclarator (string name, Expression initializer = null, SourceReference source_reference = null) { + this.initializer = initializer; + this.source_reference = source_reference; + this.name = name; } public override void accept (CodeVisitor visitor) { diff --git a/vala/valawhilestatement.vala b/vala/valawhilestatement.vala index 8b23519..6f58bcd 100644 --- a/vala/valawhilestatement.vala +++ b/vala/valawhilestatement.vala @@ -63,7 +63,10 @@ public class Vala.WhileStatement : CodeNode, Statement { * @param source reference to source code * @return newly created while statement */ - public WhileStatement (construct Expression condition, construct Block body, construct SourceReference source_reference = null) { + public WhileStatement (Expression condition, Block body, SourceReference source_reference = null) { + this.body = body; + this.source_reference = source_reference; + this.condition = condition; } public override void accept (CodeVisitor visitor) { diff --git a/vapigen/valavapicheck.vala b/vapigen/valavapicheck.vala index 282b465..a066cc5 100644 --- a/vapigen/valavapicheck.vala +++ b/vapigen/valavapicheck.vala @@ -23,9 +23,10 @@ using GLib; class Vala.VAPICheck : Object { - public VAPICheck (string gidlname, construct CodeContext context = new CodeContext ()) { + public VAPICheck (string gidlname, CodeContext context = new CodeContext ()) { gidl = new SourceFile (context, gidlname); metadata = new SourceFile (context, gidlname.substring (0, gidlname.len () - 5) + ".metadata"); + this.context = context; } public CodeContext context { get; construct; } -- 2.7.4