vala r1212 - in trunk: . ccode compiler gobject tests vala vapigen
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1212 - in trunk: . ccode compiler gobject tests vala vapigen
- Date: Sun, 13 Apr 2008 20:01:08 +0100 (BST)
Author: juergbi
Date: Sun Apr 13 20:01:07 2008
New Revision: 1212
URL: http://svn.gnome.org/viewvc/vala?rev=1212&view=rev
Log:
2008-04-13 Juerg Billeter <j bitron ch>
* */*.vala: fix build when using non-null types
Modified:
trunk/ChangeLog
trunk/ccode/valaccodeenum.vala
trunk/ccode/valaccodeenumvalue.vala
trunk/ccode/valaccodefunctioncall.vala
trunk/ccode/valaccodeifstatement.vala
trunk/ccode/valaccodereturnstatement.vala
trunk/ccode/valaccodevariabledeclarator.vala
trunk/ccode/valaccodewriter.vala
trunk/compiler/valacompiler.vala
trunk/gobject/valaccodecompiler.vala
trunk/gobject/valaccodegenerator.vala
trunk/gobject/valaccodegeneratormemberaccess.vala
trunk/gobject/valaccodegeneratorsignal.vala
trunk/gobject/valadbusmethod.vala
trunk/gobject/valadbussignal.vala
trunk/tests/classes-properties.vala
trunk/vala/valaaddressofexpression.vala
trunk/vala/valaarraycreationexpression.vala
trunk/vala/valaarraytype.vala
trunk/vala/valaassignment.vala
trunk/vala/valaattribute.vala
trunk/vala/valabaseaccess.vala
trunk/vala/valabinaryexpression.vala
trunk/vala/valablock.vala
trunk/vala/valacatchclause.vala
trunk/vala/valaclass.vala
trunk/vala/valacodecontext.vala
trunk/vala/valaconstant.vala
trunk/vala/valacreationmethod.vala
trunk/vala/valadatatype.vala
trunk/vala/valadelegate.vala
trunk/vala/valadeletestatement.vala
trunk/vala/valadestructor.vala
trunk/vala/valadostatement.vala
trunk/vala/valaenum.vala
trunk/vala/valaenumvalue.vala
trunk/vala/valaerrordomain.vala
trunk/vala/valaerrortype.vala
trunk/vala/valaexpressionstatement.vala
trunk/vala/valafield.vala
trunk/vala/valaformalparameter.vala
trunk/vala/valaforstatement.vala
trunk/vala/valaifstatement.vala
trunk/vala/valaintegerliteral.vala
trunk/vala/valainterface.vala
trunk/vala/valainvocationexpression.vala
trunk/vala/valalockstatement.vala
trunk/vala/valamemberaccess.vala
trunk/vala/valamemberinitializer.vala
trunk/vala/valamethod.vala
trunk/vala/valanamespace.vala
trunk/vala/valanullliteral.vala
trunk/vala/valaparenthesizedexpression.vala
trunk/vala/valaparser.vala
trunk/vala/valapointerindirection.vala
trunk/vala/valaproperty.vala
trunk/vala/valapropertyaccessor.vala
trunk/vala/valareferencetransferexpression.vala
trunk/vala/valareport.vala
trunk/vala/valareturnstatement.vala
trunk/vala/valasignal.vala
trunk/vala/valasourcefile.vala
trunk/vala/valasourcereference.vala
trunk/vala/valastruct.vala
trunk/vala/valaswitchlabel.vala
trunk/vala/valasymbol.vala
trunk/vala/valathrowstatement.vala
trunk/vala/valatrystatement.vala
trunk/vala/valatypesymbol.vala
trunk/vala/valaunresolvedtype.vala
trunk/vala/valavariabledeclarator.vala
trunk/vala/valawhilestatement.vala
trunk/vapigen/valagidlparser.vala
Modified: trunk/ccode/valaccodeenum.vala
==============================================================================
--- trunk/ccode/valaccodeenum.vala (original)
+++ trunk/ccode/valaccodeenum.vala Sun Apr 13 20:01:07 2008
@@ -1,6 +1,6 @@
/* valaccodeenum.vala
*
- * Copyright (C) 2006-2007 JÃrg Billeter
+ * Copyright (C) 2006-2008 JÃrg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -34,7 +34,7 @@
private Gee.List<CCodeEnumValue> values = new ArrayList<CCodeEnumValue> ();
- public CCodeEnum (string name = null) {
+ public CCodeEnum (string? name = null) {
this.name = name;
}
Modified: trunk/ccode/valaccodeenumvalue.vala
==============================================================================
--- trunk/ccode/valaccodeenumvalue.vala (original)
+++ trunk/ccode/valaccodeenumvalue.vala Sun Apr 13 20:01:07 2008
@@ -1,6 +1,6 @@
/* valaccodeenumvalue.vala
*
- * Copyright (C) 2007 JÃrg Billeter
+ * Copyright (C) 2007-2008 JÃrg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -35,11 +35,11 @@
/**
* The numerical representation of this enum value.
*/
- public CCodeExpression value { get; set; }
+ public CCodeExpression? value { get; set; }
- public CCodeEnumValue (string name, CCodeExpression value = null) {
- this.value = value;
+ public CCodeEnumValue (string name, CCodeExpression? value = null) {
this.name = name;
+ this.value = value;
}
public override void write (CCodeWriter writer) {
Modified: trunk/ccode/valaccodefunctioncall.vala
==============================================================================
--- trunk/ccode/valaccodefunctioncall.vala (original)
+++ trunk/ccode/valaccodefunctioncall.vala Sun Apr 13 20:01:07 2008
@@ -30,11 +30,11 @@
/**
* The function to be called.
*/
- public CCodeExpression call { get; set; }
+ public CCodeExpression? call { get; set; }
private Gee.List<CCodeExpression> arguments = new ArrayList<CCodeExpression> ();
- public CCodeFunctionCall (CCodeExpression call = null) {
+ public CCodeFunctionCall (CCodeExpression? call = null) {
this.call = call;
}
Modified: trunk/ccode/valaccodeifstatement.vala
==============================================================================
--- trunk/ccode/valaccodeifstatement.vala (original)
+++ trunk/ccode/valaccodeifstatement.vala Sun Apr 13 20:01:07 2008
@@ -1,6 +1,6 @@
/* valaccodeifstatement.vala
*
- * Copyright (C) 2006-2007 JÃrg Billeter
+ * Copyright (C) 2006-2008 JÃrg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -39,9 +39,9 @@
/**
* The optional statement to be evaluated if the condition doesn't hold.
*/
- public CCodeStatement false_statement { get; set construct; }
+ public CCodeStatement? false_statement { get; set construct; }
- public CCodeIfStatement (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;
Modified: trunk/ccode/valaccodereturnstatement.vala
==============================================================================
--- trunk/ccode/valaccodereturnstatement.vala (original)
+++ trunk/ccode/valaccodereturnstatement.vala Sun Apr 13 20:01:07 2008
@@ -1,6 +1,6 @@
/* valaccodereturnstatement.vala
*
- * Copyright (C) 2006-2007 JÃrg Billeter
+ * Copyright (C) 2006-2008 JÃrg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -29,9 +29,9 @@
/**
* The optional expression to return.
*/
- public CCodeExpression return_expression { get; set; }
+ public CCodeExpression? return_expression { get; set; }
- public CCodeReturnStatement (CCodeExpression expr = null) {
+ public CCodeReturnStatement (CCodeExpression? expr = null) {
return_expression = expr;
}
Modified: trunk/ccode/valaccodevariabledeclarator.vala
==============================================================================
--- trunk/ccode/valaccodevariabledeclarator.vala (original)
+++ trunk/ccode/valaccodevariabledeclarator.vala Sun Apr 13 20:01:07 2008
@@ -34,15 +34,15 @@
/**
* The optional initializer expression.
*/
- public CCodeExpression initializer { get; set; }
-
- public CCodeVariableDeclarator (string _name) {
- name = _name;
+ public CCodeExpression? initializer { get; set; }
+
+ public CCodeVariableDeclarator (string name) {
+ this.name = name;
}
-
- public CCodeVariableDeclarator.with_initializer (string _name, CCodeExpression init) {
- name = _name;
- initializer = init;
+
+ public CCodeVariableDeclarator.with_initializer (string name, CCodeExpression? initializer) {
+ this.name = name;
+ this.initializer = initializer;
}
public override void write (CCodeWriter writer) {
Modified: trunk/ccode/valaccodewriter.vala
==============================================================================
--- trunk/ccode/valaccodewriter.vala (original)
+++ trunk/ccode/valaccodewriter.vala Sun Apr 13 20:01:07 2008
@@ -1,6 +1,6 @@
/* valaccodewriter.vala
*
- * Copyright (C) 2006-2007 JÃrg Billeter
+ * Copyright (C) 2006-2008 JÃrg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -107,7 +107,7 @@
/**
* Writes tabs according to the current indent level.
*/
- public void write_indent (CCodeLineDirective line = null) {
+ public void write_indent (CCodeLineDirective? line = null) {
if (line_directives && line != null) {
line.write (this);
}
Modified: trunk/compiler/valacompiler.vala
==============================================================================
--- trunk/compiler/valacompiler.vala (original)
+++ trunk/compiler/valacompiler.vala Sun Apr 13 20:01:07 2008
@@ -146,7 +146,7 @@
context.library = library;
context.assert = !disable_assert;
context.checking = !disable_checking;
- context.non_null = non_null || non_null_experimental;
+ context.non_null = non_null || non_null_experimental || true;
context.non_null_experimental = non_null_experimental;
Report.set_verbose_errors (verbose);
@@ -293,7 +293,11 @@
if (!ccode_only) {
var ccompiler = new CCodeCompiler ();
- ccompiler.compile (context, cc_command, cc_options);
+ if (cc_options == null) {
+ ccompiler.compile (context, cc_command, cc_options);
+ } else {
+ ccompiler.compile (context, cc_command, new string[] { null });
+ }
}
return quit ();
Modified: trunk/gobject/valaccodecompiler.vala
==============================================================================
--- trunk/gobject/valaccodecompiler.vala (original)
+++ trunk/gobject/valaccodecompiler.vala Sun Apr 13 20:01:07 2008
@@ -49,7 +49,7 @@
* @param context a code context
*/
[NoArrayLength]
- public void compile (CodeContext context, string cc_command, string[] cc_options) {
+ public void compile (CodeContext context, string? cc_command, string[] cc_options) {
string pc = "pkg-config --cflags";
if (!context.compile_only) {
pc += " --libs";
@@ -94,10 +94,8 @@
cmdline += " -o " + Shell.quote (output);
}
cmdline += " " + pkgflags;
- if (cc_options != null) {
- foreach (string cc_option in cc_options) {
- cmdline += " " + cc_option;
- }
+ foreach (string cc_option in cc_options) {
+ cmdline += " " + cc_option;
}
/* make sure include files can be found if -d is used */
Modified: trunk/gobject/valaccodegenerator.vala
==============================================================================
--- trunk/gobject/valaccodegenerator.vala (original)
+++ trunk/gobject/valaccodegenerator.vala Sun Apr 13 20:01:07 2008
@@ -1171,7 +1171,7 @@
list.ccodenode = clist;
}
- public VariableDeclarator get_temp_variable_declarator (DataType type, bool takes_ownership = true, CodeNode node_reference = null) {
+ public VariableDeclarator get_temp_variable_declarator (DataType type, bool takes_ownership = true, CodeNode? node_reference = null) {
var decl = new VariableDeclarator ("_tmp%d".printf (next_temp_var_id));
decl.type_reference = type.copy ();
decl.type_reference.is_ref = false;
@@ -1198,7 +1198,7 @@
}
}
- private CCodeExpression get_dup_func_expression (DataType type, SourceReference source_reference) {
+ private CCodeExpression get_dup_func_expression (DataType type, SourceReference? source_reference) {
if (type.data_type != null) {
string dup_function;
if (type.data_type.is_reference_counting ()) {
@@ -3239,7 +3239,7 @@
return result;
}
- public CCodeExpression get_implicit_cast_expression (CCodeExpression cexpr, DataType expression_type, DataType target_type) {
+ public CCodeExpression get_implicit_cast_expression (CCodeExpression cexpr, DataType? expression_type, DataType target_type) {
if (null == expression_type) {
return cexpr;
}
Modified: trunk/gobject/valaccodegeneratormemberaccess.vala
==============================================================================
--- trunk/gobject/valaccodegeneratormemberaccess.vala (original)
+++ trunk/gobject/valaccodegeneratormemberaccess.vala Sun Apr 13 20:01:07 2008
@@ -24,7 +24,7 @@
using GLib;
public class Vala.CCodeGenerator {
- private void process_cmember (MemberAccess expr, CCodeExpression pub_inst, DataType base_type) {
+ private void process_cmember (MemberAccess expr, CCodeExpression? pub_inst, DataType? base_type) {
if (expr.symbol_reference is Method) {
var m = (Method) expr.symbol_reference;
Modified: trunk/gobject/valaccodegeneratorsignal.vala
==============================================================================
--- trunk/gobject/valaccodegeneratorsignal.vala (original)
+++ trunk/gobject/valaccodegeneratorsignal.vala Sun Apr 13 20:01:07 2008
@@ -36,7 +36,7 @@
}
}
- public string get_signal_marshaller_function (Signal sig, string prefix = null) {
+ public string get_signal_marshaller_function (Signal sig, string? prefix = null) {
var signature = get_signal_signature (sig);
string ret;
var params = sig.get_parameters ();
Modified: trunk/gobject/valadbusmethod.vala
==============================================================================
--- trunk/gobject/valadbusmethod.vala (original)
+++ trunk/gobject/valadbusmethod.vala Sun Apr 13 20:01:07 2008
@@ -27,7 +27,7 @@
* Represents a dynamic bound DBus method.
*/
public class Vala.DBusMethod : Method {
- public DBusMethod (string name, DataType return_type, 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;
Modified: trunk/gobject/valadbussignal.vala
==============================================================================
--- trunk/gobject/valadbussignal.vala (original)
+++ trunk/gobject/valadbussignal.vala Sun Apr 13 20:01:07 2008
@@ -26,7 +26,7 @@
* Represents a dynamic bound DBus signal.
*/
public class Vala.DBusSignal : Signal {
- public DBusSignal (string name, DataType return_type, 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;
Modified: trunk/tests/classes-properties.vala
==============================================================================
--- trunk/tests/classes-properties.vala (original)
+++ trunk/tests/classes-properties.vala Sun Apr 13 20:01:07 2008
@@ -15,7 +15,8 @@
get { return _read_only; }
}
- public Sample(construct string! name) {
+ public Sample (string name) {
+ this.name = name;
}
construct {
Modified: trunk/vala/valaaddressofexpression.vala
==============================================================================
--- trunk/vala/valaaddressofexpression.vala (original)
+++ trunk/vala/valaaddressofexpression.vala Sun Apr 13 20:01:07 2008
@@ -47,7 +47,7 @@
* @param inner variable whose address is to be computed
* @return newly created address-of expression
*/
- public AddressofExpression (Expression inner, SourceReference source_reference = null) {
+ public AddressofExpression (Expression inner, SourceReference? source_reference = null) {
this.source_reference = source_reference;
this.inner = inner;
}
Modified: trunk/vala/valaarraycreationexpression.vala
==============================================================================
--- trunk/vala/valaarraycreationexpression.vala (original)
+++ trunk/vala/valaarraycreationexpression.vala Sun Apr 13 20:01:07 2008
@@ -1,6 +1,6 @@
/* valaarraycreationexpression.vala
*
- * Copyright (C) 2006-2007 Raffaele Sandrini, JÃrg Billeter
+ * Copyright (C) 2006-2008 Raffaele Sandrini, JÃrg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -52,7 +52,7 @@
/**
* The root array initializer list.
*/
- public InitializerList initializer_list { get; set construct; }
+ public InitializerList? initializer_list { get; set construct; }
private DataType _element_type;
@@ -70,11 +70,11 @@
return new ReadOnlyList<Expression> (sizes);
}
- public ArrayCreationExpression (DataType element_type, int rank, InitializerList initializer_list, SourceReference source_reference) {
+ public ArrayCreationExpression (DataType element_type, int rank, InitializerList? initializer_list, SourceReference source_reference) {
+ this.element_type = element_type;
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) {
Modified: trunk/vala/valaarraytype.vala
==============================================================================
--- trunk/vala/valaarraytype.vala (original)
+++ trunk/vala/valaarraytype.vala Sun Apr 13 20:01:07 2008
@@ -40,7 +40,7 @@
private ArrayResizeMethod resize_method;
private ArrayMoveMethod move_method;
- public ArrayType (DataType element_type, int rank, SourceReference source_reference) {
+ public ArrayType (DataType element_type, int rank, SourceReference? source_reference) {
this.element_type = element_type;
this.rank = rank;
this.source_reference = source_reference;
Modified: trunk/vala/valaassignment.vala
==============================================================================
--- trunk/vala/valaassignment.vala (original)
+++ trunk/vala/valaassignment.vala Sun Apr 13 20:01:07 2008
@@ -67,7 +67,7 @@
* @param source_reference reference to source code
* @return newly created assignment
*/
- public Assignment (Expression left, Expression right, AssignmentOperator operator = AssignmentOperator.SIMPLE, 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;
Modified: trunk/vala/valaattribute.vala
==============================================================================
--- trunk/vala/valaattribute.vala (original)
+++ trunk/vala/valaattribute.vala Sun Apr 13 20:01:07 2008
@@ -44,9 +44,9 @@
* @param source_reference reference to source code
* @return newly created attribute
*/
- public Attribute (string name, SourceReference source_reference) {
- this.source_reference = source_reference;
+ public Attribute (string name, SourceReference? source_reference) {
this.name = name;
+ this.source_reference = source_reference;
}
/**
Modified: trunk/vala/valabaseaccess.vala
==============================================================================
--- trunk/vala/valabaseaccess.vala (original)
+++ trunk/vala/valabaseaccess.vala Sun Apr 13 20:01:07 2008
@@ -32,7 +32,7 @@
* @param source reference to source code
* @return newly created base access expression
*/
- public BaseAccess (SourceReference source = null) {
+ public BaseAccess (SourceReference? source = null) {
source_reference = source;
}
Modified: trunk/vala/valabinaryexpression.vala
==============================================================================
--- trunk/vala/valabinaryexpression.vala (original)
+++ trunk/vala/valabinaryexpression.vala Sun Apr 13 20:01:07 2008
@@ -71,7 +71,7 @@
* @param source reference to source code
* @return newly created binary expression
*/
- public BinaryExpression (BinaryOperator op, Expression _left, Expression _right, SourceReference source = null) {
+ public BinaryExpression (BinaryOperator op, Expression _left, Expression _right, SourceReference? source = null) {
operator = op;
left = _left;
right = _right;
Modified: trunk/vala/valablock.vala
==============================================================================
--- trunk/vala/valablock.vala (original)
+++ trunk/vala/valablock.vala Sun Apr 13 20:01:07 2008
@@ -41,7 +41,7 @@
*
* @param source reference to source code
*/
- public Block (SourceReference source_reference = null) {
+ public Block (SourceReference? source_reference = null) {
this.source_reference = source_reference;
}
Modified: trunk/vala/valacatchclause.vala
==============================================================================
--- trunk/vala/valacatchclause.vala (original)
+++ trunk/vala/valacatchclause.vala Sun Apr 13 20:01:07 2008
@@ -65,7 +65,7 @@
* @param source_reference reference to source code
* @return newly created catch clause
*/
- public CatchClause (DataType? type_reference, string variable_name, Block body, 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;
Modified: trunk/vala/valaclass.vala
==============================================================================
--- trunk/vala/valaclass.vala (original)
+++ trunk/vala/valaclass.vala Sun Apr 13 20:01:07 2008
@@ -111,7 +111,7 @@
* @param source reference to source code
* @return newly created class
*/
- public Class (string name, SourceReference source_reference = null) {
+ public Class (string name, SourceReference? source_reference = null) {
this.source_reference = source_reference;
this.name = name;
}
@@ -456,7 +456,7 @@
return lower_case_csuffix;
}
- public override string get_lower_case_cname (string infix) {
+ public override string? get_lower_case_cname (string? infix) {
if (infix == null) {
infix = "";
}
@@ -470,7 +470,7 @@
return lower_case_cprefix;
}
- public override string get_upper_case_cname (string infix) {
+ public override string get_upper_case_cname (string? infix) {
return get_lower_case_cname (infix).up ();
}
Modified: trunk/vala/valacodecontext.vala
==============================================================================
--- trunk/vala/valacodecontext.vala (original)
+++ trunk/vala/valacodecontext.vala Sun Apr 13 20:01:07 2008
@@ -409,49 +409,49 @@
return null;
}
- public Namespace create_namespace (string name, SourceReference source_reference = null) {
+ public Namespace create_namespace (string name, SourceReference? source_reference = null) {
var node = new Namespace (name, source_reference);
node.code_binding = codegen.create_namespace_binding (node);
return node;
}
- public Class create_class (string name, SourceReference source_reference = null) {
+ public Class create_class (string name, SourceReference? source_reference = null) {
var node = new Class (name, source_reference);
node.code_binding = codegen.create_class_binding (node);
return node;
}
- public Struct create_struct (string name, SourceReference source_reference = null) {
+ public Struct create_struct (string name, SourceReference? source_reference = null) {
var node = new Struct (name, source_reference);
node.code_binding = codegen.create_struct_binding (node);
return node;
}
- public Interface create_interface (string name, SourceReference source_reference = null) {
+ public Interface create_interface (string name, SourceReference? source_reference = null) {
var node = new Interface (name, source_reference);
node.code_binding = codegen.create_interface_binding (node);
return node;
}
- public Enum create_enum (string name, SourceReference source_reference = null) {
+ public Enum create_enum (string name, SourceReference? source_reference = null) {
var node = new Enum (name, source_reference);
node.code_binding = codegen.create_enum_binding (node);
return node;
}
- public EnumValue create_enum_value (string name, SourceReference source_reference = null) {
+ public EnumValue create_enum_value (string name, SourceReference? source_reference = null) {
var node = new EnumValue (name, source_reference);
node.code_binding = codegen.create_enum_value_binding (node);
return node;
}
- public EnumValue create_enum_value_with_value (string name, Expression value, SourceReference source_reference = null) {
+ public EnumValue create_enum_value_with_value (string name, Expression? value, SourceReference? source_reference = null) {
var node = new EnumValue.with_value (name, value, source_reference);
node.code_binding = codegen.create_enum_value_binding (node);
return node;
}
- public ErrorDomain create_error_domain (string name, SourceReference source_reference = null) {
+ public ErrorDomain create_error_domain (string name, SourceReference? source_reference = null) {
var node = new ErrorDomain (name, source_reference);
node.code_binding = codegen.create_error_domain_binding (node);
return node;
@@ -463,409 +463,409 @@
return node;
}
- public ErrorCode create_error_code_with_value (string name, Expression value) {
+ public ErrorCode create_error_code_with_value (string name, Expression? value) {
var node = new ErrorCode.with_value (name, value);
node.code_binding = codegen.create_error_code_binding (node);
return node;
}
- public Delegate create_delegate (string name, DataType return_type, SourceReference source_reference = null) {
+ public Delegate create_delegate (string? name, DataType return_type, SourceReference? source_reference = null) {
var node = new Delegate (name, return_type, source_reference);
node.code_binding = codegen.create_delegate_binding (node);
return node;
}
- public Constant create_constant (string name, DataType type_reference, Expression initializer, SourceReference source_reference) {
+ public Constant create_constant (string name, DataType type_reference, Expression? initializer, SourceReference? source_reference) {
var node = new Constant (name, type_reference, initializer, source_reference);
node.code_binding = codegen.create_constant_binding (node);
return node;
}
- public Field create_field (string name, DataType type_reference, Expression initializer, SourceReference source_reference = null) {
+ public Field create_field (string name, DataType type_reference, Expression? initializer, SourceReference? source_reference = null) {
var node = new Field (name, type_reference, initializer, source_reference);
node.code_binding = codegen.create_field_binding (node);
return node;
}
- public Method create_method (string name, DataType return_type, SourceReference source_reference = null) {
+ public Method create_method (string name, DataType return_type, SourceReference? source_reference = null) {
var node = new Method (name, return_type, source_reference);
node.code_binding = codegen.create_method_binding (node);
return node;
}
- public CreationMethod create_creation_method (string type_name, string name, SourceReference source_reference = null) {
+ public CreationMethod create_creation_method (string type_name, string? name, SourceReference? source_reference = null) {
var node = new CreationMethod (type_name, name, source_reference);
node.code_binding = codegen.create_creation_method_binding (node);
return node;
}
- public FormalParameter create_formal_parameter (string name, DataType type_reference, SourceReference source_reference = null) {
+ public FormalParameter create_formal_parameter (string name, DataType type_reference, SourceReference? source_reference = null) {
var node = new FormalParameter (name, type_reference, source_reference);
node.code_binding = codegen.create_formal_parameter_binding (node);
return node;
}
- public FormalParameter create_formal_parameter_with_ellipsis (SourceReference source_reference = null) {
+ public FormalParameter create_formal_parameter_with_ellipsis (SourceReference? source_reference = null) {
var node = new FormalParameter.with_ellipsis (source_reference);
node.code_binding = codegen.create_formal_parameter_binding (node);
return node;
}
- public Property create_property (string name, DataType type_reference, PropertyAccessor get_accessor, PropertyAccessor set_accessor, SourceReference source_reference) {
+ public Property create_property (string name, DataType type_reference, PropertyAccessor? get_accessor, PropertyAccessor? set_accessor, SourceReference? source_reference) {
var node = new Property (name, type_reference, get_accessor, set_accessor, source_reference);
node.code_binding = codegen.create_property_binding (node);
return node;
}
- public PropertyAccessor create_property_accessor (bool readable, bool writable, bool construction, Block body, SourceReference source_reference) {
+ public PropertyAccessor create_property_accessor (bool readable, bool writable, bool construction, Block? body, SourceReference? source_reference) {
var node = new PropertyAccessor (readable, writable, construction, body, source_reference);
node.code_binding = codegen.create_property_accessor_binding (node);
return node;
}
- public Signal create_signal (string name, DataType return_type, SourceReference source_reference = null) {
+ public Signal create_signal (string name, DataType return_type, SourceReference? source_reference = null) {
var node = new Signal (name, return_type, source_reference);
node.code_binding = codegen.create_signal_binding (node);
return node;
}
- public Constructor create_constructor (SourceReference source_reference) {
+ public Constructor create_constructor (SourceReference? source_reference) {
var node = new Constructor (source_reference);
node.code_binding = codegen.create_constructor_binding (node);
return node;
}
- public Destructor create_destructor (SourceReference source_reference = null) {
+ public Destructor create_destructor (SourceReference? source_reference = null) {
var node = new Destructor (source_reference);
node.code_binding = codegen.create_destructor_binding (node);
return node;
}
- public TypeParameter create_type_parameter (string name, SourceReference source_reference) {
+ public TypeParameter create_type_parameter (string name, SourceReference? source_reference) {
var node = new TypeParameter (name, source_reference);
node.code_binding = codegen.create_type_parameter_binding (node);
return node;
}
- public Block create_block (SourceReference source_reference = null) {
+ public Block create_block (SourceReference? source_reference = null) {
var node = new Block (source_reference);
node.code_binding = codegen.create_block_binding (node);
return node;
}
- public EmptyStatement create_empty_statement (SourceReference source_reference = null) {
+ public EmptyStatement create_empty_statement (SourceReference? source_reference = null) {
var node = new EmptyStatement (source_reference);
node.code_binding = codegen.create_empty_statement_binding (node);
return node;
}
- public DeclarationStatement create_declaration_statement (LocalVariableDeclaration declaration, SourceReference source_reference) {
+ public DeclarationStatement create_declaration_statement (LocalVariableDeclaration declaration, SourceReference? source_reference) {
var node = new DeclarationStatement (declaration, source_reference);
node.code_binding = codegen.create_declaration_statement_binding (node);
return node;
}
- public LocalVariableDeclaration create_local_variable_declaration (DataType type_reference, SourceReference source_reference) {
+ public LocalVariableDeclaration create_local_variable_declaration (DataType type_reference, SourceReference? source_reference) {
var node = new LocalVariableDeclaration (type_reference, source_reference);
node.code_binding = codegen.create_local_variable_declaration_binding (node);
return node;
}
- public LocalVariableDeclaration create_local_variable_declaration_var_type (SourceReference source_reference) {
+ public LocalVariableDeclaration create_local_variable_declaration_var_type (SourceReference? source_reference) {
var node = new LocalVariableDeclaration.var_type (source_reference);
node.code_binding = codegen.create_local_variable_declaration_binding (node);
return node;
}
- public VariableDeclarator create_variable_declarator (string name, Expression initializer = null, SourceReference source_reference = null) {
+ public VariableDeclarator create_variable_declarator (string name, Expression? initializer = null, SourceReference? source_reference = null) {
var node = new VariableDeclarator (name, initializer, source_reference);
node.code_binding = codegen.create_variable_declarator_binding (node);
return node;
}
- public InitializerList create_initializer_list (SourceReference source_reference) {
+ public InitializerList create_initializer_list (SourceReference? source_reference) {
var node = new InitializerList (source_reference);
node.code_binding = codegen.create_initializer_list_binding (node);
return node;
}
- public ExpressionStatement create_expression_statement (Expression expression, SourceReference source_reference = null) {
+ public ExpressionStatement create_expression_statement (Expression expression, SourceReference? source_reference = null) {
var node = new ExpressionStatement (expression, source_reference);
node.code_binding = codegen.create_expression_statement_binding (node);
return node;
}
- public IfStatement create_if_statement (Expression condition, Block true_statement, Block false_statement, SourceReference source_reference) {
+ public IfStatement create_if_statement (Expression condition, Block true_statement, Block? false_statement, SourceReference? source_reference) {
var node = new IfStatement (condition, true_statement, false_statement, source_reference);
node.code_binding = codegen.create_if_statement_binding (node);
return node;
}
- public SwitchStatement create_switch_statement (Expression expression, SourceReference source_reference) {
+ public SwitchStatement create_switch_statement (Expression expression, SourceReference? source_reference) {
var node = new SwitchStatement (expression, source_reference);
node.code_binding = codegen.create_switch_statement_binding (node);
return node;
}
- public SwitchSection create_switch_section (SourceReference source_reference) {
+ public SwitchSection create_switch_section (SourceReference? source_reference) {
var node = new SwitchSection (source_reference);
node.code_binding = codegen.create_switch_section_binding (node);
return node;
}
- public SwitchLabel create_switch_label (Expression expression, SourceReference source_reference = null) {
+ public SwitchLabel create_switch_label (Expression expression, SourceReference? source_reference = null) {
var node = new SwitchLabel (expression, source_reference);
node.code_binding = codegen.create_switch_label_binding (node);
return node;
}
- public SwitchLabel create_switch_label_with_default (SourceReference source_reference = null) {
+ public SwitchLabel create_switch_label_with_default (SourceReference? source_reference = null) {
var node = new SwitchLabel.with_default (source_reference);
node.code_binding = codegen.create_switch_label_binding (node);
return node;
}
- public WhileStatement create_while_statement (Expression condition, Block body, SourceReference source_reference = null) {
+ public WhileStatement create_while_statement (Expression condition, Block body, SourceReference? source_reference = null) {
var node = new WhileStatement (condition, body, source_reference);
node.code_binding = codegen.create_while_statement_binding (node);
return node;
}
- public DoStatement create_do_statement (Block body, Expression condition, SourceReference source_reference = null) {
+ public DoStatement create_do_statement (Block body, Expression condition, SourceReference? source_reference = null) {
var node = new DoStatement (body, condition, source_reference);
node.code_binding = codegen.create_do_statement_binding (node);
return node;
}
- public ForStatement create_for_statement (Expression condition, Block body, SourceReference source_reference = null) {
+ public ForStatement create_for_statement (Expression condition, Block body, SourceReference? source_reference = null) {
var node = new ForStatement (condition, body, source_reference);
node.code_binding = codegen.create_for_statement_binding (node);
return node;
}
- public ForeachStatement create_foreach_statement (DataType type_reference, string variable_name, Expression collection, Block body, SourceReference source_reference) {
+ public ForeachStatement create_foreach_statement (DataType type_reference, string variable_name, Expression collection, Block body, SourceReference? source_reference) {
var node = new ForeachStatement (type_reference, variable_name, collection, body, source_reference);
node.code_binding = codegen.create_foreach_statement_binding (node);
return node;
}
- public BreakStatement create_break_statement (SourceReference source_reference) {
+ public BreakStatement create_break_statement (SourceReference? source_reference) {
var node = new BreakStatement (source_reference);
node.code_binding = codegen.create_break_statement_binding (node);
return node;
}
- public ContinueStatement create_continue_statement (SourceReference source_reference) {
+ public ContinueStatement create_continue_statement (SourceReference? source_reference) {
var node = new ContinueStatement (source_reference);
node.code_binding = codegen.create_continue_statement_binding (node);
return node;
}
- public ReturnStatement create_return_statement (Expression return_expression = null, SourceReference source_reference = null) {
+ public ReturnStatement create_return_statement (Expression? return_expression = null, SourceReference? source_reference = null) {
var node = new ReturnStatement (return_expression, source_reference);
node.code_binding = codegen.create_return_statement_binding (node);
return node;
}
- public ThrowStatement create_throw_statement (Expression error_expression, SourceReference source_reference = null) {
+ public ThrowStatement create_throw_statement (Expression error_expression, SourceReference? source_reference = null) {
var node = new ThrowStatement (error_expression, source_reference);
node.code_binding = codegen.create_throw_statement_binding (node);
return node;
}
- public TryStatement create_try_statement (Block body, Block finally_body, SourceReference source_reference = null) {
+ public TryStatement create_try_statement (Block body, Block? finally_body, SourceReference? source_reference = null) {
var node = new TryStatement (body, finally_body, source_reference);
node.code_binding = codegen.create_try_statement_binding (node);
return node;
}
- public CatchClause create_catch_clause (DataType type_reference, string variable_name, Block body, SourceReference source_reference = null) {
+ public CatchClause create_catch_clause (DataType type_reference, string variable_name, Block body, SourceReference? source_reference = null) {
var node = new CatchClause (type_reference, variable_name, body, source_reference);
node.code_binding = codegen.create_catch_clause_binding (node);
return node;
}
- public LockStatement create_lock_statement (Expression resource, Block body, SourceReference source_reference = null) {
+ public LockStatement create_lock_statement (Expression resource, Block body, SourceReference? source_reference = null) {
var node = new LockStatement (resource, body, source_reference);
node.code_binding = codegen.create_lock_statement_binding (node);
return node;
}
- public DeleteStatement create_delete_statement (Expression expression, SourceReference source_reference = null) {
+ public DeleteStatement create_delete_statement (Expression expression, SourceReference? source_reference = null) {
var node = new DeleteStatement (expression, source_reference);
node.code_binding = codegen.create_delete_statement_binding (node);
return node;
}
- public ArrayCreationExpression create_array_creation_expression (DataType element_type, int rank, InitializerList initializer_list, SourceReference source_reference) {
+ public ArrayCreationExpression create_array_creation_expression (DataType element_type, int rank, InitializerList? initializer_list, SourceReference? source_reference) {
var node = new ArrayCreationExpression (element_type, rank, initializer_list, source_reference);
node.code_binding = codegen.create_array_creation_expression_binding (node);
return node;
}
- public BooleanLiteral create_boolean_literal (bool value, SourceReference source_reference) {
+ public BooleanLiteral create_boolean_literal (bool value, SourceReference? source_reference) {
var node = new BooleanLiteral (value, source_reference);
node.code_binding = codegen.create_boolean_literal_binding (node);
return node;
}
- public CharacterLiteral create_character_literal (string value, SourceReference source_reference) {
+ public CharacterLiteral create_character_literal (string value, SourceReference? source_reference) {
var node = new CharacterLiteral (value, source_reference);
node.code_binding = codegen.create_character_literal_binding (node);
return node;
}
- public IntegerLiteral create_integer_literal (string value, SourceReference source_reference = null) {
+ public IntegerLiteral create_integer_literal (string value, SourceReference? source_reference = null) {
var node = new IntegerLiteral (value, source_reference);
node.code_binding = codegen.create_integer_literal_binding (node);
return node;
}
- public RealLiteral create_real_literal (string value, SourceReference source_reference) {
+ public RealLiteral create_real_literal (string value, SourceReference? source_reference) {
var node = new RealLiteral (value, source_reference);
node.code_binding = codegen.create_real_literal_binding (node);
return node;
}
- public StringLiteral create_string_literal (string value, SourceReference source_reference) {
+ public StringLiteral create_string_literal (string value, SourceReference? source_reference) {
var node = new StringLiteral (value, source_reference);
node.code_binding = codegen.create_string_literal_binding (node);
return node;
}
- public NullLiteral create_null_literal (SourceReference source_reference = null) {
+ public NullLiteral create_null_literal (SourceReference? source_reference = null) {
var node = new NullLiteral (source_reference);
node.code_binding = codegen.create_null_literal_binding (node);
return node;
}
- public ParenthesizedExpression create_parenthesized_expression (Expression inner, SourceReference source_reference) {
+ public ParenthesizedExpression create_parenthesized_expression (Expression inner, SourceReference? source_reference) {
var node = new ParenthesizedExpression (inner, source_reference);
node.code_binding = codegen.create_parenthesized_expression_binding (node);
return node;
}
- public MemberAccess create_member_access (Expression inner, string member_name, SourceReference source_reference = null) {
+ public MemberAccess create_member_access (Expression? inner, string member_name, SourceReference? source_reference = null) {
var node = new MemberAccess (inner, member_name, source_reference);
node.code_binding = codegen.create_member_access_binding (node);
return node;
}
- public MemberAccess create_member_access_simple (string member_name, SourceReference source_reference = null) {
+ public MemberAccess create_member_access_simple (string member_name, SourceReference? source_reference = null) {
var node = new MemberAccess.simple (member_name, source_reference);
node.code_binding = codegen.create_member_access_binding (node);
return node;
}
- public MemberAccess create_member_access_pointer (Expression inner, string member_name, SourceReference source_reference = null) {
+ public MemberAccess create_member_access_pointer (Expression inner, string member_name, SourceReference? source_reference = null) {
var node = new MemberAccess.pointer (inner, member_name, source_reference);
node.code_binding = codegen.create_member_access_binding (node);
return node;
}
- public InvocationExpression create_invocation_expression (Expression call, SourceReference source_reference = null) {
+ public InvocationExpression create_invocation_expression (Expression call, SourceReference? source_reference = null) {
var node = new InvocationExpression (call, source_reference);
node.code_binding = codegen.create_invocation_expression_binding (node);
return node;
}
- public ElementAccess create_element_access (Expression container, SourceReference source_reference) {
+ public ElementAccess create_element_access (Expression container, SourceReference? source_reference) {
var node = new ElementAccess (container, source_reference);
node.code_binding = codegen.create_element_access_binding (node);
return node;
}
- public BaseAccess create_base_access (SourceReference source_reference = null) {
+ public BaseAccess create_base_access (SourceReference? source_reference = null) {
var node = new BaseAccess (source_reference);
node.code_binding = codegen.create_base_access_binding (node);
return node;
}
- public PostfixExpression create_postfix_expression (Expression inner, bool increment, SourceReference source_reference) {
+ public PostfixExpression create_postfix_expression (Expression inner, bool increment, SourceReference? source_reference) {
var node = new PostfixExpression (inner, increment, source_reference);
node.code_binding = codegen.create_postfix_expression_binding (node);
return node;
}
- public ObjectCreationExpression create_object_creation_expression (MemberAccess member_name, SourceReference source_reference) {
+ public ObjectCreationExpression create_object_creation_expression (MemberAccess member_name, SourceReference? source_reference) {
var node = new ObjectCreationExpression (member_name, source_reference);
node.code_binding = codegen.create_object_creation_expression_binding (node);
return node;
}
- public SizeofExpression create_sizeof_expression (DataType type_reference, SourceReference source_reference) {
+ public SizeofExpression create_sizeof_expression (DataType type_reference, SourceReference? source_reference) {
var node = new SizeofExpression (type_reference, source_reference);
node.code_binding = codegen.create_sizeof_expression_binding (node);
return node;
}
- public TypeofExpression create_typeof_expression (DataType type_reference, SourceReference source_reference) {
+ public TypeofExpression create_typeof_expression (DataType type_reference, SourceReference? source_reference) {
var node = new TypeofExpression (type_reference, source_reference);
node.code_binding = codegen.create_typeof_expression_binding (node);
return node;
}
- public UnaryExpression create_unary_expression (UnaryOperator operator, Expression inner, SourceReference source_reference) {
+ public UnaryExpression create_unary_expression (UnaryOperator operator, Expression inner, SourceReference? source_reference) {
var node = new UnaryExpression (operator, inner, source_reference);
node.code_binding = codegen.create_unary_expression_binding (node);
return node;
}
- public CastExpression create_cast_expression (Expression inner, DataType type_reference, SourceReference source_reference, bool is_silent_cast) {
+ public CastExpression create_cast_expression (Expression inner, DataType type_reference, SourceReference? source_reference, bool is_silent_cast) {
var node = new CastExpression (inner, type_reference, source_reference, is_silent_cast);
node.code_binding = codegen.create_cast_expression_binding (node);
return node;
}
- public PointerIndirection create_pointer_indirection (Expression inner, SourceReference source_reference = null) {
+ public PointerIndirection create_pointer_indirection (Expression inner, SourceReference? source_reference = null) {
var node = new PointerIndirection (inner, source_reference);
node.code_binding = codegen.create_pointer_indirection_binding (node);
return node;
}
- public AddressofExpression create_addressof_expression (Expression inner, SourceReference source_reference = null) {
+ public AddressofExpression create_addressof_expression (Expression inner, SourceReference? source_reference = null) {
var node = new AddressofExpression (inner, source_reference);
node.code_binding = codegen.create_addressof_expression_binding (node);
return node;
}
- public ReferenceTransferExpression create_reference_transfer_expression (Expression inner, SourceReference source_reference = null) {
+ public ReferenceTransferExpression create_reference_transfer_expression (Expression inner, SourceReference? source_reference = null) {
var node = new ReferenceTransferExpression (inner, source_reference);
node.code_binding = codegen.create_reference_transfer_expression_binding (node);
return node;
}
- public BinaryExpression create_binary_expression (BinaryOperator operator, Expression left, Expression right, SourceReference source_reference = null) {
+ public BinaryExpression create_binary_expression (BinaryOperator operator, Expression left, Expression right, SourceReference? source_reference = null) {
var node = new BinaryExpression (operator, left, right, source_reference);
node.code_binding = codegen.create_binary_expression_binding (node);
return node;
}
- public TypeCheck create_type_check (Expression expression, DataType type_reference, SourceReference source_reference) {
+ public TypeCheck create_type_check (Expression expression, DataType type_reference, SourceReference? source_reference) {
var node = new TypeCheck (expression, type_reference, source_reference);
node.code_binding = codegen.create_type_check_binding (node);
return node;
}
- public ConditionalExpression create_conditional_expression (Expression condition, Expression true_expression, Expression false_expression, SourceReference source_reference) {
+ public ConditionalExpression create_conditional_expression (Expression condition, Expression true_expression, Expression false_expression, SourceReference? source_reference) {
var node = new ConditionalExpression (condition, true_expression, false_expression, source_reference);
node.code_binding = codegen.create_conditional_expression_binding (node);
return node;
}
- public LambdaExpression create_lambda_expression (Expression expression_body, SourceReference source_reference) {
+ public LambdaExpression create_lambda_expression (Expression expression_body, SourceReference? source_reference) {
var node = new LambdaExpression (expression_body, source_reference);
node.code_binding = codegen.create_lambda_expression_binding (node);
return node;
}
- public LambdaExpression create_lambda_expression_with_statement_body (Block statement_body, SourceReference source_reference) {
+ public LambdaExpression create_lambda_expression_with_statement_body (Block statement_body, SourceReference? source_reference) {
var node = new LambdaExpression.with_statement_body (statement_body, source_reference);
node.code_binding = codegen.create_lambda_expression_binding (node);
return node;
}
- public Assignment create_assignment (Expression left, Expression right, AssignmentOperator operator = AssignmentOperator.SIMPLE, SourceReference source_reference = null) {
+ public Assignment create_assignment (Expression left, Expression right, AssignmentOperator operator = AssignmentOperator.SIMPLE, SourceReference? source_reference = null) {
var node = new Assignment (left, right, operator, source_reference);
node.code_binding = codegen.create_assignment_binding (node);
return node;
Modified: trunk/vala/valaconstant.vala
==============================================================================
--- trunk/vala/valaconstant.vala (original)
+++ trunk/vala/valaconstant.vala Sun Apr 13 20:01:07 2008
@@ -1,6 +1,6 @@
/* valaconstant.vala
*
- * Copyright (C) 2006-2007 JÃrg Billeter
+ * Copyright (C) 2006-2008 JÃrg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -57,11 +57,11 @@
* @param source_reference reference to source code
* @return newly created constant
*/
- public Constant (string name, DataType type_reference, Expression initializer, SourceReference source_reference) {
+ public Constant (string name, DataType type_reference, Expression? initializer, SourceReference? source_reference) {
+ this.name = name;
this.type_reference = type_reference;
this.initializer = initializer;
this.source_reference = source_reference;
- this.name = name;
}
public override void accept (CodeVisitor visitor) {
Modified: trunk/vala/valacreationmethod.vala
==============================================================================
--- trunk/vala/valacreationmethod.vala (original)
+++ trunk/vala/valacreationmethod.vala Sun Apr 13 20:01:07 2008
@@ -44,7 +44,7 @@
* @param source_reference reference to source code
* @return newly created method
*/
- public CreationMethod (string type_name, string name, 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;
Modified: trunk/vala/valadatatype.vala
==============================================================================
--- trunk/vala/valadatatype.vala (original)
+++ trunk/vala/valadatatype.vala Sun Apr 13 20:01:07 2008
@@ -183,7 +183,7 @@
* name or null
* @return the lower case name to be used in C code
*/
- public virtual string get_lower_case_cname (string infix = null) {
+ public virtual string? get_lower_case_cname (string? infix = null) {
return data_type.get_lower_case_cname (infix);
}
Modified: trunk/vala/valadelegate.vala
==============================================================================
--- trunk/vala/valadelegate.vala (original)
+++ trunk/vala/valadelegate.vala Sun Apr 13 20:01:07 2008
@@ -94,10 +94,10 @@
* @param source reference to source code
* @return newly created delegate
*/
- public Delegate (string name, DataType return_type, SourceReference source_reference = null) {
+ public Delegate (string? name, DataType return_type, SourceReference? source_reference = null) {
+ this.name = name;
this.return_type = return_type;
this.source_reference = source_reference;
- this.name = name;
}
construct {
Modified: trunk/vala/valadeletestatement.vala
==============================================================================
--- trunk/vala/valadeletestatement.vala (original)
+++ trunk/vala/valadeletestatement.vala Sun Apr 13 20:01:07 2008
@@ -31,7 +31,7 @@
*/
public Expression expression { get; set; }
- public DeleteStatement (Expression expression, SourceReference source_reference = null) {
+ public DeleteStatement (Expression expression, SourceReference? source_reference = null) {
this.expression = expression;
this.source_reference = source_reference;
}
Modified: trunk/vala/valadestructor.vala
==============================================================================
--- trunk/vala/valadestructor.vala (original)
+++ trunk/vala/valadestructor.vala Sun Apr 13 20:01:07 2008
@@ -47,7 +47,7 @@
* @param source_reference reference to source code
* @return newly created destructor
*/
- public Destructor (SourceReference source_reference = null) {
+ public Destructor (SourceReference? source_reference = null) {
this.source_reference = source_reference;
}
Modified: trunk/vala/valadostatement.vala
==============================================================================
--- trunk/vala/valadostatement.vala (original)
+++ trunk/vala/valadostatement.vala Sun Apr 13 20:01:07 2008
@@ -63,7 +63,7 @@
* @param source reference to source code
* @return newly created do statement
*/
- public DoStatement (Block body, Expression condition, 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;
Modified: trunk/vala/valaenum.vala
==============================================================================
--- trunk/vala/valaenum.vala (original)
+++ trunk/vala/valaenum.vala Sun Apr 13 20:01:07 2008
@@ -52,7 +52,7 @@
* @param source_reference reference to source code
* @return newly created enum
*/
- public Enum (string name, SourceReference source_reference = null) {
+ public Enum (string name, SourceReference? source_reference = null) {
this.source_reference = source_reference;
this.name = name;
}
@@ -141,14 +141,14 @@
return lower_case_csuffix;
}
- public override string get_lower_case_cname (string infix) {
+ public override string? get_lower_case_cname (string? infix) {
if (infix == null) {
infix = "";
}
return "%s%s%s".printf (parent_symbol.get_lower_case_cprefix (), infix, get_lower_case_csuffix ());
}
- public override string get_upper_case_cname (string infix = null) {
+ public override string get_upper_case_cname (string? infix = null) {
return get_lower_case_cname (infix).up ();
}
Modified: trunk/vala/valaenumvalue.vala
==============================================================================
--- trunk/vala/valaenumvalue.vala (original)
+++ trunk/vala/valaenumvalue.vala Sun Apr 13 20:01:07 2008
@@ -39,7 +39,7 @@
* @param name enum value name
* @return newly created enum value
*/
- public EnumValue (string name, SourceReference source_reference = null) {
+ public EnumValue (string name, SourceReference? source_reference = null) {
this.name = name;
this.source_reference = source_reference;
}
@@ -51,7 +51,7 @@
* @param value numerical representation
* @return newly created enum value
*/
- public EnumValue.with_value (string name, 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;
Modified: trunk/vala/valaerrordomain.vala
==============================================================================
--- trunk/vala/valaerrordomain.vala (original)
+++ trunk/vala/valaerrordomain.vala Sun Apr 13 20:01:07 2008
@@ -41,7 +41,7 @@
* @param source_reference reference to source code
* @return newly created error domain
*/
- public ErrorDomain (string name, SourceReference source_reference = null) {
+ public ErrorDomain (string name, SourceReference? source_reference = null) {
this.source_reference = source_reference;
this.name = name;
}
@@ -130,14 +130,14 @@
return lower_case_csuffix;
}
- public override string get_lower_case_cname (string infix) {
+ public override string? get_lower_case_cname (string? infix) {
if (infix == null) {
infix = "";
}
return "%s%s%s".printf (parent_symbol.get_lower_case_cprefix (), infix, get_lower_case_csuffix ());
}
- public override string get_upper_case_cname (string infix) {
+ public override string get_upper_case_cname (string? infix) {
return get_lower_case_cname (null).up ();
}
Modified: trunk/vala/valaerrortype.vala
==============================================================================
--- trunk/vala/valaerrortype.vala (original)
+++ trunk/vala/valaerrortype.vala Sun Apr 13 20:01:07 2008
@@ -32,7 +32,7 @@
*/
public weak ErrorDomain? error_domain { get; set; }
- public ErrorType (ErrorDomain? error_domain, SourceReference source_reference) {
+ public ErrorType (ErrorDomain? error_domain, SourceReference? source_reference) {
this.error_domain = error_domain;
this.data_type = error_domain;
this.source_reference = source_reference;
@@ -76,7 +76,7 @@
return "GError*";
}
- public override string get_lower_case_cname (string infix = null) {
+ public override string? get_lower_case_cname (string? infix = null) {
if (error_domain == null) {
if (infix == null) {
return "g_error";
Modified: trunk/vala/valaexpressionstatement.vala
==============================================================================
--- trunk/vala/valaexpressionstatement.vala (original)
+++ trunk/vala/valaexpressionstatement.vala Sun Apr 13 20:01:07 2008
@@ -49,7 +49,7 @@
* @param source reference to source code
* @return newly created expression statement
*/
- public ExpressionStatement (Expression expression, SourceReference source_reference = null) {
+ public ExpressionStatement (Expression expression, SourceReference? source_reference = null) {
this.source_reference = source_reference;
this.expression = expression;
}
Modified: trunk/vala/valafield.vala
==============================================================================
--- trunk/vala/valafield.vala (original)
+++ trunk/vala/valafield.vala Sun Apr 13 20:01:07 2008
@@ -1,6 +1,6 @@
/* valafield.vala
*
- * Copyright (C) 2006-2007 JÃrg Billeter
+ * Copyright (C) 2006-2008 JÃrg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -80,7 +80,7 @@
* @param source reference to source code
* @return newly created field
*/
- public Field (string name, DataType type_reference, Expression initializer, 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;
Modified: trunk/vala/valaformalparameter.vala
==============================================================================
--- trunk/vala/valaformalparameter.vala (original)
+++ trunk/vala/valaformalparameter.vala Sun Apr 13 20:01:07 2008
@@ -90,7 +90,7 @@
* @param source reference to source code
* @return newly created formal parameter
*/
- public FormalParameter (string _name, DataType type, SourceReference source = null) {
+ public FormalParameter (string _name, DataType type, SourceReference? source = null) {
name = _name;
type_reference = type;
source_reference = source;
@@ -100,7 +100,7 @@
* Creates a new ellipsis parameter representing an indefinite number of
* parameters.
*/
- public FormalParameter.with_ellipsis (SourceReference source = null) {
+ public FormalParameter.with_ellipsis (SourceReference? source = null) {
ellipsis = true;
source_reference = source;
}
Modified: trunk/vala/valaforstatement.vala
==============================================================================
--- trunk/vala/valaforstatement.vala (original)
+++ trunk/vala/valaforstatement.vala Sun Apr 13 20:01:07 2008
@@ -69,7 +69,7 @@
* @param source_reference reference to source code
* @return newly created for statement
*/
- public ForStatement (Expression condition, Block body, 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;
Modified: trunk/vala/valaifstatement.vala
==============================================================================
--- trunk/vala/valaifstatement.vala (original)
+++ trunk/vala/valaifstatement.vala Sun Apr 13 20:01:07 2008
@@ -47,7 +47,7 @@
/**
* The optional statement to be evaluated if the condition doesn't hold.
*/
- public Block false_statement { get; set construct; }
+ public Block? false_statement { get; set construct; }
private Expression _condition;
@@ -59,7 +59,7 @@
* @param false_stmt statement to be evaluated if condition is false
* @return newly created if statement
*/
- public IfStatement (Expression cond, Block true_stmt, Block false_stmt, SourceReference source) {
+ public IfStatement (Expression cond, Block true_stmt, Block? false_stmt, SourceReference? source) {
condition = cond;
true_statement = true_stmt;
false_statement = false_stmt;
Modified: trunk/vala/valaintegerliteral.vala
==============================================================================
--- trunk/vala/valaintegerliteral.vala (original)
+++ trunk/vala/valaintegerliteral.vala Sun Apr 13 20:01:07 2008
@@ -38,7 +38,7 @@
* @param source reference to source code
* @return newly created integer literal
*/
- public IntegerLiteral (string i, SourceReference source = null) {
+ public IntegerLiteral (string i, SourceReference? source = null) {
value = i;
source_reference = source;
}
Modified: trunk/vala/valainterface.vala
==============================================================================
--- trunk/vala/valainterface.vala (original)
+++ trunk/vala/valainterface.vala Sun Apr 13 20:01:07 2008
@@ -62,7 +62,7 @@
* @param source reference to source code
* @return newly created interface
*/
- public Interface (string name, SourceReference source_reference = null) {
+ public Interface (string name, SourceReference? source_reference = null) {
this.source_reference = source_reference;
this.name = name;
}
@@ -302,7 +302,7 @@
this.lower_case_csuffix = csuffix;
}
- public override string get_lower_case_cname (string infix) {
+ public override string? get_lower_case_cname (string? infix) {
if (infix == null) {
infix = "";
}
@@ -313,7 +313,7 @@
return "%s_".printf (get_lower_case_cname (null));
}
- public override string get_upper_case_cname (string infix) {
+ public override string get_upper_case_cname (string? infix) {
return get_lower_case_cname (infix).up ();
}
Modified: trunk/vala/valainvocationexpression.vala
==============================================================================
--- trunk/vala/valainvocationexpression.vala (original)
+++ trunk/vala/valainvocationexpression.vala Sun Apr 13 20:01:07 2008
@@ -52,7 +52,7 @@
* @param source_reference reference to source code
* @return newly created invocation expression
*/
- public InvocationExpression (Expression call, SourceReference source_reference = null) {
+ public InvocationExpression (Expression call, SourceReference? source_reference = null) {
this.source_reference = source_reference;
this.call = call;
}
Modified: trunk/vala/valalockstatement.vala
==============================================================================
--- trunk/vala/valalockstatement.vala (original)
+++ trunk/vala/valalockstatement.vala Sun Apr 13 20:01:07 2008
@@ -36,7 +36,7 @@
*/
public Block body { get; set construct; }
- public LockStatement (Expression resource, Block body, 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;
Modified: trunk/vala/valamemberaccess.vala
==============================================================================
--- trunk/vala/valamemberaccess.vala (original)
+++ trunk/vala/valamemberaccess.vala Sun Apr 13 20:01:07 2008
@@ -30,7 +30,7 @@
/**
* The parent of the member.
*/
- public Expression inner {
+ public Expression? inner {
get {
return _inner;
}
@@ -63,7 +63,7 @@
*/
public bool creation_member { get; set; }
- private Expression _inner;
+ private Expression? _inner;
private Gee.List<DataType> type_argument_list = new ArrayList<DataType> ();
/**
@@ -74,18 +74,18 @@
* @param source_reference reference to source code
* @return newly created member access expression
*/
- public MemberAccess (Expression inner, string member_name, 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 (string member_name, 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 (Expression inner, string member_name, 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;
Modified: trunk/vala/valamemberinitializer.vala
==============================================================================
--- trunk/vala/valamemberinitializer.vala (original)
+++ trunk/vala/valamemberinitializer.vala Sun Apr 13 20:01:07 2008
@@ -50,7 +50,7 @@
* @param source_reference reference to source code
* @return newly created member initializer
*/
- public MemberInitializer (string name, Expression initializer, 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;
Modified: trunk/vala/valamethod.vala
==============================================================================
--- trunk/vala/valamethod.vala (original)
+++ trunk/vala/valamethod.vala Sun Apr 13 20:01:07 2008
@@ -211,7 +211,7 @@
* @param source reference to source code
* @return newly created method
*/
- public Method (string name, DataType return_type, 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;
Modified: trunk/vala/valanamespace.vala
==============================================================================
--- trunk/vala/valanamespace.vala (original)
+++ trunk/vala/valanamespace.vala Sun Apr 13 20:01:07 2008
@@ -56,7 +56,7 @@
* @param source_reference reference to source code
* @return newly created namespace
*/
- public Namespace (string name, SourceReference source_reference = null) {
+ public Namespace (string? name, SourceReference? source_reference = null) {
this.source_reference = source_reference;
this.name = name;
access = SymbolAccessibility.PUBLIC;
Modified: trunk/vala/valanullliteral.vala
==============================================================================
--- trunk/vala/valanullliteral.vala (original)
+++ trunk/vala/valanullliteral.vala Sun Apr 13 20:01:07 2008
@@ -32,7 +32,7 @@
* @param source reference to source code
* @return newly created null literal
*/
- public NullLiteral (SourceReference source = null) {
+ public NullLiteral (SourceReference? source = null) {
source_reference = source;
}
Modified: trunk/vala/valaparenthesizedexpression.vala
==============================================================================
--- trunk/vala/valaparenthesizedexpression.vala (original)
+++ trunk/vala/valaparenthesizedexpression.vala Sun Apr 13 20:01:07 2008
@@ -48,7 +48,7 @@
* @param source reference to source code
* @return newly created parenthesized expression
*/
- public ParenthesizedExpression (Expression _inner, SourceReference source) {
+ public ParenthesizedExpression (Expression _inner, SourceReference? source) {
inner = _inner;
source_reference = source;
}
Modified: trunk/vala/valaparser.vala
==============================================================================
--- trunk/vala/valaparser.vala (original)
+++ trunk/vala/valaparser.vala Sun Apr 13 20:01:07 2008
@@ -354,6 +354,8 @@
stars++;
}
+ bool nullable = accept (TokenType.INTERR);
+
int array_rank = 0;
if (accept (TokenType.OPEN_BRACKET)) {
do {
@@ -366,14 +368,14 @@
}
while (accept (TokenType.COMMA));
expect (TokenType.CLOSE_BRACKET);
+
+ nullable = accept (TokenType.INTERR);
}
if (accept (TokenType.OP_NEG)) {
Report.warning (get_last_src (), "obsolete syntax, types are non-null by default");
}
- bool nullable = accept (TokenType.INTERR);
-
bool transfers_ownership = accept (TokenType.HASH);
var type = new UnresolvedType.from_symbol (sym, get_src (begin));
@@ -1534,9 +1536,9 @@
return attrs;
}
- void set_attributes (CodeNode node, Gee.List<Attribute> attributes) {
+ void set_attributes (CodeNode node, Gee.List<Attribute>? attributes) {
if (attributes != null) {
- foreach (Attribute attr in attributes) {
+ foreach (Attribute attr in (Gee.List<Attribute>) attributes) {
node.attributes.append (attr);
}
}
@@ -1694,7 +1696,7 @@
return RecoveryState.EOF;
}
- Namespace parse_namespace_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ Namespace parse_namespace_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
expect (TokenType.NAMESPACE);
var sym = parse_symbol_name ();
@@ -1812,7 +1814,7 @@
}
}
- Symbol parse_class_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ Symbol parse_class_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_type_declaration_modifiers ();
@@ -1909,7 +1911,7 @@
}
}
- Constant parse_constant_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ Constant parse_constant_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
parse_member_declaration_modifiers ();
@@ -1927,7 +1929,7 @@
return c;
}
- Field parse_field_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ Field parse_field_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_member_declaration_modifiers ();
@@ -1990,7 +1992,7 @@
}
}
- Method parse_method_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ Method parse_method_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_member_declaration_modifiers ();
@@ -2037,7 +2039,7 @@
return method;
}
- Property parse_property_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ Property parse_property_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_member_declaration_modifiers ();
@@ -2114,7 +2116,7 @@
return prop;
}
- Signal parse_signal_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ Signal parse_signal_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
parse_member_declaration_modifiers ();
@@ -2136,7 +2138,7 @@
return sig;
}
- Constructor parse_constructor_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ Constructor parse_constructor_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var flags = parse_member_declaration_modifiers ();
expect (TokenType.CONSTRUCT);
@@ -2148,7 +2150,7 @@
return c;
}
- Destructor parse_destructor_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ Destructor parse_destructor_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
expect (TokenType.TILDE);
parse_identifier ();
@@ -2159,7 +2161,7 @@
return d;
}
- Symbol parse_struct_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ Symbol parse_struct_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
parse_type_declaration_modifiers ();
@@ -2212,7 +2214,7 @@
}
}
- Symbol parse_interface_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ Symbol parse_interface_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
parse_type_declaration_modifiers ();
@@ -2284,7 +2286,7 @@
}
}
- Symbol parse_enum_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ Symbol parse_enum_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
parse_type_declaration_modifiers ();
@@ -2339,7 +2341,7 @@
return result;
}
- Symbol parse_errordomain_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ Symbol parse_errordomain_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
parse_type_declaration_modifiers ();
@@ -2497,7 +2499,7 @@
return param;
}
- CreationMethod parse_creation_method_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ CreationMethod parse_creation_method_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
parse_member_declaration_modifiers ();
@@ -2529,7 +2531,7 @@
return method;
}
- Symbol parse_delegate_declaration (Gee.List<Attribute> attrs) throws ParseError {
+ Symbol parse_delegate_declaration (Gee.List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_member_declaration_modifiers ();
Modified: trunk/vala/valapointerindirection.vala
==============================================================================
--- trunk/vala/valapointerindirection.vala (original)
+++ trunk/vala/valapointerindirection.vala Sun Apr 13 20:01:07 2008
@@ -47,7 +47,7 @@
* @param inner pointer to be dereferenced
* @return newly created pointer indirection
*/
- public PointerIndirection (Expression inner, SourceReference source_reference = null) {
+ public PointerIndirection (Expression inner, SourceReference? source_reference = null) {
this.source_reference = source_reference;
this.inner = inner;
}
Modified: trunk/vala/valaproperty.vala
==============================================================================
--- trunk/vala/valaproperty.vala (original)
+++ trunk/vala/valaproperty.vala Sun Apr 13 20:01:07 2008
@@ -40,12 +40,12 @@
/**
* The get accessor of this property if available.
*/
- public PropertyAccessor get_accessor { get; set; }
+ public PropertyAccessor? get_accessor { get; set; }
/**
* The set/construct accessor of this property if available.
*/
- public PropertyAccessor set_accessor { get; set; }
+ public PropertyAccessor? set_accessor { get; set; }
/**
* Represents the generated Âthis' parameter in this property.
@@ -164,7 +164,7 @@
* @param source reference to source code
* @return newly created property
*/
- public Property (string _name, DataType type, PropertyAccessor _get_accessor, PropertyAccessor _set_accessor, SourceReference source) {
+ public Property (string _name, DataType type, PropertyAccessor? _get_accessor, PropertyAccessor? _set_accessor, SourceReference source) {
name = _name;
type_reference = type;
get_accessor = _get_accessor;
Modified: trunk/vala/valapropertyaccessor.vala
==============================================================================
--- trunk/vala/valapropertyaccessor.vala (original)
+++ trunk/vala/valapropertyaccessor.vala Sun Apr 13 20:01:07 2008
@@ -55,7 +55,7 @@
/**
* The accessor body.
*/
- public Block body { get; set; }
+ public Block? body { get; set; }
public BasicBlock entry_block { get; set; }
@@ -81,12 +81,12 @@
* @param source reference to source code
* @return newly created property accessor
*/
- public PropertyAccessor (bool readable, bool writable, bool construction, Block body, SourceReference source_reference) {
+ public PropertyAccessor (bool readable, bool writable, bool construction, Block? body, SourceReference? source_reference) {
+ this.readable = readable;
this.writable = writable;
this.construction = construction;
this.body = body;
this.source_reference = source_reference;
- this.readable = readable;
}
public override void accept (CodeVisitor visitor) {
Modified: trunk/vala/valareferencetransferexpression.vala
==============================================================================
--- trunk/vala/valareferencetransferexpression.vala (original)
+++ trunk/vala/valareferencetransferexpression.vala Sun Apr 13 20:01:07 2008
@@ -47,7 +47,7 @@
* @param inner variable whose reference is to be transferred
* @return newly created reference transfer expression
*/
- public ReferenceTransferExpression (Expression inner, SourceReference source_reference = null) {
+ public ReferenceTransferExpression (Expression inner, SourceReference? source_reference = null) {
this.source_reference = source_reference;
this.inner = inner;
}
Modified: trunk/vala/valareport.vala
==============================================================================
--- trunk/vala/valareport.vala (original)
+++ trunk/vala/valareport.vala Sun Apr 13 20:01:07 2008
@@ -1,6 +1,6 @@
/* valareport.vala
*
- * Copyright (C) 2006-2007 JÃrg Billeter
+ * Copyright (C) 2006-2008 JÃrg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -96,7 +96,7 @@
* @param source reference to source code
* @param message warning message
*/
- public static void warning (SourceReference source, string message) {
+ public static void warning (SourceReference? source, string message) {
warnings++;
if (source == null) {
stderr.printf ("warning: %s\n", message);
@@ -114,7 +114,7 @@
* @param source reference to source code
* @param message error message
*/
- public static void error (SourceReference source, string message) {
+ public static void error (SourceReference? source, string message) {
errors++;
if (source == null) {
stderr.printf ("error: %s\n", message);
Modified: trunk/vala/valareturnstatement.vala
==============================================================================
--- trunk/vala/valareturnstatement.vala (original)
+++ trunk/vala/valareturnstatement.vala Sun Apr 13 20:01:07 2008
@@ -1,6 +1,6 @@
/* valareturnstatement.vala
*
- * Copyright (C) 2006-2007 JÃrg Billeter
+ * Copyright (C) 2006-2008 JÃrg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -29,7 +29,7 @@
/**
* The optional expression to return.
*/
- public Expression return_expression {
+ public Expression? return_expression {
get { return _return_expression; }
set {
_return_expression = value;
@@ -48,7 +48,7 @@
* @param source_reference reference to source code
* @return newly created return statement
*/
- public ReturnStatement (Expression return_expression = null, SourceReference source_reference = null) {
+ public ReturnStatement (Expression? return_expression = null, SourceReference? source_reference = null) {
this.source_reference = source_reference;
this.return_expression = return_expression;
}
Modified: trunk/vala/valasignal.vala
==============================================================================
--- trunk/vala/valasignal.vala (original)
+++ trunk/vala/valasignal.vala Sun Apr 13 20:01:07 2008
@@ -60,7 +60,7 @@
* @param source reference to source code
* @return newly created signal
*/
- public Signal (string name, DataType return_type, 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;
Modified: trunk/vala/valasourcefile.vala
==============================================================================
--- trunk/vala/valasourcefile.vala (original)
+++ trunk/vala/valasourcefile.vala Sun Apr 13 20:01:07 2008
@@ -230,7 +230,7 @@
* @param sym a symbol
* @param dep_type type of dependency
*/
- public void add_symbol_dependency (Symbol sym, SourceFileDependencyType dep_type) {
+ public void add_symbol_dependency (Symbol? sym, SourceFileDependencyType dep_type) {
if (pkg) {
return;
}
Modified: trunk/vala/valasourcereference.vala
==============================================================================
--- trunk/vala/valasourcereference.vala (original)
+++ trunk/vala/valasourcereference.vala Sun Apr 13 20:01:07 2008
@@ -1,6 +1,6 @@
/* valasourcereference.vala
*
- * Copyright (C) 2006-2007 JÃrg Billeter
+ * Copyright (C) 2006-2008 JÃrg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -85,7 +85,7 @@
* @param comment code comment
* @return newly created source reference
*/
- public SourceReference.with_comment (SourceFile _file, int _first_line, int _first_column, int _last_line, int _last_column, string _comment) {
+ public SourceReference.with_comment (SourceFile _file, int _first_line, int _first_column, int _last_line, int _last_column, string? _comment) {
file = _file;
first_line = _first_line;
first_column = _first_column;
Modified: trunk/vala/valastruct.vala
==============================================================================
--- trunk/vala/valastruct.vala (original)
+++ trunk/vala/valastruct.vala Sun Apr 13 20:01:07 2008
@@ -62,7 +62,7 @@
* @param source_reference reference to source code
* @return newly created struct
*/
- public Struct (string name, SourceReference source_reference = null) {
+ public Struct (string name, SourceReference? source_reference = null) {
this.source_reference = source_reference;
this.name = name;
}
@@ -213,14 +213,14 @@
return lower_case_csuffix;
}
- public override string get_lower_case_cname (string infix) {
+ public override string? get_lower_case_cname (string? infix) {
if (infix == null) {
infix = "";
}
return "%s%s%s".printf (parent_symbol.get_lower_case_cprefix (), infix, get_lower_case_csuffix ());
}
- public override string get_upper_case_cname (string infix) {
+ public override string get_upper_case_cname (string? infix) {
return get_lower_case_cname (infix).up ();
}
Modified: trunk/vala/valaswitchlabel.vala
==============================================================================
--- trunk/vala/valaswitchlabel.vala (original)
+++ trunk/vala/valaswitchlabel.vala Sun Apr 13 20:01:07 2008
@@ -38,7 +38,7 @@
* @param source reference to source code
* @return newly created switch case label
*/
- public SwitchLabel (Expression expr, SourceReference source = null) {
+ public SwitchLabel (Expression expr, SourceReference? source = null) {
expression = expr;
source_reference = source;
}
@@ -49,7 +49,7 @@
* @param source reference to source code
* @return newly created switch default label
*/
- public SwitchLabel.with_default (SourceReference source = null) {
+ public SwitchLabel.with_default (SourceReference? source = null) {
source_reference = source;
}
Modified: trunk/vala/valasymbol.vala
==============================================================================
--- trunk/vala/valasymbol.vala (original)
+++ trunk/vala/valasymbol.vala Sun Apr 13 20:01:07 2008
@@ -154,7 +154,7 @@
* name or null
* @return the lower case name to be used in C code
*/
- public virtual string get_lower_case_cname (string infix = null) {
+ public virtual string? get_lower_case_cname (string? infix = null) {
return null;
}
Modified: trunk/vala/valathrowstatement.vala
==============================================================================
--- trunk/vala/valathrowstatement.vala (original)
+++ trunk/vala/valathrowstatement.vala Sun Apr 13 20:01:07 2008
@@ -50,7 +50,7 @@
* @param source_reference reference to source code
* @return newly created throw statement
*/
- public ThrowStatement (Expression error_expression, SourceReference source_reference = null) {
+ public ThrowStatement (Expression error_expression, SourceReference? source_reference = null) {
this.source_reference = source_reference;
this.error_expression = error_expression;
}
Modified: trunk/vala/valatrystatement.vala
==============================================================================
--- trunk/vala/valatrystatement.vala (original)
+++ trunk/vala/valatrystatement.vala Sun Apr 13 20:01:07 2008
@@ -35,7 +35,7 @@
/**
* Specifies the body of the optional finally clause.
*/
- public Block finally_body { get; set; }
+ public Block? finally_body { get; set; }
private Gee.List<CatchClause> catch_clauses = new ArrayList<CatchClause> ();
@@ -47,10 +47,10 @@
* @param source_reference reference to source code
* @return newly created try statement
*/
- public TryStatement (Block body, Block finally_body, SourceReference source_reference = null) {
+ public TryStatement (Block body, Block? finally_body, SourceReference? source_reference = null) {
+ this.body = body;
this.finally_body = finally_body;
this.source_reference = source_reference;
- this.body = body;
}
/**
Modified: trunk/vala/valatypesymbol.vala
==============================================================================
--- trunk/vala/valatypesymbol.vala (original)
+++ trunk/vala/valatypesymbol.vala Sun Apr 13 20:01:07 2008
@@ -155,7 +155,7 @@
* name or null
* @return the upper case name to be used in C code
*/
- public virtual string get_upper_case_cname (string infix = null) {
+ public virtual string get_upper_case_cname (string? infix = null) {
return null;
}
Modified: trunk/vala/valaunresolvedtype.vala
==============================================================================
--- trunk/vala/valaunresolvedtype.vala (original)
+++ trunk/vala/valaunresolvedtype.vala Sun Apr 13 20:01:07 2008
@@ -60,7 +60,7 @@
* @param source reference to source code
* @return newly created type reference
*/
- public UnresolvedType.from_symbol (UnresolvedSymbol symbol, SourceReference source = null) {
+ public UnresolvedType.from_symbol (UnresolvedSymbol symbol, SourceReference? source = null) {
this.unresolved_symbol = symbol;
source_reference = source;
}
Modified: trunk/vala/valavariabledeclarator.vala
==============================================================================
--- trunk/vala/valavariabledeclarator.vala (original)
+++ trunk/vala/valavariabledeclarator.vala Sun Apr 13 20:01:07 2008
@@ -1,6 +1,6 @@
/* valavariabledeclarator.vala
*
- * Copyright (C) 2006-2007 JÃrg Billeter
+ * Copyright (C) 2006-2008 JÃrg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -64,10 +64,10 @@
* @param source reference to source code
* @return newly created variable declarator
*/
- public VariableDeclarator (string name, Expression initializer = null, SourceReference source_reference = null) {
+ public VariableDeclarator (string name, Expression? initializer = null, SourceReference? source_reference = null) {
+ this.name = name;
this.initializer = initializer;
this.source_reference = source_reference;
- this.name = name;
}
public override void accept (CodeVisitor visitor) {
Modified: trunk/vala/valawhilestatement.vala
==============================================================================
--- trunk/vala/valawhilestatement.vala (original)
+++ trunk/vala/valawhilestatement.vala Sun Apr 13 20:01:07 2008
@@ -63,7 +63,7 @@
* @param source reference to source code
* @return newly created while statement
*/
- public WhileStatement (Expression condition, Block body, 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;
Modified: trunk/vapigen/valagidlparser.vala
==============================================================================
--- trunk/vapigen/valagidlparser.vala (original)
+++ trunk/vapigen/valagidlparser.vala Sun Apr 13 20:01:07 2008
@@ -1184,7 +1184,7 @@
return type;
}
- private Method create_method (string name, string symbol, IdlNodeParam res, GLib.List<IdlNodeParam> parameters, bool is_constructor, bool is_interface) {
+ private Method create_method (string name, string symbol, IdlNodeParam? res, GLib.List<IdlNodeParam>? parameters, bool is_constructor, bool is_interface) {
UnresolvedType return_type = null;
if (res != null) {
return_type = parse_param (res);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]