Commit 774705f4 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

Switch to new construction syntax

2007-03-03  Jürg Billeter  <j@bitron.ch>

	* Switch to new construction syntax

svn path=/trunk/; revision=211
parent ce5a4140
2007-03-03 Jürg Billeter <j@bitron.ch>
* Switch to new construction syntax
2007-03-03 Jürg Billeter <j@bitron.ch>
* vala/parser.y: support new construction syntax
......
......@@ -41,7 +41,7 @@ public class Vala.CCodeAssignment : CCodeExpression {
*/
public CCodeExpression right { get; construct; }
public construct (CCodeExpression l, CCodeExpression r, CCodeAssignmentOperator op = CCodeAssignmentOperator.SIMPLE) {
public CCodeAssignment (CCodeExpression l, CCodeExpression r, CCodeAssignmentOperator op = CCodeAssignmentOperator.SIMPLE) {
left = l;
operator = op;
right = r;
......
......@@ -41,7 +41,7 @@ public class Vala.CCodeBinaryExpression : CCodeExpression {
*/
public CCodeExpression! right { get; set construct; }
public construct (CCodeBinaryOperator op, CCodeExpression! l, CCodeExpression! r) {
public CCodeBinaryExpression (CCodeBinaryOperator op, CCodeExpression! l, CCodeExpression! r) {
operator = op;
left = l;
right = r;
......
......@@ -33,7 +33,7 @@ public class Vala.CCodeCaseStatement : CCodeStatement {
private List<CCodeStatement> statements;
public construct (CCodeExpression! expr) {
public CCodeCaseStatement (CCodeExpression! expr) {
expression = expr;
}
......
......@@ -36,7 +36,7 @@ public class Vala.CCodeCastExpression : CCodeExpression {
*/
public string! type_name { get; set construct; }
public construct (CCodeExpression! expr, string! type) {
public CCodeCastExpression (CCodeExpression! expr, string! type) {
inner = expr;
type_name = type;
}
......
......@@ -31,7 +31,7 @@ public class Vala.CCodeComment : CCodeNode {
*/
public string! text { get; set construct; }
public construct (string! _text) {
public CCodeComment (string! _text) {
text = _text;
}
......
......@@ -41,7 +41,7 @@ public class Vala.CCodeConditionalExpression : CCodeExpression {
*/
public CCodeExpression! false_expression { get; set construct; }
public construct (CCodeExpression! cond, CCodeExpression! true_expr, CCodeExpression! false_expr) {
public CCodeConditionalExpression (CCodeExpression! cond, CCodeExpression! true_expr, CCodeExpression! false_expr) {
condition = cond;
true_expression = true_expr;
false_expression = false_expr;
......
......@@ -31,7 +31,7 @@ public class Vala.CCodeConstant : CCodeExpression {
*/
public string! name { get; set construct; }
public construct (string! _name) {
public CCodeConstant (string! _name) {
name = _name;
}
......
......@@ -38,7 +38,7 @@ public class Vala.CCodeDeclaration : CCodeStatement {
private List<CCodeDeclarator> declarators;
public construct (string! _type_name) {
public CCodeDeclaration (string! _type_name) {
type_name = _type_name;
}
......
......@@ -36,7 +36,7 @@ public class Vala.CCodeDoStatement : CCodeStatement {
*/
public CCodeExpression! condition { get; set construct; }
public construct (CCodeStatement stmt, CCodeExpression! cond) {
public CCodeDoStatement (CCodeStatement stmt, CCodeExpression! cond) {
body = stmt;
condition = cond;
}
......
......@@ -39,7 +39,7 @@ public class Vala.CCodeElementAccess : CCodeExpression {
*/
public CCodeExpression! index { get; set construct; }
public construct (CCodeExpression! cont, CCodeExpression! i) {
public CCodeElementAccess (CCodeExpression! cont, CCodeExpression! i) {
container = cont;
index = i;
}
......
......@@ -33,7 +33,7 @@ public class Vala.CCodeEnum : CCodeNode {
private List<string> values;
public construct (string n = null) {
public CCodeEnum (string n = null) {
name = n;
}
......
......@@ -31,7 +31,7 @@ public class Vala.CCodeExpressionStatement : CCodeStatement {
*/
public CCodeExpression! expression { get; set construct; }
public construct (CCodeExpression expr) {
public CCodeExpressionStatement (CCodeExpression expr) {
expression = expr;
}
......
......@@ -36,7 +36,7 @@ public class Vala.CCodeFormalParameter : CCodeNode {
*/
public string! type_name { get; set construct; }
public construct (string! n, string! type) {
public CCodeFormalParameter (string! n, string! type) {
name = n;
type_name = type;
}
......
......@@ -39,7 +39,7 @@ public class Vala.CCodeForStatement : CCodeStatement {
private List<CCodeExpression> initializer;
private List<CCodeExpression> iterator;
public construct (CCodeExpression! cond, CCodeStatement stmt = null) {
public CCodeForStatement (CCodeExpression! cond, CCodeStatement stmt = null) {
condition = cond;
body = stmt;
}
......
......@@ -48,7 +48,7 @@ public class Vala.CCodeFunction : CCodeNode {
private List<CCodeFormalParameter> parameters;
public construct (string! _name, string! _return_type) {
public CCodeFunction (string! _name, string! _return_type) {
name = _name;
return_type = _return_type;
}
......
......@@ -33,7 +33,7 @@ public class Vala.CCodeFunctionCall : CCodeExpression {
private List<CCodeExpression> arguments;
public construct (CCodeExpression _call = null) {
public CCodeFunctionCall (CCodeExpression _call = null) {
call = _call;
}
......
......@@ -33,7 +33,7 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator {
private List<CCodeFormalParameter> parameters;
public construct (string! n) {
public CCodeFunctionDeclarator (string! n) {
name = n;
}
......
......@@ -31,7 +31,7 @@ public class Vala.CCodeIdentifier : CCodeExpression {
*/
public string! name { get; set construct; }
public construct (string! _name) {
public CCodeIdentifier (string! _name) {
name = _name;
}
......
......@@ -41,7 +41,7 @@ public class Vala.CCodeIfStatement : CCodeStatement {
*/
public CCodeStatement false_statement { get; set construct; }
public construct (CCodeExpression! cond, CCodeStatement! true_stmt, CCodeStatement false_stmt = null) {
public CCodeIfStatement (CCodeExpression! cond, CCodeStatement! true_stmt, CCodeStatement false_stmt = null) {
condition = cond;
true_statement = true_stmt;
false_statement = false_stmt;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment