diff options
author | Juerg Billeter <j@bitron.ch> | 2008-04-13 16:17:00 +0000 |
---|---|---|
committer | Jürg Billeter <juergbi@src.gnome.org> | 2008-04-13 16:17:00 +0000 |
commit | 85cfd74faae12e90275990b2b887adc9a1f71d1d (patch) | |
tree | 2cce940835212c7cd7c0854482abe9a74cbbd120 /vala | |
parent | 206cd6716043d886c6531ca358f5b442c5ea991e (diff) | |
download | vala-85cfd74faae12e90275990b2b887adc9a1f71d1d.tar.gz |
deprecate construct as parameter modifier, fixes bug 524138
2008-04-13 Juerg Billeter <j@bitron.ch>
* vala/valaparser.vala: deprecate construct as parameter modifier,
fixes bug 524138
* */*.vala: port to new syntax
svn path=/trunk/; revision=1209
Diffstat (limited to 'vala')
61 files changed, 227 insertions, 71 deletions
diff --git a/vala/valaaddressofexpression.vala b/vala/valaaddressofexpression.vala index 68d169bf8..f55644519 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 bbac6f037..ec8dc9586 100644 --- a/vala/valaarraycreationexpression.vala +++ b/vala/valaarraycreationexpression.vala @@ -70,7 +70,11 @@ public class Vala.ArrayCreationExpression : Expression { return new ReadOnlyList<Expression> (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 4b9e1cc0f..57615b7f0 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 19329fb93..9d91189a3 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 96cedf3ae..5df894332 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 594d01b56..426ebea72 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 2c2dd4db8..7c01c2825 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 f742bf2a7..9208ff7fc 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 4b73c3e95..ba35a2056 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 a0d895c50..269ba8861 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 0a08b19c7..faf0f2a4e 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 54f128a6a..d7ab5a348 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 2180d16ff..94ef2f99f 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 8e5a2b9e4..3888ddf93 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 787a42735..cf020c6d4 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 0f3ac23c4..4cee764cb 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 9b7919031..3702f3dae 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 2c3da0d11..13dc25cd6 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 0b9beb8f5..b4ea716cb 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 9dc6b27fb..7855350c0 100644 --- a/vala/valaelementaccess.vala +++ b/vala/valaelementaccess.vala @@ -47,7 +47,9 @@ public class Vala.ElementAccess : Expression { return new ReadOnlyList<Expression> (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 38989dc28..399372196 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 d5d2e1611..a985f91bb 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 3901fbb9f..18795db3f 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 0207880e2..c15879a04 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 bac7f7a19..c1a0eabb7 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 ac09e9612..77dd41245 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 7c8eb96ef..6e522fe83 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 610ef849e..cfc74968a 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 55aba15ff..84cf3709e 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 c7cdb364c..04d51ac5b 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 e654c2a55..4f24d66c7 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 96b39c449..d728872d5 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 3eeeadf9d..740937017 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 eb2c8d4fa..13e8d2b4f 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 2d4c3ae7c..a1e0f02c2 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 3c14cc185..ab57045e9 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 aaeec0d7e..1f0373ce1 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 4fe20665c..364813ee3 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 eb948fd30..e3718db62 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 be0df4965..95c39c26f 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 3be699e21..89399439e 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 faaa707ee..fb83039f5 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 e78eb07eb..97653d42e 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 84bfe7714..99cd13000 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 a874e4bf0..9d95c9a15 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 97af5d1f9..65711420a 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 3c82c115c..a9e885599 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 b2ccf37c2..a761f041f 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 77566e289..5ecd4e563 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 94d821f19..ac0388971 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 2ca9c73f3..ef4e65859 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 e5c0de94a..727ff8749 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 59ae8c8fb..3ea5339f2 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 eeb873c59..b31eef0f9 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 42c0afb22..6ea08b452 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 486f16e74..ddfbed191 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 a2dc37d79..fd6a5af5e 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 f6a7fa3de..1fbc2d41e 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 64f583241..43b07c9d1 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 b856c2286..5aadf976a 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 8b23519dc..6f58bcdfe 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) { |