From 206cd6716043d886c6531ca358f5b442c5ea991e Mon Sep 17 00:00:00 2001 From: Juerg Billeter Date: Sun, 13 Apr 2008 15:44:44 +0000 Subject: [PATCH] report warning when using obsolete syntax for non-null types 2008-04-13 Juerg Billeter * vala/valaparser.vala: report warning when using obsolete syntax for non-null types * */*.vala, */*.vapi: port to new syntax svn path=/trunk/; revision=1208 --- ChangeLog | 7 + ccode/valaccodeassignment.vala | 2 +- ccode/valaccodebinaryexpression.vala | 8 +- ccode/valaccodeblock.vala | 8 +- ccode/valaccodebreakstatement.vala | 2 +- ccode/valaccodecasestatement.vala | 8 +- ccode/valaccodecastexpression.vala | 8 +- ccode/valaccodecommaexpression.vala | 4 +- ccode/valaccodecomment.vala | 6 +- ccode/valaccodeconditionalexpression.vala | 10 +- ccode/valaccodeconstant.vala | 6 +- ccode/valaccodecontinuestatement.vala | 2 +- ccode/valaccodedeclaration.vala | 10 +- ccode/valaccodedeclarator.vala | 2 +- ccode/valaccodedostatement.vala | 6 +- ccode/valaccodeelementaccess.vala | 8 +- ccode/valaccodeemptystatement.vala | 2 +- ccode/valaccodeenum.vala | 4 +- ccode/valaccodeenumvalue.vala | 6 +- ccode/valaccodeexpressionstatement.vala | 4 +- ccode/valaccodeformalparameter.vala | 4 +- ccode/valaccodeforstatement.vala | 10 +- ccode/valaccodefragment.vala | 8 +- ccode/valaccodefunction.vala | 12 +- ccode/valaccodefunctioncall.vala | 4 +- ccode/valaccodefunctiondeclarator.vala | 10 +- ccode/valaccodegotostatement.vala | 6 +- ccode/valaccodeidentifier.vala | 6 +- ccode/valaccodeifstatement.vala | 8 +- ccode/valaccodeincludedirective.vala | 6 +- ccode/valaccodeinitializerlist.vala | 4 +- ccode/valaccodelabel.vala | 6 +- ccode/valaccodelinedirective.vala | 6 +- ccode/valaccodemacroreplacement.vala | 10 +- ccode/valaccodememberaccess.vala | 10 +- ccode/valaccodenewline.vala | 2 +- ccode/valaccodenode.vala | 6 +- ccode/valaccodeoncesection.vala | 8 +- ccode/valaccodeparenthesizedexpression.vala | 6 +- ccode/valaccodereturnstatement.vala | 2 +- ccode/valaccodestruct.vala | 10 +- ccode/valaccodeswitchstatement.vala | 10 +- ccode/valaccodetypedefinition.vala | 4 +- ccode/valaccodeunaryexpression.vala | 6 +- ccode/valaccodevariabledeclarator.vala | 12 +- ccode/valaccodewhilestatement.vala | 6 +- ccode/valaccodewriter.vala | 6 +- compiler/valacompiler.vala | 4 +- gee/arraylist.vala | 2 +- gee/hashmap.vala | 8 +- gee/hashset.vala | 2 +- gen-project/valaprojectgenerator.vala | 24 +- gobject-introspection/gidl.vapi | 2 +- .../valaccodearraycreationexpressionbinding.vala | 4 +- gobject/valaccodeassignmentbinding.vala | 4 +- gobject/valaccodecompiler.vala | 2 +- gobject/valaccodeelementaccessbinding.vala | 4 +- gobject/valaccodegenerator.vala | 304 ++++++++-------- gobject/valaccodegeneratorclass.vala | 20 +- gobject/valaccodegeneratorinterface.vala | 8 +- .../valaccodegeneratorinvocationexpression.vala | 4 +- gobject/valaccodegeneratormemberaccess.vala | 4 +- gobject/valaccodegeneratormethod.vala | 20 +- gobject/valaccodegeneratorsignal.vala | 8 +- gobject/valaccodegeneratorsourcefile.vala | 8 +- gobject/valaccodegeneratorstruct.vala | 2 +- gobject/valaccodemethodbinding.vala | 6 +- gobject/valaclassregisterfunction.vala | 22 +- gobject/valadbusbindingprovider.vala | 4 +- gobject/valadbusmethod.vala | 2 +- gobject/valagidlwriter.vala | 32 +- gobject/valainterfaceregisterfunction.vala | 20 +- gobject/valatyperegisterfunction.vala | 22 +- vala/valaaddressofexpression.vala | 10 +- vala/valaarraycreationexpression.vala | 8 +- vala/valaarraytype.vala | 8 +- vala/valaassignment.vala | 16 +- vala/valaattribute.vala | 16 +- vala/valaattributeprocessor.vala | 30 +- vala/valabaseaccess.vala | 4 +- vala/valabinaryexpression.vala | 18 +- vala/valabindingprovider.vala | 2 +- vala/valablock.vala | 10 +- vala/valabooleanliteral.vala | 4 +- vala/valabreakstatement.vala | 2 +- vala/valacastexpression.vala | 14 +- vala/valacatchclause.vala | 6 +- vala/valacfgbuilder.vala | 48 +-- vala/valacharacterliteral.vala | 8 +- vala/valaclass.vala | 52 +-- vala/valaclasstype.vala | 2 +- vala/valacodecontext.vala | 172 ++++----- vala/valacodegenerator.vala | 138 ++++---- vala/valacodenode.vala | 14 +- vala/valacodevisitor.vala | 144 ++++---- vala/valaconditionalexpression.vala | 10 +- vala/valaconstant.vala | 14 +- vala/valaconstructor.vala | 4 +- vala/valacontinuestatement.vala | 2 +- vala/valacreationmethod.vala | 6 +- vala/valadatatype.vala | 14 +- vala/valadeclarationstatement.vala | 6 +- vala/valadelegate.vala | 14 +- vala/valadelegatetype.vala | 4 +- vala/valadeletestatement.vala | 4 +- vala/valadestructor.vala | 4 +- vala/valadostatement.vala | 12 +- vala/valaelementaccess.vala | 10 +- vala/valaemptystatement.vala | 2 +- vala/valaenum.vala | 22 +- vala/valaenumvalue.vala | 14 +- vala/valaerrorcode.vala | 10 +- vala/valaerrordomain.vala | 18 +- vala/valaerrortype.vala | 4 +- vala/valaexpressionstatement.vala | 10 +- vala/valafield.vala | 18 +- vala/valaforeachstatement.vala | 18 +- vala/valaformalparameter.vala | 8 +- vala/valaforstatement.vala | 12 +- vala/valaifstatement.vala | 14 +- vala/valainitializerlist.vala | 6 +- vala/valainstancecast.vala | 6 +- vala/valaintegerliteral.vala | 10 +- vala/valaintegertype.vala | 6 +- vala/valainterface.vala | 46 +-- vala/valainterfacetype.vala | 2 +- vala/valainterfacewriter.vala | 42 +-- vala/valainvocationexpression.vala | 16 +- vala/valalambdaexpression.vala | 10 +- vala/valalocalvariabledeclaration.vala | 8 +- vala/valalockstatement.vala | 6 +- vala/valamember.vala | 4 +- vala/valamemberaccess.vala | 18 +- vala/valamemberinitializer.vala | 8 +- vala/valamemorymanager.vala | 74 ++-- vala/valamethod.vala | 26 +- vala/valamethodtype.vala | 6 +- vala/valanamedargument.vala | 8 +- vala/valanamespace.vala | 34 +- vala/valanamespacereference.vala | 6 +- vala/valanullliteral.vala | 4 +- vala/valanulltype.vala | 4 +- vala/valaobjectcreationexpression.vala | 16 +- vala/valaparenthesizedexpression.vala | 12 +- vala/valaparser.vala | 9 +- vala/valapointerindirection.vala | 10 +- vala/valapointertype.vala | 8 +- vala/valapostfixexpression.vala | 6 +- vala/valaproperty.vala | 18 +- vala/valapropertyaccessor.vala | 4 +- vala/valarealliteral.vala | 4 +- vala/valareferencetransferexpression.vala | 10 +- vala/valareport.vala | 6 +- vala/valareturnstatement.vala | 8 +- vala/valascanner.vala | 2 +- vala/valascope.vala | 4 +- vala/valasemanticanalyzer.vala | 150 ++++---- vala/valasignal.vala | 22 +- vala/valasignaltype.vala | 2 +- vala/valasizeofexpression.vala | 8 +- vala/valasourcefile.vala | 30 +- vala/valasourcereference.vala | 2 +- vala/valastringliteral.vala | 2 +- vala/valastruct.vala | 42 +-- vala/valaswitchlabel.vala | 2 +- vala/valaswitchsection.vala | 8 +- vala/valaswitchstatement.vala | 12 +- vala/valasymbol.vala | 8 +- vala/valasymbolresolver.vala | 78 ++--- vala/valathrowstatement.vala | 10 +- vala/valatrystatement.vala | 10 +- vala/valatypecheck.vala | 10 +- vala/valatypeofexpression.vala | 8 +- vala/valatypeparameter.vala | 6 +- vala/valatypesymbol.vala | 6 +- vala/valaunaryexpression.vala | 14 +- vala/valaunresolvedtype.vala | 4 +- vala/valavaluetype.vala | 2 +- vala/valavariabledeclarator.vala | 12 +- vala/valavoidtype.vala | 4 +- vala/valawhilestatement.vala | 12 +- vapi/cairo.vapi | 32 +- vapi/glib-2.0.vapi | 384 ++++++++++----------- vapigen/valagidlparser.vala | 70 ++-- vapigen/valavapicheck.vala | 16 +- vapigen/valavapigen.vala | 2 +- 186 files changed, 1620 insertions(+), 1638 deletions(-) diff --git a/ChangeLog b/ChangeLog index 71c75ac..48a5398 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-04-13 Jürg Billeter + * vala/valaparser.vala: report warning when using obsolete syntax + for non-null types + + * */*.vala, */*.vapi: port to new syntax + +2008-04-13 Jürg Billeter + * vala/valaparser.vala: report warning when using deprecated syntax for property default values diff --git a/ccode/valaccodeassignment.vala b/ccode/valaccodeassignment.vala index 8f15cdf..4895dcf 100644 --- a/ccode/valaccodeassignment.vala +++ b/ccode/valaccodeassignment.vala @@ -47,7 +47,7 @@ public class Vala.CCodeAssignment : CCodeExpression { right = r; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { left.write (writer); writer.write_string (" "); diff --git a/ccode/valaccodebinaryexpression.vala b/ccode/valaccodebinaryexpression.vala index 27a8ce6..106519d 100644 --- a/ccode/valaccodebinaryexpression.vala +++ b/ccode/valaccodebinaryexpression.vala @@ -34,20 +34,20 @@ public class Vala.CCodeBinaryExpression : CCodeExpression { /** * The left operand. */ - public CCodeExpression! left { get; set construct; } + public CCodeExpression left { get; set construct; } /** * The right operand. */ - public CCodeExpression! right { get; set construct; } + public CCodeExpression right { get; set construct; } - public CCodeBinaryExpression (CCodeBinaryOperator op, CCodeExpression! l, CCodeExpression! r) { + public CCodeBinaryExpression (CCodeBinaryOperator op, CCodeExpression l, CCodeExpression r) { operator = op; left = l; right = r; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { left.write (writer); writer.write_string (" "); diff --git a/ccode/valaccodeblock.vala b/ccode/valaccodeblock.vala index 2aa5bd1..7e99197 100644 --- a/ccode/valaccodeblock.vala +++ b/ccode/valaccodeblock.vala @@ -1,6 +1,6 @@ /* valaccodeblock.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 @@ -38,19 +38,19 @@ public class Vala.CCodeBlock : CCodeStatement { /** * Prepend the specified statement to the list of statements. */ - public void prepend_statement (CCodeNode! statement) { + public void prepend_statement (CCodeNode statement) { statements.insert (0, statement); } /** * Append the specified statement to the list of statements. */ - public void add_statement (CCodeNode! statement) { + public void add_statement (CCodeNode statement) { /* allow generic nodes to include comments */ statements.add (statement); } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { // the last reachable statement CCodeNode last_statement = null; diff --git a/ccode/valaccodebreakstatement.vala b/ccode/valaccodebreakstatement.vala index 9fb8ee2..a032e24 100644 --- a/ccode/valaccodebreakstatement.vala +++ b/ccode/valaccodebreakstatement.vala @@ -26,7 +26,7 @@ using GLib; * Represents a break statement in the C code. */ public class Vala.CCodeBreakStatement : CCodeStatement { - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_indent (line); writer.write_string ("break;"); writer.write_newline (); diff --git a/ccode/valaccodecasestatement.vala b/ccode/valaccodecasestatement.vala index 602957f..e2e9950 100644 --- a/ccode/valaccodecasestatement.vala +++ b/ccode/valaccodecasestatement.vala @@ -30,11 +30,11 @@ public class Vala.CCodeCaseStatement : CCodeStatement { /** * The case expression. */ - public CCodeExpression! expression { get; set; } + public CCodeExpression expression { get; set; } private Gee.List statements = new ArrayList (); - public CCodeCaseStatement (construct CCodeExpression! expression) { + public CCodeCaseStatement (construct CCodeExpression expression) { } /** @@ -42,11 +42,11 @@ public class Vala.CCodeCaseStatement : CCodeStatement { * * @param stmt a statement */ - public void add_statement (CCodeStatement! stmt) { + public void add_statement (CCodeStatement stmt) { statements.add (stmt); } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_indent (line); writer.write_string ("case "); expression.write (writer); diff --git a/ccode/valaccodecastexpression.vala b/ccode/valaccodecastexpression.vala index 98b7963..ce71949 100644 --- a/ccode/valaccodecastexpression.vala +++ b/ccode/valaccodecastexpression.vala @@ -29,19 +29,19 @@ public class Vala.CCodeCastExpression : CCodeExpression { /** * The expression to be cast. */ - public CCodeExpression! inner { get; set construct; } + public CCodeExpression inner { get; set construct; } /** * The target type. */ - public string! type_name { get; set construct; } + public string type_name { get; set construct; } - public CCodeCastExpression (CCodeExpression! expr, string! type) { + public CCodeCastExpression (CCodeExpression expr, string type) { inner = expr; type_name = type; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_string ("(("); writer.write_string (type_name); writer.write_string (") "); diff --git a/ccode/valaccodecommaexpression.vala b/ccode/valaccodecommaexpression.vala index 1db284a..ed3b855 100644 --- a/ccode/valaccodecommaexpression.vala +++ b/ccode/valaccodecommaexpression.vala @@ -34,7 +34,7 @@ public class Vala.CCodeCommaExpression : CCodeExpression { * * @param expr a C code expression */ - public void append_expression (CCodeExpression! expr) { + public void append_expression (CCodeExpression expr) { inner.add (expr); } @@ -42,7 +42,7 @@ public class Vala.CCodeCommaExpression : CCodeExpression { return new ReadOnlyCollection (inner); } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { bool first = true; writer.write_string ("("); diff --git a/ccode/valaccodecomment.vala b/ccode/valaccodecomment.vala index 74dd5b8..f68e24b 100644 --- a/ccode/valaccodecomment.vala +++ b/ccode/valaccodecomment.vala @@ -29,13 +29,13 @@ public class Vala.CCodeComment : CCodeNode { /** * The text content of the comment. */ - public string! text { get; set construct; } + public string text { get; set construct; } - public CCodeComment (string! _text) { + public CCodeComment (string _text) { text = _text; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_comment (text); } } diff --git a/ccode/valaccodeconditionalexpression.vala b/ccode/valaccodeconditionalexpression.vala index b9d4c1b..7ebf07f 100644 --- a/ccode/valaccodeconditionalexpression.vala +++ b/ccode/valaccodeconditionalexpression.vala @@ -29,25 +29,25 @@ public class Vala.CCodeConditionalExpression : CCodeExpression { /** * The condition. */ - public CCodeExpression! condition { get; set construct; } + public CCodeExpression condition { get; set construct; } /** * The expression to be evaluated if the condition holds. */ - public CCodeExpression! true_expression { get; set construct; } + public CCodeExpression true_expression { get; set construct; } /** * The expression to be evaluated if the condition doesn't hold. */ - public CCodeExpression! false_expression { get; set construct; } + public CCodeExpression false_expression { get; set construct; } - public CCodeConditionalExpression (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; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_string ("("); condition.write (writer); writer.write_string (" ? "); diff --git a/ccode/valaccodeconstant.vala b/ccode/valaccodeconstant.vala index 15fff0f..b4d9b19 100644 --- a/ccode/valaccodeconstant.vala +++ b/ccode/valaccodeconstant.vala @@ -29,13 +29,13 @@ public class Vala.CCodeConstant : CCodeExpression { /** * The name of this constant. */ - public string! name { get; set construct; } + public string name { get; set construct; } - public CCodeConstant (string! _name) { + public CCodeConstant (string _name) { name = _name; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_string (name); } } diff --git a/ccode/valaccodecontinuestatement.vala b/ccode/valaccodecontinuestatement.vala index cad0e69..013f201 100644 --- a/ccode/valaccodecontinuestatement.vala +++ b/ccode/valaccodecontinuestatement.vala @@ -26,7 +26,7 @@ using GLib; * Represents a continue statement in the C code. */ public class Vala.CCodeContinueStatement : CCodeStatement { - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_indent (line); writer.write_string ("continue;"); writer.write_newline (); diff --git a/ccode/valaccodedeclaration.vala b/ccode/valaccodedeclaration.vala index 21c87d3..9c001bb 100644 --- a/ccode/valaccodedeclaration.vala +++ b/ccode/valaccodedeclaration.vala @@ -30,7 +30,7 @@ public class Vala.CCodeDeclaration : CCodeStatement { /** * The type of the local variable. */ - public string! type_name { get; set; } + public string type_name { get; set; } /** * The declaration modifier. @@ -39,7 +39,7 @@ public class Vala.CCodeDeclaration : CCodeStatement { private Gee.List declarators = new ArrayList (); - public CCodeDeclaration (construct string! type_name) { + public CCodeDeclaration (construct string type_name) { } /** @@ -47,11 +47,11 @@ public class Vala.CCodeDeclaration : CCodeStatement { * * @param decl a declarator */ - public void add_declarator (CCodeDeclarator! decl) { + public void add_declarator (CCodeDeclarator decl) { declarators.add (decl); } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { if ((modifiers & (CCodeModifiers.STATIC | CCodeModifiers.EXTERN)) != 0) { // combined declaration and initialization for static and extern variables writer.write_indent (line); @@ -93,7 +93,7 @@ public class Vala.CCodeDeclaration : CCodeStatement { return true; } - public override void write_declaration (CCodeWriter! writer) { + public override void write_declaration (CCodeWriter writer) { if ((modifiers & (CCodeModifiers.STATIC | CCodeModifiers.EXTERN)) != 0) { // no separate declaration for static variables return; diff --git a/ccode/valaccodedeclarator.vala b/ccode/valaccodedeclarator.vala index 4d7df56..5484694 100644 --- a/ccode/valaccodedeclarator.vala +++ b/ccode/valaccodedeclarator.vala @@ -32,6 +32,6 @@ public abstract class Vala.CCodeDeclarator : CCodeNode { * * @param writer a C code writer */ - public virtual void write_initialization (CCodeWriter! writer) { + public virtual void write_initialization (CCodeWriter writer) { } } diff --git a/ccode/valaccodedostatement.vala b/ccode/valaccodedostatement.vala index ba04e5e..bd02b86 100644 --- a/ccode/valaccodedostatement.vala +++ b/ccode/valaccodedostatement.vala @@ -34,14 +34,14 @@ public class Vala.CCodeDoStatement : CCodeStatement { /** * The loop condition. */ - public CCodeExpression! condition { get; set construct; } + public CCodeExpression condition { get; set construct; } - public CCodeDoStatement (CCodeStatement stmt, CCodeExpression! cond) { + public CCodeDoStatement (CCodeStatement stmt, CCodeExpression cond) { body = stmt; condition = cond; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_indent (line); writer.write_string ("do"); diff --git a/ccode/valaccodeelementaccess.vala b/ccode/valaccodeelementaccess.vala index 19f7281..6a69be5 100644 --- a/ccode/valaccodeelementaccess.vala +++ b/ccode/valaccodeelementaccess.vala @@ -31,20 +31,20 @@ public class Vala.CCodeElementAccess : CCodeExpression { /** * Expression representing the container on which we want to access. */ - public CCodeExpression! container { get; set construct; } + public CCodeExpression container { get; set construct; } /** * Expression representing the index we want to access inside the * container. */ - public CCodeExpression! index { get; set construct; } + public CCodeExpression index { get; set construct; } - public CCodeElementAccess (CCodeExpression! cont, CCodeExpression! i) { + public CCodeElementAccess (CCodeExpression cont, CCodeExpression i) { container = cont; index = i; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { container.write (writer); writer.write_string ("["); index.write (writer); diff --git a/ccode/valaccodeemptystatement.vala b/ccode/valaccodeemptystatement.vala index e3d0162..2a27a4a 100644 --- a/ccode/valaccodeemptystatement.vala +++ b/ccode/valaccodeemptystatement.vala @@ -26,7 +26,7 @@ using GLib; * Represents an empty statement in the C code. */ public class Vala.CCodeEmptyStatement : CCodeStatement { - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_indent (); writer.write_string (";"); writer.write_newline (); diff --git a/ccode/valaccodeenum.vala b/ccode/valaccodeenum.vala index ac50ed0..7062065 100644 --- a/ccode/valaccodeenum.vala +++ b/ccode/valaccodeenum.vala @@ -43,11 +43,11 @@ public class Vala.CCodeEnum : CCodeNode { * @param name enum value name * @param value optional numerical value */ - public void add_value (CCodeEnumValue! value) { + public void add_value (CCodeEnumValue value) { values.add (value); } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { if (name != null) { writer.write_string ("typedef "); } diff --git a/ccode/valaccodeenumvalue.vala b/ccode/valaccodeenumvalue.vala index 94f6e5b..3de1e69 100644 --- a/ccode/valaccodeenumvalue.vala +++ b/ccode/valaccodeenumvalue.vala @@ -30,17 +30,17 @@ public class Vala.CCodeEnumValue : CCodeNode { /** * The name of this enum value. */ - public string! name { get; set; } + public string name { get; set; } /** * The numerical representation of this enum value. */ public CCodeExpression value { get; set; } - public CCodeEnumValue (construct string! name, construct CCodeExpression value = null) { + public CCodeEnumValue (construct string name, construct CCodeExpression value = null) { } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_string (name); if (value != null) { writer.write_string (" = "); diff --git a/ccode/valaccodeexpressionstatement.vala b/ccode/valaccodeexpressionstatement.vala index b591bc2..0320e79 100644 --- a/ccode/valaccodeexpressionstatement.vala +++ b/ccode/valaccodeexpressionstatement.vala @@ -29,13 +29,13 @@ public class Vala.CCodeExpressionStatement : CCodeStatement { /** * The expression to evaluate. */ - public CCodeExpression! expression { get; set construct; } + public CCodeExpression expression { get; set construct; } public CCodeExpressionStatement (CCodeExpression expr) { expression = expr; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { if (expression is CCodeCommaExpression) { // expand comma expression into multiple statements // to improve code readability diff --git a/ccode/valaccodeformalparameter.vala b/ccode/valaccodeformalparameter.vala index 307bc90..f5ce710 100644 --- a/ccode/valaccodeformalparameter.vala +++ b/ccode/valaccodeformalparameter.vala @@ -42,7 +42,7 @@ public class Vala.CCodeFormalParameter : CCodeNode { */ public bool ellipsis { get; set; } - public CCodeFormalParameter (string! n, string! type) { + public CCodeFormalParameter (string n, string type) { name = n; type_name = type; } @@ -51,7 +51,7 @@ public class Vala.CCodeFormalParameter : CCodeNode { ellipsis = true; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { if (!ellipsis) { writer.write_string (type_name); writer.write_string (" "); diff --git a/ccode/valaccodeforstatement.vala b/ccode/valaccodeforstatement.vala index a0b3912..28bcc5a 100644 --- a/ccode/valaccodeforstatement.vala +++ b/ccode/valaccodeforstatement.vala @@ -30,7 +30,7 @@ public class Vala.CCodeForStatement : CCodeStatement { /** * The loop condition. */ - public CCodeExpression! condition { get; set; } + public CCodeExpression condition { get; set; } /** * The loop body. @@ -40,7 +40,7 @@ public class Vala.CCodeForStatement : CCodeStatement { private Gee.List initializer = new ArrayList (); private Gee.List iterator = new ArrayList (); - public CCodeForStatement (construct CCodeExpression! condition, construct CCodeStatement body = null) { + public CCodeForStatement (construct CCodeExpression condition, construct CCodeStatement body = null) { } /** @@ -48,7 +48,7 @@ public class Vala.CCodeForStatement : CCodeStatement { * * @param expr an initializer expression */ - public void add_initializer (CCodeExpression! expr) { + public void add_initializer (CCodeExpression expr) { initializer.add (expr); } @@ -57,11 +57,11 @@ public class Vala.CCodeForStatement : CCodeStatement { * * @param expr an iterator expression */ - public void add_iterator (CCodeExpression! expr) { + public void add_iterator (CCodeExpression expr) { iterator.add (expr); } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { bool first; writer.write_indent (line); diff --git a/ccode/valaccodefragment.vala b/ccode/valaccodefragment.vala index c2f9d9f..3fe7e89 100644 --- a/ccode/valaccodefragment.vala +++ b/ccode/valaccodefragment.vala @@ -34,7 +34,7 @@ public class Vala.CCodeFragment : CCodeNode { * * @param node a C code node */ - public void append (CCodeNode! node) { + public void append (CCodeNode node) { children.add (node); } @@ -47,19 +47,19 @@ public class Vala.CCodeFragment : CCodeNode { return new ReadOnlyCollection (children); } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { foreach (CCodeNode node in children) { node.write (writer); } } - public override void write_declaration (CCodeWriter! writer) { + public override void write_declaration (CCodeWriter writer) { foreach (CCodeNode node in children) { node.write_declaration (writer); } } - public override void write_combined (CCodeWriter! writer) { + public override void write_combined (CCodeWriter writer) { foreach (CCodeNode node in children) { node.write_combined (writer); } diff --git a/ccode/valaccodefunction.vala b/ccode/valaccodefunction.vala index e3dfcf4..7e51c31 100644 --- a/ccode/valaccodefunction.vala +++ b/ccode/valaccodefunction.vala @@ -30,7 +30,7 @@ public class Vala.CCodeFunction : CCodeNode { /** * The name of this function. */ - public string! name { get; set; } + public string name { get; set; } /** * The function modifiers. @@ -40,7 +40,7 @@ public class Vala.CCodeFunction : CCodeNode { /** * The function return type. */ - public string! return_type { get; set; } + public string return_type { get; set; } /** * The function body. @@ -49,7 +49,7 @@ public class Vala.CCodeFunction : CCodeNode { private Gee.List parameters = new ArrayList (); - public CCodeFunction (construct string! name, construct string! return_type) { + public CCodeFunction (construct string name, construct string return_type) { } /** @@ -57,7 +57,7 @@ public class Vala.CCodeFunction : CCodeNode { * * @param param a formal parameter */ - public void add_parameter (CCodeFormalParameter! param) { + public void add_parameter (CCodeFormalParameter param) { parameters.add (param); } @@ -66,7 +66,7 @@ public class Vala.CCodeFunction : CCodeNode { * * @return copied function */ - public CCodeFunction! copy () { + public CCodeFunction copy () { var func = new CCodeFunction (name, return_type); func.modifiers = modifiers; @@ -81,7 +81,7 @@ public class Vala.CCodeFunction : CCodeNode { return func; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_indent (line); if (CCodeModifiers.STATIC in modifiers) { writer.write_string ("static "); diff --git a/ccode/valaccodefunctioncall.vala b/ccode/valaccodefunctioncall.vala index 05a5747..da68f4e 100644 --- a/ccode/valaccodefunctioncall.vala +++ b/ccode/valaccodefunctioncall.vala @@ -42,7 +42,7 @@ public class Vala.CCodeFunctionCall : CCodeExpression { * * @param expr a C code expression */ - public void add_argument (CCodeExpression! expr) { + public void add_argument (CCodeExpression expr) { arguments.add (expr); } @@ -55,7 +55,7 @@ public class Vala.CCodeFunctionCall : CCodeExpression { return new ReadOnlyList (arguments); } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { call.write (writer); writer.write_string (" ("); diff --git a/ccode/valaccodefunctiondeclarator.vala b/ccode/valaccodefunctiondeclarator.vala index 723fe82..9b32d2c 100644 --- a/ccode/valaccodefunctiondeclarator.vala +++ b/ccode/valaccodefunctiondeclarator.vala @@ -30,11 +30,11 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator { /** * The declarator name. */ - public string! name { get; set; } + public string name { get; set; } private Gee.List parameters = new ArrayList (); - public CCodeFunctionDeclarator (construct string! name) { + public CCodeFunctionDeclarator (construct string name) { } /** @@ -42,15 +42,15 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator { * * @param param a formal parameter */ - public void add_parameter (CCodeFormalParameter! param) { + public void add_parameter (CCodeFormalParameter param) { parameters.add (param); } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { write_declaration (writer); } - public override void write_declaration (CCodeWriter! writer) { + public override void write_declaration (CCodeWriter writer) { writer.write_string ("(*"); writer.write_string (name); writer.write_string (") ("); diff --git a/ccode/valaccodegotostatement.vala b/ccode/valaccodegotostatement.vala index 6be9aec..9c0a779 100644 --- a/ccode/valaccodegotostatement.vala +++ b/ccode/valaccodegotostatement.vala @@ -29,12 +29,12 @@ public class Vala.CCodeGotoStatement : CCodeStatement { /** * The name of the target label. */ - public string! name { get; set construct; } + public string name { get; set construct; } - public CCodeGotoStatement (construct string! name) { + public CCodeGotoStatement (construct string name) { } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_indent (); writer.write_string ("goto "); writer.write_string (name); diff --git a/ccode/valaccodeidentifier.vala b/ccode/valaccodeidentifier.vala index 8ea5663..43df6ec 100644 --- a/ccode/valaccodeidentifier.vala +++ b/ccode/valaccodeidentifier.vala @@ -29,13 +29,13 @@ public class Vala.CCodeIdentifier : CCodeExpression { /** * The name of this identifier. */ - public string! name { get; set construct; } + public string name { get; set construct; } - public CCodeIdentifier (string! _name) { + public CCodeIdentifier (string _name) { name = _name; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_string (name); } } diff --git a/ccode/valaccodeifstatement.vala b/ccode/valaccodeifstatement.vala index 5e87c48..effeb62 100644 --- a/ccode/valaccodeifstatement.vala +++ b/ccode/valaccodeifstatement.vala @@ -29,19 +29,19 @@ public class Vala.CCodeIfStatement : CCodeStatement { /** * The boolean condition to evaluate. */ - public CCodeExpression! condition { get; set construct; } + public CCodeExpression condition { get; set construct; } /** * The statement to be evaluated if the condition holds. */ - public CCodeStatement! true_statement { get; set construct; } + public CCodeStatement true_statement { get; set construct; } /** * The optional statement to be evaluated if the condition doesn't hold. */ 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; @@ -53,7 +53,7 @@ public class Vala.CCodeIfStatement : CCodeStatement { */ public bool else_if { get; set; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { if (!else_if) { writer.write_indent (line); } else { diff --git a/ccode/valaccodeincludedirective.vala b/ccode/valaccodeincludedirective.vala index b7a6311..c75c181 100644 --- a/ccode/valaccodeincludedirective.vala +++ b/ccode/valaccodeincludedirective.vala @@ -29,7 +29,7 @@ public class Vala.CCodeIncludeDirective : CCodeNode { /** * The file to be included. */ - public string! filename { get; set construct; } + public string filename { get; set construct; } /** * Specifies whether the specified file should be searched in the local @@ -37,12 +37,12 @@ public class Vala.CCodeIncludeDirective : CCodeNode { */ public bool local { get; set; } - public CCodeIncludeDirective (string! _filename, bool _local = false) { + public CCodeIncludeDirective (string _filename, bool _local = false) { filename = _filename; local = _local; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_indent (); writer.write_string ("#include "); if (local) { diff --git a/ccode/valaccodeinitializerlist.vala b/ccode/valaccodeinitializerlist.vala index d218fa7..15689c0 100644 --- a/ccode/valaccodeinitializerlist.vala +++ b/ccode/valaccodeinitializerlist.vala @@ -34,11 +34,11 @@ public class Vala.CCodeInitializerList : CCodeExpression { * * @param expr an expression */ - public void append (CCodeExpression! expr) { + public void append (CCodeExpression expr) { initializers.add (expr); } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_string ("{"); bool first = true; diff --git a/ccode/valaccodelabel.vala b/ccode/valaccodelabel.vala index 36112d2..9dd81da 100644 --- a/ccode/valaccodelabel.vala +++ b/ccode/valaccodelabel.vala @@ -29,12 +29,12 @@ public class Vala.CCodeLabel : CCodeStatement { /** * The name of this label. */ - public string! name { get; set construct; } + public string name { get; set construct; } - public CCodeLabel (construct string! name) { + public CCodeLabel (construct string name) { } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_indent (); writer.write_string (name); writer.write_string (":"); diff --git a/ccode/valaccodelinedirective.vala b/ccode/valaccodelinedirective.vala index 4ee36d9..3c2b07f 100644 --- a/ccode/valaccodelinedirective.vala +++ b/ccode/valaccodelinedirective.vala @@ -29,19 +29,19 @@ public class Vala.CCodeLineDirective : CCodeNode { /** * The name of the source file to be presumed. */ - public string! filename { get; set construct; } + public string filename { get; set construct; } /** * The line number in the source file to be presumed. */ public int line { get; set; } - public CCodeLineDirective (string! _filename, int _line) { + public CCodeLineDirective (string _filename, int _line) { filename = _filename; line = _line; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { if (!writer.bol) { writer.write_newline (); } diff --git a/ccode/valaccodemacroreplacement.vala b/ccode/valaccodemacroreplacement.vala index 744f711..f1fe7cc 100644 --- a/ccode/valaccodemacroreplacement.vala +++ b/ccode/valaccodemacroreplacement.vala @@ -29,25 +29,25 @@ public class Vala.CCodeMacroReplacement : CCodeNode { /** * The name of this macro. */ - public string! name { get; set construct; } + public string name { get; set construct; } /** * The replacement of this macro. */ - public string! replacement { get; set; } + public string replacement { get; set; } /** * The replacement expression of this macro. */ public CCodeExpression replacement_expression { get; set; } - public CCodeMacroReplacement (construct string! name, construct string! replacement) { + public CCodeMacroReplacement (construct string name, construct string replacement) { } - public CCodeMacroReplacement.with_expression (construct string! name, construct CCodeExpression! replacement_expression) { + public CCodeMacroReplacement.with_expression (construct string name, construct CCodeExpression replacement_expression) { } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_indent (); writer.write_string ("#define "); writer.write_string (name); diff --git a/ccode/valaccodememberaccess.vala b/ccode/valaccodememberaccess.vala index 1ddb874..4c90628 100644 --- a/ccode/valaccodememberaccess.vala +++ b/ccode/valaccodememberaccess.vala @@ -29,31 +29,31 @@ public class Vala.CCodeMemberAccess : CCodeExpression { /** * The parent of the member. */ - public CCodeExpression! inner { get; set construct; } + public CCodeExpression inner { get; set construct; } /** * The name of the member. */ - public string! member_name { get; set construct; } + public string member_name { get; set construct; } /** * Specifies whether the member access happens by pointer dereferencing. */ public bool is_pointer { get; set; } - public CCodeMemberAccess (CCodeExpression! container, string! member, bool pointer = false) { + public CCodeMemberAccess (CCodeExpression container, string member, bool pointer = false) { inner = container; member_name = member; is_pointer = pointer; } - public CCodeMemberAccess.pointer (CCodeExpression! container, string! member) { + public CCodeMemberAccess.pointer (CCodeExpression container, string member) { inner = container; member_name = member; is_pointer = true; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { inner.write (writer); if (is_pointer) { writer.write_string ("->"); diff --git a/ccode/valaccodenewline.vala b/ccode/valaccodenewline.vala index 1f62d2a..937f046 100644 --- a/ccode/valaccodenewline.vala +++ b/ccode/valaccodenewline.vala @@ -26,7 +26,7 @@ using GLib; * Represents a line break in the C code. */ public class Vala.CCodeNewline : CCodeNode { - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_newline (); } } diff --git a/ccode/valaccodenode.vala b/ccode/valaccodenode.vala index 8e107c3..b6edeff 100644 --- a/ccode/valaccodenode.vala +++ b/ccode/valaccodenode.vala @@ -38,7 +38,7 @@ public abstract class Vala.CCodeNode : Object { * * @param writer a C code writer */ - public abstract void write (CCodeWriter! writer); + public abstract void write (CCodeWriter writer); /** * Writes declaration for this code node with the specified C code @@ -46,7 +46,7 @@ public abstract class Vala.CCodeNode : Object { * * @param writer a C code writer */ - public virtual void write_declaration (CCodeWriter! writer) { + public virtual void write_declaration (CCodeWriter writer) { } /** @@ -55,7 +55,7 @@ public abstract class Vala.CCodeNode : Object { * * @param writer a C code writer */ - public virtual void write_combined (CCodeWriter! writer) { + public virtual void write_combined (CCodeWriter writer) { write_declaration (writer); write (writer); } diff --git a/ccode/valaccodeoncesection.vala b/ccode/valaccodeoncesection.vala index 271c819..671553c 100644 --- a/ccode/valaccodeoncesection.vala +++ b/ccode/valaccodeoncesection.vala @@ -29,13 +29,13 @@ public class Vala.CCodeOnceSection : CCodeFragment { /** * The name of the guarding define. */ - public string! define { get; set construct; } + public string define { get; set construct; } - public CCodeOnceSection (string! def) { + public CCodeOnceSection (string def) { define = def; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_indent (); writer.write_string ("#ifndef "); writer.write_string (define); @@ -51,6 +51,6 @@ public class Vala.CCodeOnceSection : CCodeFragment { writer.write_newline (); } - public override void write_declaration (CCodeWriter! writer) { + public override void write_declaration (CCodeWriter writer) { } } diff --git a/ccode/valaccodeparenthesizedexpression.vala b/ccode/valaccodeparenthesizedexpression.vala index 304d3aa..f11d837 100644 --- a/ccode/valaccodeparenthesizedexpression.vala +++ b/ccode/valaccodeparenthesizedexpression.vala @@ -29,13 +29,13 @@ public class Vala.CCodeParenthesizedExpression : CCodeExpression { /** * The expression in the parenthesis. */ - public CCodeExpression! inner { get; set construct; } + public CCodeExpression inner { get; set construct; } - public CCodeParenthesizedExpression (CCodeExpression! expr) { + public CCodeParenthesizedExpression (CCodeExpression expr) { inner = expr; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_string ("("); inner.write (writer); diff --git a/ccode/valaccodereturnstatement.vala b/ccode/valaccodereturnstatement.vala index 8271fe1..94fa198 100644 --- a/ccode/valaccodereturnstatement.vala +++ b/ccode/valaccodereturnstatement.vala @@ -35,7 +35,7 @@ public class Vala.CCodeReturnStatement : CCodeStatement { return_expression = expr; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_indent (line); writer.write_string ("return"); diff --git a/ccode/valaccodestruct.vala b/ccode/valaccodestruct.vala index f77a826..b9352d5 100644 --- a/ccode/valaccodestruct.vala +++ b/ccode/valaccodestruct.vala @@ -30,11 +30,11 @@ public class Vala.CCodeStruct : CCodeNode { /** * The struct name. */ - public string! name { get; set; } + public string name { get; set; } private Gee.List declarations = new ArrayList (); - public CCodeStruct (construct string! name) { + public CCodeStruct (construct string name) { } /** @@ -42,7 +42,7 @@ public class Vala.CCodeStruct : CCodeNode { * * @param decl a variable declaration */ - public void add_declaration (CCodeDeclaration! decl) { + public void add_declaration (CCodeDeclaration decl) { declarations.add (decl); } @@ -52,13 +52,13 @@ public class Vala.CCodeStruct : CCodeNode { * @param type_name field type * @param name member name */ - public void add_field (string! type_name, string! name) { + public void add_field (string type_name, string name) { var decl = new CCodeDeclaration (type_name); decl.add_declarator (new CCodeVariableDeclarator (name)); add_declaration (decl); } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_string ("struct "); writer.write_string (name); writer.write_begin_block (); diff --git a/ccode/valaccodeswitchstatement.vala b/ccode/valaccodeswitchstatement.vala index 45436b3..a0e9425 100644 --- a/ccode/valaccodeswitchstatement.vala +++ b/ccode/valaccodeswitchstatement.vala @@ -30,12 +30,12 @@ public class Vala.CCodeSwitchStatement : CCodeStatement { /** * The switch expression. */ - public CCodeExpression! expression { get; set; } + public CCodeExpression expression { get; set; } private Gee.List case_statements = new ArrayList (); private Gee.List default_statements = new ArrayList (); - public CCodeSwitchStatement (construct CCodeExpression! expression) { + public CCodeSwitchStatement (construct CCodeExpression expression) { } /** @@ -43,7 +43,7 @@ public class Vala.CCodeSwitchStatement : CCodeStatement { * * @param case_stmt a case statement */ - public void add_case (CCodeCaseStatement! case_stmt) { + public void add_case (CCodeCaseStatement case_stmt) { case_statements.add (case_stmt); } @@ -52,11 +52,11 @@ public class Vala.CCodeSwitchStatement : CCodeStatement { * * @param stmt a statement */ - public void add_default_statement (CCodeStatement! stmt) { + public void add_default_statement (CCodeStatement stmt) { default_statements.add (stmt); } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_indent (line); writer.write_string ("switch ("); expression.write (writer); diff --git a/ccode/valaccodetypedefinition.vala b/ccode/valaccodetypedefinition.vala index 197dba0..f0723fc 100644 --- a/ccode/valaccodetypedefinition.vala +++ b/ccode/valaccodetypedefinition.vala @@ -41,10 +41,10 @@ public class Vala.CCodeTypeDefinition : CCodeNode { declarator = decl; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { } - public override void write_declaration (CCodeWriter! writer) { + public override void write_declaration (CCodeWriter writer) { writer.write_indent (); writer.write_string ("typedef "); diff --git a/ccode/valaccodeunaryexpression.vala b/ccode/valaccodeunaryexpression.vala index c3e2c6b..4bf7466 100644 --- a/ccode/valaccodeunaryexpression.vala +++ b/ccode/valaccodeunaryexpression.vala @@ -34,14 +34,14 @@ public class Vala.CCodeUnaryExpression : CCodeExpression { /** * The operand. */ - public CCodeExpression! inner { get; set construct; } + public CCodeExpression inner { get; set construct; } - public CCodeUnaryExpression (CCodeUnaryOperator op, CCodeExpression! expr) { + public CCodeUnaryExpression (CCodeUnaryOperator op, CCodeExpression expr) { operator = op; inner = expr; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { if (operator == CCodeUnaryOperator.PLUS) { writer.write_string ("+"); } else if (operator == CCodeUnaryOperator.MINUS) { diff --git a/ccode/valaccodevariabledeclarator.vala b/ccode/valaccodevariabledeclarator.vala index 68781f0..0443a81 100644 --- a/ccode/valaccodevariabledeclarator.vala +++ b/ccode/valaccodevariabledeclarator.vala @@ -29,23 +29,23 @@ public class Vala.CCodeVariableDeclarator : CCodeDeclarator { /** * The variable name. */ - public string! name { get; set construct; } + public string name { get; set construct; } /** * The optional initializer expression. */ public CCodeExpression initializer { get; set; } - public CCodeVariableDeclarator (string! _name) { + public CCodeVariableDeclarator (string _name) { name = _name; } - public CCodeVariableDeclarator.with_initializer (string! _name, CCodeExpression init) { + public CCodeVariableDeclarator.with_initializer (string _name, CCodeExpression init) { name = _name; initializer = init; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_string (name); if (initializer != null) { @@ -54,7 +54,7 @@ public class Vala.CCodeVariableDeclarator : CCodeDeclarator { } } - public override void write_declaration (CCodeWriter! writer) { + public override void write_declaration (CCodeWriter writer) { writer.write_string (name); // initializer lists can't be moved to a separate statement @@ -64,7 +64,7 @@ public class Vala.CCodeVariableDeclarator : CCodeDeclarator { } } - public override void write_initialization (CCodeWriter! writer) { + public override void write_initialization (CCodeWriter writer) { if (initializer != null && !(initializer is CCodeInitializerList)) { writer.write_indent (line); diff --git a/ccode/valaccodewhilestatement.vala b/ccode/valaccodewhilestatement.vala index 91869a0..1335fc5 100644 --- a/ccode/valaccodewhilestatement.vala +++ b/ccode/valaccodewhilestatement.vala @@ -29,19 +29,19 @@ public class Vala.CCodeWhileStatement : CCodeStatement { /** * The loop condition. */ - public CCodeExpression! condition { get; set construct; } + public CCodeExpression condition { get; set construct; } /** * The loop body. */ public CCodeStatement body { get; set; } - public CCodeWhileStatement (CCodeExpression! cond, CCodeStatement stmt = null) { + public CCodeWhileStatement (CCodeExpression cond, CCodeStatement stmt = null) { condition = cond; body = stmt; } - public override void write (CCodeWriter! writer) { + public override void write (CCodeWriter writer) { writer.write_indent (line); writer.write_string ("while ("); diff --git a/ccode/valaccodewriter.vala b/ccode/valaccodewriter.vala index 4e92538..66b33ac 100644 --- a/ccode/valaccodewriter.vala +++ b/ccode/valaccodewriter.vala @@ -68,7 +68,7 @@ public class Vala.CCodeWriter : Object { /* at begin of line */ private bool _bol = true; - public CCodeWriter (string! _filename) { + public CCodeWriter (string _filename) { filename = _filename; } @@ -128,7 +128,7 @@ public class Vala.CCodeWriter : Object { * * @param s a string */ - public void write_string (string! s) { + public void write_string (string s) { stream.printf ("%s", s); _bol = false; } @@ -171,7 +171,7 @@ public class Vala.CCodeWriter : Object { * * @param text the comment text */ - public void write_comment (string! text) { + public void write_comment (string text) { write_indent (); stream.printf ("/*"); bool first = true; diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala index 32e873d..1abbc17 100644 --- a/compiler/valacompiler.vala +++ b/compiler/valacompiler.vala @@ -96,7 +96,7 @@ class Vala.Compiler : Object { } } - private bool add_package (CodeContext! context, string! pkg) { + private bool add_package (CodeContext context, string pkg) { if (context.has_package (pkg)) { // ignore multiple occurences of the same package return true; @@ -301,7 +301,7 @@ class Vala.Compiler : Object { } /* ported from glibc */ - private static string! realpath (string! name) { + private static string realpath (string name) { string rpath; // start of path component diff --git a/gee/arraylist.vala b/gee/arraylist.vala index 4a49b48..08fdcdc 100644 --- a/gee/arraylist.vala +++ b/gee/arraylist.vala @@ -165,7 +165,7 @@ public class Gee.ArrayList : Object, Iterable, Collection, List { // concurrent modification protection public int _stamp = 0; - public Iterator (construct ArrayList! list) { + public Iterator (construct ArrayList list) { } public bool next () { diff --git a/gee/hashmap.vala b/gee/hashmap.vala index 2b76d8a..737e3f6 100644 --- a/gee/hashmap.vala +++ b/gee/hashmap.vala @@ -185,7 +185,7 @@ public class Gee.HashMap : Object, Map { private HashMap _map; - public KeySet (construct HashMap! map) { + public KeySet (construct HashMap map) { } public Type get_element_type () { @@ -232,7 +232,7 @@ public class Gee.HashMap : Object, Map { // concurrent modification protection private int _stamp; - public KeyIterator (construct HashMap! map) { + public KeyIterator (construct HashMap map) { } public bool next () { @@ -260,7 +260,7 @@ public class Gee.HashMap : Object, Map { private HashMap _map; - public ValueCollection (construct HashMap! map) { + public ValueCollection (construct HashMap map) { } public Type get_element_type () { @@ -313,7 +313,7 @@ public class Gee.HashMap : Object, Map { // concurrent modification protection private int _stamp; - public ValueIterator (construct HashMap! map) { + public ValueIterator (construct HashMap map) { } public bool next () { diff --git a/gee/hashset.vala b/gee/hashset.vala index 2bc9e3d..4cfdfd3 100644 --- a/gee/hashset.vala +++ b/gee/hashset.vala @@ -176,7 +176,7 @@ public class Gee.HashSet : Object, Iterable, Collection, Set { // concurrent modification protection private int _stamp = 0; - public Iterator (construct HashSet! set) { + public Iterator (construct HashSet set) { } public bool next () { diff --git a/gen-project/valaprojectgenerator.vala b/gen-project/valaprojectgenerator.vala index db4fd95..c1008ed 100644 --- a/gen-project/valaprojectgenerator.vala +++ b/gen-project/valaprojectgenerator.vala @@ -127,7 +127,7 @@ class Vala.ProjectGenerator : Dialog { ok_button.grab_default (); } - private HBox create_hbox (string! title, SizeGroup! size_group) { + private HBox create_hbox (string title, SizeGroup size_group) { var hbox = new HBox (false, 6); ((VBox) vbox).pack_start (hbox, false, false, 0); hbox.show (); @@ -150,9 +150,9 @@ class Vala.ProjectGenerator : Dialog { project_name = Path.get_basename (project_path); // only use [a-zA-Z0-9-]* as projectname - String project_name_str = new String (); - String make_name_str = new String (); - String namespace_name_str = new String (); + var project_name_str = new StringBuilder (); + var make_name_str = new StringBuilder (); + var namespace_name_str = new StringBuilder (); for (int i = 0; i < project_name.len (); i++) { unichar c = project_name[i]; if ((c >= 'a' && c <= 'z' ) || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) { @@ -238,7 +238,7 @@ class Vala.ProjectGenerator : Dialog { } private void write_autogen_sh () throws FileError { - String s = new String(); + var s = new StringBuilder (); s.append ("#!/bin/sh\n"); s.append ("# Run this to generate all the initial makefiles, etc.\n\n"); @@ -257,7 +257,7 @@ class Vala.ProjectGenerator : Dialog { private void write_configure_ac () throws FileError { bool use_gtk = (project_type == ProjectType.GTK_APPLICATION); - String s = new String(); + var s = new StringBuilder (); s.append_printf ("AC_INIT([%s], [0.1.0], [%s], [%s])\n", project_name, email_address, project_name); s.append ("AC_CONFIG_SRCDIR([Makefile.am])\n"); @@ -309,7 +309,7 @@ class Vala.ProjectGenerator : Dialog { private void write_makefile_am () throws FileError { bool use_gtk = (project_type == ProjectType.GTK_APPLICATION); - String s = new String(); + var s = new StringBuilder (); s.append ("NULL = \n\n"); @@ -371,8 +371,8 @@ class Vala.ProjectGenerator : Dialog { FileUtils.set_contents (project_path + "/Makefile.am", s.str, -1); } - private string generate_source_file_header (string! filename) { - String s = new String(); + private string generate_source_file_header (string filename) { + var s = new StringBuilder (); TimeVal tv; tv.get_current_time (); @@ -432,7 +432,7 @@ class Vala.ProjectGenerator : Dialog { } private void write_main_vala () throws FileError { - String s = new String(); + var s = new StringBuilder (); s.append (generate_source_file_header ("main.vala")); @@ -459,7 +459,7 @@ class Vala.ProjectGenerator : Dialog { } private void write_mainwindow_vala () throws FileError { - String s = new String(); + var s = new StringBuilder (); s.append (generate_source_file_header ("mainwindow.vala")); @@ -557,7 +557,7 @@ class Vala.ProjectGenerator : Dialog { private void write_potfiles () throws FileError { bool use_gtk = (project_type == ProjectType.GTK_APPLICATION); - String s = new String(); + var s = new StringBuilder (); s.append ("[encoding: UTF-8]\n"); s.append ("# List of source files which contain translatable strings.\n"); diff --git a/gobject-introspection/gidl.vapi b/gobject-introspection/gidl.vapi index 300a4a5..933ee44 100644 --- a/gobject-introspection/gidl.vapi +++ b/gobject-introspection/gidl.vapi @@ -24,7 +24,7 @@ namespace GLib { [CCode (cheader_filename = "gidlparser.h")] public static class Idl { - public static List parse_file (string! filename) throws MarkupError; + public static List parse_file (string filename) throws MarkupError; } [CCode (free_function = "g_idl_module_free", cheader_filename = "gidlmodule.h")] diff --git a/gobject/valaccodearraycreationexpressionbinding.vala b/gobject/valaccodearraycreationexpressionbinding.vala index 80f9a60..222d331 100644 --- a/gobject/valaccodearraycreationexpressionbinding.vala +++ b/gobject/valaccodearraycreationexpressionbinding.vala @@ -28,9 +28,9 @@ using Gee; * The link between an assignment and generated code. */ public class Vala.CCodeArrayCreationExpressionBinding : CCodeExpressionBinding { - public ArrayCreationExpression! array_creation_expression { get; set; } + public ArrayCreationExpression array_creation_expression { get; set; } - public CCodeArrayCreationExpressionBinding (construct CodeGenerator! codegen, construct ArrayCreationExpression! array_creation_expression) { + public CCodeArrayCreationExpressionBinding (construct CodeGenerator codegen, construct ArrayCreationExpression array_creation_expression) { } public override void emit () { diff --git a/gobject/valaccodeassignmentbinding.vala b/gobject/valaccodeassignmentbinding.vala index 03bbdd9..33f59fe 100644 --- a/gobject/valaccodeassignmentbinding.vala +++ b/gobject/valaccodeassignmentbinding.vala @@ -28,9 +28,9 @@ using Gee; * The link between an assignment and generated code. */ public class Vala.CCodeAssignmentBinding : CCodeExpressionBinding { - public Assignment! assignment { get; set; } + public Assignment assignment { get; set; } - public CCodeAssignmentBinding (construct CodeGenerator! codegen, construct Assignment! assignment) { + public CCodeAssignmentBinding (construct CodeGenerator codegen, construct Assignment assignment) { } private void emit_property_assignment () { diff --git a/gobject/valaccodecompiler.vala b/gobject/valaccodecompiler.vala index 433ba23..b4f8a37 100644 --- a/gobject/valaccodecompiler.vala +++ b/gobject/valaccodecompiler.vala @@ -49,7 +49,7 @@ public class Vala.CCodeCompiler : Object { * @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"; diff --git a/gobject/valaccodeelementaccessbinding.vala b/gobject/valaccodeelementaccessbinding.vala index 5c290ad..936684c 100644 --- a/gobject/valaccodeelementaccessbinding.vala +++ b/gobject/valaccodeelementaccessbinding.vala @@ -28,9 +28,9 @@ using Gee; * The link between an element access and generated code. */ public class Vala.CCodeElementAccessBinding : CCodeExpressionBinding { - public ElementAccess! element_access { get; set; } + public ElementAccess element_access { get; set; } - public CCodeElementAccessBinding (construct CodeGenerator! codegen, construct ElementAccess! element_access) { + public CCodeElementAccessBinding (construct CodeGenerator codegen, construct ElementAccess element_access) { } public override void emit () { diff --git a/gobject/valaccodegenerator.vala b/gobject/valaccodegenerator.vala index a18321b..c8fc18b 100644 --- a/gobject/valaccodegenerator.vala +++ b/gobject/valaccodegenerator.vala @@ -104,7 +104,6 @@ public class Vala.CCodeGenerator : CodeGenerator { public ErrorType gerror_type; public Typesymbol glist_type; public Typesymbol gslist_type; - public Typesymbol gstring_type; public Typesymbol gstringbuilder_type; public Typesymbol garray_type; public DataType gquark_type; @@ -198,7 +197,7 @@ public class Vala.CCodeGenerator : CodeGenerator { c_keywords.add ("cdecl"); } - public override void emit (CodeContext! context) { + public override void emit (CodeContext context) { this.context = context; context.find_header_cycles (); @@ -229,8 +228,7 @@ public class Vala.CCodeGenerator : CodeGenerator { gerror_type = new ErrorType (null, null); glist_type = (Typesymbol) glib_ns.scope.lookup ("List"); gslist_type = (Typesymbol) glib_ns.scope.lookup ("SList"); - gstring_type = (Typesymbol) glib_ns.scope.lookup ("StringBuilder"); - gstringbuilder_type = (Typesymbol) glib_ns.scope.lookup ("String"); + gstringbuilder_type = (Typesymbol) glib_ns.scope.lookup ("StringBuilder"); garray_type = (Typesymbol) glib_ns.scope.lookup ("Array"); gquark_type = new ValueType ((Typesymbol) glib_ns.scope.lookup ("Quark")); @@ -271,7 +269,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public override void visit_enum (Enum! en) { + public override void visit_enum (Enum en) { cenum = new CCodeEnum (en.get_cname ()); if (en.source_reference.comment != null) { @@ -374,7 +372,7 @@ public class Vala.CCodeGenerator : CodeGenerator { source_type_member_definition.append (regfun); } - public override void visit_enum_value (EnumValue! ev) { + public override void visit_enum_value (EnumValue ev) { if (ev.value == null) { cenum.add_value (new CCodeEnumValue (ev.get_cname ())); } else { @@ -421,7 +419,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public override void visit_delegate (Delegate! d) { + public override void visit_delegate (Delegate d) { d.accept_children (this); var cfundecl = new CCodeFunctionDeclarator (d.get_cname ()); @@ -442,7 +440,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public override void visit_member (Member! m) { + public override void visit_member (Member m) { /* stuff meant for all lockable members */ if (m is Lockable && ((Lockable)m).get_lock_used ()) { instance_priv_struct.add_field (mutex_type.get_cname (), get_symbol_lock_name (m)); @@ -472,7 +470,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public override void visit_constant (Constant! c) { + public override void visit_constant (Constant c) { c.accept_children (this); if (!c.is_internal_symbol () && !(c.type_reference is ArrayType)) { @@ -495,7 +493,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public override void visit_field (Field! f) { + public override void visit_field (Field f) { f.accept_children (this); var cl = f.parent_symbol as Class; @@ -656,7 +654,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - private bool is_constant_ccode_expression (CCodeExpression! cexpr) { + private bool is_constant_ccode_expression (CCodeExpression cexpr) { if (cexpr is CCodeConstant) { return true; } else if (cexpr is CCodeBinaryExpression) { @@ -672,7 +670,7 @@ public class Vala.CCodeGenerator : CodeGenerator { * Returns whether the passed cexpr is a pure expression, i.e. an * expression without side-effects. */ - public bool is_pure_ccode_expression (CCodeExpression! cexpr) { + public bool is_pure_ccode_expression (CCodeExpression cexpr) { if (cexpr is CCodeConstant || cexpr is CCodeIdentifier) { return true; } else if (cexpr is CCodeBinaryExpression) { @@ -687,7 +685,7 @@ public class Vala.CCodeGenerator : CodeGenerator { return (null != cparenthesized && is_pure_ccode_expression (cparenthesized.inner)); } - public override void visit_formal_parameter (FormalParameter! p) { + public override void visit_formal_parameter (FormalParameter p) { p.accept_children (this); if (!p.ellipsis) { @@ -708,7 +706,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public override void visit_property (Property! prop) { + public override void visit_property (Property prop) { int old_next_temp_var_id = next_temp_var_id; next_temp_var_id = 0; @@ -723,7 +721,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public override void visit_property_accessor (PropertyAccessor! acc) { + public override void visit_property_accessor (PropertyAccessor acc) { current_property_accessor = acc; current_method_inner_error = false; @@ -896,7 +894,7 @@ public class Vala.CCodeGenerator : CodeGenerator { current_property_accessor = null; } - public override void visit_constructor (Constructor! c) { + public override void visit_constructor (Constructor c) { current_method_inner_error = false; in_constructor = true; @@ -985,11 +983,11 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public override void visit_destructor (Destructor! d) { + public override void visit_destructor (Destructor d) { d.accept_children (this); } - public override void visit_block (Block! b) { + public override void visit_block (Block b) { current_symbol = b; b.accept_children (this); @@ -1040,11 +1038,11 @@ public class Vala.CCodeGenerator : CodeGenerator { current_symbol = current_symbol.parent_symbol; } - public override void visit_empty_statement (EmptyStatement! stmt) { + public override void visit_empty_statement (EmptyStatement stmt) { stmt.ccodenode = new CCodeEmptyStatement (); } - public override void visit_declaration_statement (DeclarationStatement! stmt) { + public override void visit_declaration_statement (DeclarationStatement stmt) { /* split declaration statement as var declarators * might have different types */ @@ -1079,7 +1077,7 @@ public class Vala.CCodeGenerator : CodeGenerator { temp_vars.clear (); } - private string! get_variable_cname (string! name) { + private string get_variable_cname (string name) { if (c_keywords.contains (name)) { return name + "_"; } else { @@ -1087,7 +1085,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public override void visit_variable_declarator (VariableDeclarator! decl) { + public override void visit_variable_declarator (VariableDeclarator decl) { decl.accept_children (this); if (decl.type_reference is ArrayType) { @@ -1163,7 +1161,7 @@ public class Vala.CCodeGenerator : CodeGenerator { decl.active = true; } - public override void visit_initializer_list (InitializerList! list) { + public override void visit_initializer_list (InitializerList list) { list.accept_children (this); var clist = new CCodeInitializerList (); @@ -1173,7 +1171,7 @@ public class Vala.CCodeGenerator : CodeGenerator { 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; @@ -1189,7 +1187,7 @@ public class Vala.CCodeGenerator : CodeGenerator { return decl; } - private CCodeExpression get_type_id_expression (DataType! type) { + private CCodeExpression get_type_id_expression (DataType type) { if (type.data_type != null) { return new CCodeIdentifier (type.data_type.get_type_id ()); } else if (type.type_parameter != null) { @@ -1200,7 +1198,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - 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 ()) { @@ -1228,7 +1226,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - private CCodeExpression get_destroy_func_expression (DataType! type) { + private CCodeExpression get_destroy_func_expression (DataType type) { if (type.data_type != null) { string unref_function; if (type.data_type.is_reference_counting ()) { @@ -1253,7 +1251,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public CCodeExpression get_unref_expression (CCodeExpression! cvar, DataType! type, Expression expr) { + public CCodeExpression get_unref_expression (CCodeExpression cvar, DataType type, Expression expr) { /* (foo == NULL ? NULL : foo = (unref (foo), NULL)) */ /* can be simplified to @@ -1301,7 +1299,7 @@ public class Vala.CCodeGenerator : CodeGenerator { cunrefcall.add_argument (new CCodeConstant ("NULL")); ccomma.append_expression (cunrefcall); } - } else if (type.data_type == gstring_type || type.data_type == gstringbuilder_type) { + } else if (type.data_type == gstringbuilder_type) { ccall.add_argument (new CCodeConstant ("TRUE")); } else if (type is ArrayType) { var array_type = (ArrayType) type; @@ -1340,7 +1338,7 @@ public class Vala.CCodeGenerator : CodeGenerator { return new CCodeConditionalExpression (cisnull, new CCodeConstant ("NULL"), new CCodeParenthesizedExpression (cassign)); } - public override void visit_end_full_expression (Expression! expr) { + public override void visit_end_full_expression (Expression expr) { /* expr is a full expression, i.e. an initializer, the * expression in an expression statement, the controlling * expression in if, while, for, or foreach statements @@ -1385,7 +1383,7 @@ public class Vala.CCodeGenerator : CodeGenerator { temp_ref_vars.clear (); } - private void append_temp_decl (CCodeFragment! cfrag, Collection temp_vars) { + private void append_temp_decl (CCodeFragment cfrag, Collection temp_vars) { foreach (VariableDeclarator decl in temp_vars) { var cdecl = new CCodeDeclaration (decl.type_reference.get_cname (true, !decl.type_reference.takes_ownership)); @@ -1411,7 +1409,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - private void add_simple_check (CodeNode! node, CCodeFragment! cfrag) { + private void add_simple_check (CodeNode node, CCodeFragment cfrag) { current_method_inner_error = true; var cprint_frag = new CCodeFragment (); @@ -1488,7 +1486,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public override void visit_expression_statement (ExpressionStatement! stmt) { + public override void visit_expression_statement (ExpressionStatement stmt) { stmt.ccodenode = new CCodeExpressionStatement ((CCodeExpression) stmt.expression.ccodenode); if (stmt.tree_can_fail && stmt.expression.can_fail) { @@ -1527,7 +1525,7 @@ public class Vala.CCodeGenerator : CodeGenerator { temp_ref_vars.clear (); } - private void create_temp_decl (Statement! stmt, Collection temp_vars) { + private void create_temp_decl (Statement stmt, Collection temp_vars) { /* declare temporary variables */ if (temp_vars.size == 0) { @@ -1544,7 +1542,7 @@ public class Vala.CCodeGenerator : CodeGenerator { ((CodeNode) stmt).ccodenode = cfrag; } - public override void visit_if_statement (IfStatement! stmt) { + public override void visit_if_statement (IfStatement stmt) { stmt.accept_children (this); if (stmt.false_statement != null) { @@ -1556,7 +1554,7 @@ public class Vala.CCodeGenerator : CodeGenerator { create_temp_decl (stmt, stmt.condition.temp_vars); } - public override void visit_switch_statement (SwitchStatement! stmt) { + public override void visit_switch_statement (SwitchStatement stmt) { // we need a temporary variable to save the property value var temp_decl = get_temp_variable_declarator (stmt.expression.static_type, true, stmt); stmt.expression.temp_vars.insert (0, temp_decl); @@ -1697,11 +1695,11 @@ public class Vala.CCodeGenerator : CodeGenerator { cswitchblock.append (ctopstmt); } - public override void visit_switch_section (SwitchSection! section) { + public override void visit_switch_section (SwitchSection section) { visit_block (section); } - public override void visit_while_statement (WhileStatement! stmt) { + public override void visit_while_statement (WhileStatement stmt) { stmt.accept_children (this); stmt.ccodenode = new CCodeWhileStatement ((CCodeExpression) stmt.condition.ccodenode, (CCodeStatement) stmt.body.ccodenode); @@ -1709,7 +1707,7 @@ public class Vala.CCodeGenerator : CodeGenerator { create_temp_decl (stmt, stmt.condition.temp_vars); } - public override void visit_do_statement (DoStatement! stmt) { + public override void visit_do_statement (DoStatement stmt) { stmt.accept_children (this); stmt.ccodenode = new CCodeDoStatement ((CCodeStatement) stmt.body.ccodenode, (CCodeExpression) stmt.condition.ccodenode); @@ -1717,7 +1715,7 @@ public class Vala.CCodeGenerator : CodeGenerator { create_temp_decl (stmt, stmt.condition.temp_vars); } - public override void visit_for_statement (ForStatement! stmt) { + public override void visit_for_statement (ForStatement stmt) { stmt.accept_children (this); CCodeExpression ccondition = null; @@ -1743,7 +1741,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public override void visit_foreach_statement (ForeachStatement! stmt) { + public override void visit_foreach_statement (ForeachStatement stmt) { stmt.variable_declarator.active = true; stmt.collection_variable_declarator.active = true; if (stmt.iterator_variable_declarator != null) { @@ -2004,13 +2002,13 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public override void visit_break_statement (BreakStatement! stmt) { + public override void visit_break_statement (BreakStatement stmt) { stmt.ccodenode = new CCodeBreakStatement (); create_local_free (stmt, true); } - public override void visit_continue_statement (ContinueStatement! stmt) { + public override void visit_continue_statement (ContinueStatement stmt) { stmt.ccodenode = new CCodeContinueStatement (); create_local_free (stmt, true); @@ -2118,7 +2116,7 @@ public class Vala.CCodeGenerator : CodeGenerator { expr.temp_vars.add (return_expr_decl); } - public override void visit_return_statement (ReturnStatement! stmt) { + public override void visit_return_statement (ReturnStatement stmt) { if (stmt.return_expression != null) { // avoid unnecessary ref/unref pair if (stmt.return_expression.ref_missing && @@ -2206,7 +2204,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public override void visit_throw_statement (ThrowStatement! stmt) { + public override void visit_throw_statement (ThrowStatement stmt) { stmt.accept_children (this); var cfrag = new CCodeFragment (); @@ -2224,7 +2222,7 @@ public class Vala.CCodeGenerator : CodeGenerator { stmt.ccodenode = cfrag; } - public override void visit_try_statement (TryStatement! stmt) { + public override void visit_try_statement (TryStatement stmt) { var old_try = current_try; var old_try_id = current_try_id; current_try = stmt; @@ -2255,7 +2253,7 @@ public class Vala.CCodeGenerator : CodeGenerator { current_try_id = old_try_id; } - public override void visit_catch_clause (CatchClause! clause) { + public override void visit_catch_clause (CatchClause clause) { current_method_inner_error = true; clause.accept_children (this); @@ -2277,11 +2275,11 @@ public class Vala.CCodeGenerator : CodeGenerator { clause.ccodenode = cfrag; } - private string get_symbol_lock_name (Symbol! sym) { + private string get_symbol_lock_name (Symbol sym) { return "__lock_%s".printf (sym.name); } - public override void visit_lock_statement (LockStatement! stmt) { + public override void visit_lock_statement (LockStatement stmt) { var cn = new CCodeFragment (); CCodeExpression l = null; CCodeFunctionCall fc; @@ -2323,17 +2321,17 @@ public class Vala.CCodeGenerator : CodeGenerator { stmt.ccodenode = new CCodeExpressionStatement (ccall); } - public override void visit_array_creation_expression (ArrayCreationExpression! expr) { + public override void visit_array_creation_expression (ArrayCreationExpression expr) { expr.code_binding.emit (); } - public override void visit_boolean_literal (BooleanLiteral! expr) { + public override void visit_boolean_literal (BooleanLiteral expr) { expr.ccodenode = new CCodeConstant (expr.value ? "TRUE" : "FALSE"); visit_expression (expr); } - public override void visit_character_literal (CharacterLiteral! expr) { + public override void visit_character_literal (CharacterLiteral expr) { if (expr.get_char () >= 0x20 && expr.get_char () < 0x80) { expr.ccodenode = new CCodeConstant (expr.value); } else { @@ -2343,31 +2341,31 @@ public class Vala.CCodeGenerator : CodeGenerator { visit_expression (expr); } - public override void visit_integer_literal (IntegerLiteral! expr) { + public override void visit_integer_literal (IntegerLiteral expr) { expr.ccodenode = new CCodeConstant (expr.value); visit_expression (expr); } - public override void visit_real_literal (RealLiteral! expr) { + public override void visit_real_literal (RealLiteral expr) { expr.ccodenode = new CCodeConstant (expr.value); visit_expression (expr); } - public override void visit_string_literal (StringLiteral! expr) { + public override void visit_string_literal (StringLiteral expr) { expr.ccodenode = new CCodeConstant (expr.value); visit_expression (expr); } - public override void visit_null_literal (NullLiteral! expr) { + public override void visit_null_literal (NullLiteral expr) { expr.ccodenode = new CCodeConstant ("NULL"); visit_expression (expr); } - public override void visit_parenthesized_expression (ParenthesizedExpression! expr) { + public override void visit_parenthesized_expression (ParenthesizedExpression expr) { expr.accept_children (this); expr.ccodenode = new CCodeParenthesizedExpression ((CCodeExpression) expr.inner.ccodenode); @@ -2375,11 +2373,11 @@ public class Vala.CCodeGenerator : CodeGenerator { visit_expression (expr); } - private string! get_array_length_cname (string! array_cname, int dim) { + private string get_array_length_cname (string array_cname, int dim) { return "%s_length%d".printf (array_cname, dim); } - public CCodeExpression! get_array_length_cexpression (Expression! array_expr, int dim = -1) { + public CCodeExpression get_array_length_cexpression (Expression array_expr, int dim = -1) { // dim == -1 => total size over all dimensions if (dim == -1) { var array_type = array_expr.static_type as ArrayType; @@ -2513,11 +2511,11 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - private string! get_delegate_target_cname (string! delegate_cname) { + private string get_delegate_target_cname (string delegate_cname) { return "%s_target".printf (delegate_cname); } - public CCodeExpression! get_delegate_target_cexpression (Expression! delegate_expr) { + public CCodeExpression get_delegate_target_cexpression (Expression delegate_expr) { bool is_out = false; if (delegate_expr is UnaryExpression) { @@ -2626,15 +2624,15 @@ public class Vala.CCodeGenerator : CodeGenerator { return new CCodeConstant ("NULL"); } - public override void visit_element_access (ElementAccess! expr) { + public override void visit_element_access (ElementAccess expr) { expr.code_binding.emit (); } - public override void visit_base_access (BaseAccess! expr) { + public override void visit_base_access (BaseAccess expr) { expr.ccodenode = new InstanceCast (new CCodeIdentifier ("self"), expr.static_type.data_type); } - public override void visit_postfix_expression (PostfixExpression! expr) { + public override void visit_postfix_expression (PostfixExpression expr) { MemberAccess ma = find_property_access (expr.inner); if (ma != null) { // property postfix expression @@ -2667,7 +2665,7 @@ public class Vala.CCodeGenerator : CodeGenerator { visit_expression (expr); } - private MemberAccess find_property_access (Expression! expr) { + private MemberAccess find_property_access (Expression expr) { if (expr is ParenthesizedExpression) { var pe = (ParenthesizedExpression) expr; return find_property_access (pe.inner); @@ -2685,7 +2683,7 @@ public class Vala.CCodeGenerator : CodeGenerator { return null; } - private CCodeExpression get_ref_expression (Expression! expr) { + private CCodeExpression get_ref_expression (Expression expr) { /* (temp = expr, temp == NULL ? NULL : ref (temp)) * * can be simplified to @@ -2773,7 +2771,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public void visit_expression (Expression! expr) { + public void visit_expression (Expression expr) { if (expr.static_type != null && expr.static_type.transfers_ownership && expr.static_type.floating_reference) { @@ -2796,7 +2794,7 @@ public class Vala.CCodeGenerator : CodeGenerator { } } - public override void visit_object_creation_expression (ObjectCreationExpression! expr) { + public override void visit_object_creation_expression (ObjectCreationExpression expr) { expr.accept_children (this); CCodeExpression instance = null; @@ -2989,17 +2987,17 @@ public class Vala.CCodeGenerator : CodeGenerator { visit_expression (expr); } - public override void visit_sizeof_expression (SizeofExpression! expr) { + public override void visit_sizeof_expression (SizeofExpression expr) { var csizeof = new CCodeFunctionCall (new CCodeIdentifier ("sizeof")); csizeof.add_argument (new CCodeIdentifier (expr.type_reference.data_type.get_cname ())); expr.ccodenode = csizeof; } - public override void visit_typeof_expression (TypeofExpression! expr) { + public override void visit_typeof_expression (TypeofExpression expr) { expr.ccodenode = get_type_id_expression (expr.type_reference); } - public override void visit_unary_expression (UnaryExpression! expr) { + public override void visit_unary_expression (UnaryExpression expr) { CCodeUnaryOperator op; if (expr.operator == UnaryOperator.PLUS) { op = CCodeUnaryOperator.PLUS; @@ -3023,7 +3021,7 @@ public class Vala.CCodeGenerator : CodeGenerator { visit_expression (expr); } - public override void visit_cast_expression (CastExpression! expr) { + public override void visit_cast_expression (CastExpression expr) { if (expr.type_reference.data_type != null && expr.type_reference.data_type.is_subtype_of (gtypeinstance_type)) { // GObject cast if (expr.is_silent_cast) { @@ -3057,15 +3055,15 @@ public class Vala.CCodeGenerator : CodeGenerator { visit_expression (expr); } - public override void visit_pointer_indirection (PointerIndirection! expr) { + public override void visit_pointer_indirection (PointerIndirection expr) { expr.ccodenode = new CCodeUnaryExpression (CCodeUnaryOperator.POINTER_INDIRECTION, (CCodeExpression) expr.inner.ccodenode); } - public override void visit_addressof_expression (AddressofExpression! expr) { + public override void visit_addressof_expression (AddressofExpression expr) { expr.ccodenode = new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, (CCodeExpression) expr.inner.ccodenode); } - public override void visit_reference_transfer_expression (ReferenceTransferExpression! expr) { + public override void visit_reference_transfer_expression (ReferenceTransferExpression expr) { /* (tmp = var, var = null, tmp) */ var ccomma = new CCodeCommaExpression (); var temp_decl = get_temp_variable_declarator (expr.static_type, true, expr); @@ -3080,7 +3078,7 @@ public class Vala.CCodeGenerator : CodeGenerator { visit_expression (expr); } - public override void visit_binary_expression (BinaryExpression! expr) { + public override void visit_binary_expression (BinaryExpression expr) { var cleft = (CCodeExpression) expr.left.ccodenode; var cright = (CCodeExpression) expr.right.ccodenode; @@ -3175,23 +3173,23 @@ public class Vala.CCodeGenerator : CodeGenerator { visit_expression (expr); } - static CCodeFunctionCall create_type_check (CCodeNode! ccodenode, Typesymbol! type) { + static CCodeFunctionCall create_type_check (CCodeNode ccodenode, Typesymbol type) { var ccheck = new CCodeFunctionCall (new CCodeIdentifier (type.get_upper_case_cname ("IS_"))); ccheck.add_argument ((CCodeExpression) ccodenode); return ccheck; } - public override void visit_type_check (TypeCheck! expr) { + public override void visit_type_check (TypeCheck expr) { expr.ccodenode = create_type_check (expr.expression.ccodenode, expr.type_reference.data_type); } - public override void visit_conditional_expression (ConditionalExpression! expr) { + public override void visit_conditional_expression (ConditionalExpression expr) { expr.ccodenode = new CCodeConditionalExpression ((CCodeExpression) expr.condition.ccodenode, (CCodeExpression) expr.true_expression.ccodenode, (CCodeExpression) expr.false_expression.ccodenode); visit_expression (expr); } - public override void visit_lambda_expression (LambdaExpression! l) { + public override void visit_lambda_expression (LambdaExpression l) { var old_temp_vars = temp_vars; var old_temp_ref_vars = temp_ref_vars; temp_vars = new ArrayList (); @@ -3205,7 +3203,7 @@ public class Vala.CCodeGenerator : CodeGenerator { l.ccodenode = new CCodeIdentifier (l.method.get_cname ()); } - public CCodeExpression! convert_from_generic_pointer (CCodeExpression! cexpr, DataType! actual_type) { + public CCodeExpression convert_from_generic_pointer (CCodeExpression cexpr, DataType actual_type) { var result = cexpr; if (actual_type.data_type is Struct) { var st = (Struct) actual_type.data_type; @@ -3224,7 +3222,7 @@ public class Vala.CCodeGenerator : CodeGenerator { return result; } - public CCodeExpression! convert_to_generic_pointer (CCodeExpression! cexpr, DataType! actual_type) { + public CCodeExpression convert_to_generic_pointer (CCodeExpression cexpr, DataType actual_type) { var result = cexpr; if (actual_type.data_type is Struct) { var st = (Struct) actual_type.data_type; @@ -3241,7 +3239,7 @@ public class Vala.CCodeGenerator : CodeGenerator { 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; } @@ -3435,11 +3433,11 @@ public class Vala.CCodeGenerator : CodeGenerator { return wrapper_name; } - public override void visit_assignment (Assignment! a) { + public override void visit_assignment (Assignment a) { a.code_binding.emit (); } - public CCodeFunctionCall get_property_set_call (Property! prop, MemberAccess! ma, CCodeExpression! cexpr) { + public CCodeFunctionCall get_property_set_call (Property prop, MemberAccess ma, CCodeExpression cexpr) { var set_func = "g_object_set"; var base_property = prop; @@ -3550,27 +3548,27 @@ public class Vala.CCodeGenerator : CodeGenerator { return type; } - public override CodeBinding create_namespace_binding (Namespace! node) { + public override CodeBinding create_namespace_binding (Namespace node) { return null; } - public override CodeBinding create_class_binding (Class! node) { + public override CodeBinding create_class_binding (Class node) { return null; } - public override CodeBinding create_struct_binding (Struct! node) { + public override CodeBinding create_struct_binding (Struct node) { return null; } - public override CodeBinding create_interface_binding (Interface! node) { + public override CodeBinding create_interface_binding (Interface node) { return null; } - public override CodeBinding create_enum_binding (Enum! node) { + public override CodeBinding create_enum_binding (Enum node) { return null; } - public override CodeBinding create_enum_value_binding (EnumValue! node) { + public override CodeBinding create_enum_value_binding (EnumValue node) { return null; } @@ -3582,139 +3580,139 @@ public class Vala.CCodeGenerator : CodeGenerator { return null; } - public override CodeBinding create_delegate_binding (Delegate! node) { + public override CodeBinding create_delegate_binding (Delegate node) { return null; } - public override CodeBinding create_constant_binding (Constant! node) { + public override CodeBinding create_constant_binding (Constant node) { return null; } - public override CodeBinding create_field_binding (Field! node) { + public override CodeBinding create_field_binding (Field node) { return null; } - public override CodeBinding create_method_binding (Method! node) { + public override CodeBinding create_method_binding (Method node) { return new CCodeMethodBinding (this, node); } - public override CodeBinding create_creation_method_binding (CreationMethod! node) { + public override CodeBinding create_creation_method_binding (CreationMethod node) { return null; } - public override CodeBinding create_formal_parameter_binding (FormalParameter! node) { + public override CodeBinding create_formal_parameter_binding (FormalParameter node) { return null; } - public override CodeBinding create_property_binding (Property! node) { + public override CodeBinding create_property_binding (Property node) { return null; } - public override CodeBinding create_property_accessor_binding (PropertyAccessor! node) { + public override CodeBinding create_property_accessor_binding (PropertyAccessor node) { return null; } - public override CodeBinding create_signal_binding (Signal! node) { + public override CodeBinding create_signal_binding (Signal node) { return null; } - public override CodeBinding create_constructor_binding (Constructor! node) { + public override CodeBinding create_constructor_binding (Constructor node) { return null; } - public override CodeBinding create_destructor_binding (Destructor! node) { + public override CodeBinding create_destructor_binding (Destructor node) { return null; } - public override CodeBinding create_type_parameter_binding (TypeParameter! node) { + public override CodeBinding create_type_parameter_binding (TypeParameter node) { return null; } - public override CodeBinding create_block_binding (Block! node) { + public override CodeBinding create_block_binding (Block node) { return null; } - public override CodeBinding create_empty_statement_binding (EmptyStatement! node) { + public override CodeBinding create_empty_statement_binding (EmptyStatement node) { return null; } - public override CodeBinding create_declaration_statement_binding (DeclarationStatement! node) { + public override CodeBinding create_declaration_statement_binding (DeclarationStatement node) { return null; } - public override CodeBinding create_local_variable_declaration_binding (LocalVariableDeclaration! node) { + public override CodeBinding create_local_variable_declaration_binding (LocalVariableDeclaration node) { return null; } - public override CodeBinding create_variable_declarator_binding (VariableDeclarator! node) { + public override CodeBinding create_variable_declarator_binding (VariableDeclarator node) { return null; } - public override CodeBinding create_initializer_list_binding (InitializerList! node) { + public override CodeBinding create_initializer_list_binding (InitializerList node) { return null; } - public override CodeBinding create_expression_statement_binding (ExpressionStatement! node) { + public override CodeBinding create_expression_statement_binding (ExpressionStatement node) { return null; } - public override CodeBinding create_if_statement_binding (IfStatement! node) { + public override CodeBinding create_if_statement_binding (IfStatement node) { return null; } - public override CodeBinding create_switch_statement_binding (SwitchStatement! node) { + public override CodeBinding create_switch_statement_binding (SwitchStatement node) { return null; } - public override CodeBinding create_switch_section_binding (SwitchSection! node) { + public override CodeBinding create_switch_section_binding (SwitchSection node) { return null; } - public override CodeBinding create_switch_label_binding (SwitchLabel! node) { + public override CodeBinding create_switch_label_binding (SwitchLabel node) { return null; } - public override CodeBinding create_while_statement_binding (WhileStatement! node) { + public override CodeBinding create_while_statement_binding (WhileStatement node) { return null; } - public override CodeBinding create_do_statement_binding (DoStatement! node) { + public override CodeBinding create_do_statement_binding (DoStatement node) { return null; } - public override CodeBinding create_for_statement_binding (ForStatement! node) { + public override CodeBinding create_for_statement_binding (ForStatement node) { return null; } - public override CodeBinding create_foreach_statement_binding (ForeachStatement! node) { + public override CodeBinding create_foreach_statement_binding (ForeachStatement node) { return null; } - public override CodeBinding create_break_statement_binding (BreakStatement! node) { + public override CodeBinding create_break_statement_binding (BreakStatement node) { return null; } - public override CodeBinding create_continue_statement_binding (ContinueStatement! node) { + public override CodeBinding create_continue_statement_binding (ContinueStatement node) { return null; } - public override CodeBinding create_return_statement_binding (ReturnStatement! node) { + public override CodeBinding create_return_statement_binding (ReturnStatement node) { return null; } - public override CodeBinding create_throw_statement_binding (ThrowStatement! node) { + public override CodeBinding create_throw_statement_binding (ThrowStatement node) { return null; } - public override CodeBinding create_try_statement_binding (TryStatement! node) { + public override CodeBinding create_try_statement_binding (TryStatement node) { return null; } - public override CodeBinding create_catch_clause_binding (CatchClause! node) { + public override CodeBinding create_catch_clause_binding (CatchClause node) { return null; } - public override CodeBinding create_lock_statement_binding (LockStatement! node) { + public override CodeBinding create_lock_statement_binding (LockStatement node) { return null; } @@ -3722,115 +3720,115 @@ public class Vala.CCodeGenerator : CodeGenerator { return null; } - public override CodeBinding create_array_creation_expression_binding (ArrayCreationExpression! node) { + public override CodeBinding create_array_creation_expression_binding (ArrayCreationExpression node) { return new CCodeArrayCreationExpressionBinding (this, node); } - public override CodeBinding create_boolean_literal_binding (BooleanLiteral! node) { + public override CodeBinding create_boolean_literal_binding (BooleanLiteral node) { return null; } - public override CodeBinding create_character_literal_binding (CharacterLiteral! node) { + public override CodeBinding create_character_literal_binding (CharacterLiteral node) { return null; } - public override CodeBinding create_integer_literal_binding (IntegerLiteral! node) { + public override CodeBinding create_integer_literal_binding (IntegerLiteral node) { return null; } - public override CodeBinding create_real_literal_binding (RealLiteral! node) { + public override CodeBinding create_real_literal_binding (RealLiteral node) { return null; } - public override CodeBinding create_string_literal_binding (StringLiteral! node) { + public override CodeBinding create_string_literal_binding (StringLiteral node) { return null; } - public override CodeBinding create_null_literal_binding (NullLiteral! node) { + public override CodeBinding create_null_literal_binding (NullLiteral node) { return null; } - public override CodeBinding create_parenthesized_expression_binding (ParenthesizedExpression! node) { + public override CodeBinding create_parenthesized_expression_binding (ParenthesizedExpression node) { return null; } - public override CodeBinding create_member_access_binding (MemberAccess! node) { + public override CodeBinding create_member_access_binding (MemberAccess node) { return null; } - public override CodeBinding create_member_access_simple_binding (MemberAccess! node) { + public override CodeBinding create_member_access_simple_binding (MemberAccess node) { return null; } - public override CodeBinding create_invocation_expression_binding (InvocationExpression! node) { + public override CodeBinding create_invocation_expression_binding (InvocationExpression node) { return null; } - public override CodeBinding create_element_access_binding (ElementAccess! node) { + public override CodeBinding create_element_access_binding (ElementAccess node) { return new CCodeElementAccessBinding (this, node); } - public override CodeBinding create_base_access_binding (BaseAccess! node) { + public override CodeBinding create_base_access_binding (BaseAccess node) { return null; } - public override CodeBinding create_postfix_expression_binding (PostfixExpression! node) { + public override CodeBinding create_postfix_expression_binding (PostfixExpression node) { return null; } - public override CodeBinding create_object_creation_expression_binding (ObjectCreationExpression! node) { + public override CodeBinding create_object_creation_expression_binding (ObjectCreationExpression node) { return null; } - public override CodeBinding create_sizeof_expression_binding (SizeofExpression! node) { + public override CodeBinding create_sizeof_expression_binding (SizeofExpression node) { return null; } - public override CodeBinding create_typeof_expression_binding (TypeofExpression! node) { + public override CodeBinding create_typeof_expression_binding (TypeofExpression node) { return null; } - public override CodeBinding create_unary_expression_binding (UnaryExpression! node) { + public override CodeBinding create_unary_expression_binding (UnaryExpression node) { return null; } - public override CodeBinding create_cast_expression_binding (CastExpression! node) { + public override CodeBinding create_cast_expression_binding (CastExpression node) { return null; } - public override CodeBinding create_pointer_indirection_binding (PointerIndirection! node) { + public override CodeBinding create_pointer_indirection_binding (PointerIndirection node) { return null; } - public override CodeBinding create_addressof_expression_binding (AddressofExpression! node) { + public override CodeBinding create_addressof_expression_binding (AddressofExpression node) { return null; } - public override CodeBinding create_reference_transfer_expression_binding (ReferenceTransferExpression! node) { + public override CodeBinding create_reference_transfer_expression_binding (ReferenceTransferExpression node) { return null; } - public override CodeBinding create_binary_expression_binding (BinaryExpression! node) { + public override CodeBinding create_binary_expression_binding (BinaryExpression node) { return null; } - public override CodeBinding create_type_check_binding (TypeCheck! node) { + public override CodeBinding create_type_check_binding (TypeCheck node) { return null; } - public override CodeBinding create_conditional_expression_binding (ConditionalExpression! node) { + public override CodeBinding create_conditional_expression_binding (ConditionalExpression node) { return null; } - public override CodeBinding create_lambda_expression_binding (LambdaExpression! node) { + public override CodeBinding create_lambda_expression_binding (LambdaExpression node) { return null; } - public override CodeBinding create_lambda_expression_with_statement_body_binding (LambdaExpression! node) { + public override CodeBinding create_lambda_expression_with_statement_body_binding (LambdaExpression node) { return null; } - public override CodeBinding create_assignment_binding (Assignment! node) { + public override CodeBinding create_assignment_binding (Assignment node) { return new CCodeAssignmentBinding (this, node); } } diff --git a/gobject/valaccodegeneratorclass.vala b/gobject/valaccodegeneratorclass.vala index bd3b358..31bd5ac 100644 --- a/gobject/valaccodegeneratorclass.vala +++ b/gobject/valaccodegeneratorclass.vala @@ -24,7 +24,7 @@ using GLib; public class Vala.CCodeGenerator { - public override void visit_class (Class! cl) { + public override void visit_class (Class cl) { var old_symbol = current_symbol; var old_type_symbol = current_type_symbol; var old_class = current_class; @@ -281,7 +281,7 @@ public class Vala.CCodeGenerator { instance_dispose_fragment = old_instance_dispose_fragment; } - private void add_class_init_function (Class! cl) { + private void add_class_init_function (Class cl) { var class_init = new CCodeFunction ("%s_class_init".printf (cl.get_lower_case_cname (null)), "void"); class_init.add_parameter (new CCodeFormalParameter ("klass", "%sClass *".printf (cl.get_cname ()))); class_init.modifiers = CCodeModifiers.STATIC; @@ -451,7 +451,7 @@ public class Vala.CCodeGenerator { source_type_member_definition.append (class_init); } - private void add_interface_init_function (Class! cl, Interface! iface) { + private void add_interface_init_function (Class cl, Interface iface) { var iface_init = new CCodeFunction ("%s_%s_interface_init".printf (cl.get_lower_case_cname (null), iface.get_lower_case_cname (null)), "void"); iface_init.add_parameter (new CCodeFormalParameter ("iface", "%s *".printf (iface.get_type_cname ()))); iface_init.modifiers = CCodeModifiers.STATIC; @@ -496,7 +496,7 @@ public class Vala.CCodeGenerator { source_type_member_definition.append (iface_init); } - private void add_instance_init_function (Class! cl) { + private void add_instance_init_function (Class cl) { var instance_init = new CCodeFunction ("%s_init".printf (cl.get_lower_case_cname (null)), "void"); instance_init.add_parameter (new CCodeFormalParameter ("self", "%s *".printf (cl.get_cname ()))); instance_init.modifiers = CCodeModifiers.STATIC; @@ -521,7 +521,7 @@ public class Vala.CCodeGenerator { source_type_member_definition.append (instance_init); } - private void add_dispose_function (Class! cl) { + private void add_dispose_function (Class cl) { function = new CCodeFunction ("%s_dispose".printf (cl.get_lower_case_cname (null)), "void"); function.modifiers = CCodeModifiers.STATIC; @@ -558,7 +558,7 @@ public class Vala.CCodeGenerator { source_type_member_definition.append (function); } - public CCodeIdentifier! get_value_setter_function (DataType! type_reference) { + public CCodeIdentifier get_value_setter_function (DataType type_reference) { if (type_reference.data_type != null) { return new CCodeIdentifier (type_reference.data_type.get_set_value_function ()); } else { @@ -566,7 +566,7 @@ public class Vala.CCodeGenerator { } } - private bool class_has_readable_properties (Class! cl) { + private bool class_has_readable_properties (Class cl) { foreach (Property prop in cl.get_properties ()) { if (prop.get_accessor != null) { return true; @@ -575,7 +575,7 @@ public class Vala.CCodeGenerator { return false; } - private bool class_has_writable_properties (Class! cl) { + private bool class_has_writable_properties (Class cl) { foreach (Property prop in cl.get_properties ()) { if (prop.set_accessor != null) { return true; @@ -584,7 +584,7 @@ public class Vala.CCodeGenerator { return false; } - private void add_get_property_function (Class! cl) { + private void add_get_property_function (Class cl) { var get_prop = new CCodeFunction ("%s_get_property".printf (cl.get_lower_case_cname (null)), "void"); get_prop.modifiers = CCodeModifiers.STATIC; get_prop.add_parameter (new CCodeFormalParameter ("object", "GObject *")); @@ -639,7 +639,7 @@ public class Vala.CCodeGenerator { source_type_member_definition.append (get_prop); } - private void add_set_property_function (Class! cl) { + private void add_set_property_function (Class cl) { var set_prop = new CCodeFunction ("%s_set_property".printf (cl.get_lower_case_cname (null)), "void"); set_prop.modifiers = CCodeModifiers.STATIC; set_prop.add_parameter (new CCodeFormalParameter ("object", "GObject *")); diff --git a/gobject/valaccodegeneratorinterface.vala b/gobject/valaccodegeneratorinterface.vala index 00a517f..3dd1dbf 100644 --- a/gobject/valaccodegeneratorinterface.vala +++ b/gobject/valaccodegeneratorinterface.vala @@ -24,7 +24,7 @@ using GLib; public class Vala.CCodeGenerator { - public override void visit_interface (Interface! iface) { + public override void visit_interface (Interface iface) { current_symbol = iface; current_type_symbol = iface; @@ -93,7 +93,7 @@ public class Vala.CCodeGenerator { current_type_symbol = null; } - private CCodeFunctionCall! get_param_spec (Property! prop) { + private CCodeFunctionCall get_param_spec (Property prop) { var cspec = new CCodeFunctionCall (); cspec.add_argument (prop.get_canonical_cconstant ()); cspec.add_argument (new CCodeConstant ("\"%s\"".printf (prop.nick))); @@ -221,7 +221,7 @@ public class Vala.CCodeGenerator { return cspec; } - private CCodeFunctionCall! get_signal_creation (Signal! sig, Typesymbol! type) { + private CCodeFunctionCall get_signal_creation (Signal sig, Typesymbol type) { var csignew = new CCodeFunctionCall (new CCodeIdentifier ("g_signal_new")); csignew.add_argument (new CCodeConstant ("\"%s\"".printf (sig.name))); csignew.add_argument (new CCodeIdentifier (type.get_upper_case_cname ("TYPE_"))); @@ -262,7 +262,7 @@ public class Vala.CCodeGenerator { return csignew; } - private void add_interface_base_init_function (Interface! iface) { + private void add_interface_base_init_function (Interface iface) { var base_init = new CCodeFunction ("%s_base_init".printf (iface.get_lower_case_cname (null)), "void"); base_init.add_parameter (new CCodeFormalParameter ("iface", "%sIface *".printf (iface.get_cname ()))); base_init.modifiers = CCodeModifiers.STATIC; diff --git a/gobject/valaccodegeneratorinvocationexpression.vala b/gobject/valaccodegeneratorinvocationexpression.vala index 349766e..16ee3fc 100644 --- a/gobject/valaccodegeneratorinvocationexpression.vala +++ b/gobject/valaccodegeneratorinvocationexpression.vala @@ -25,7 +25,7 @@ using GLib; using Gee; public class Vala.CCodeGenerator { - public override void visit_invocation_expression (InvocationExpression! expr) { + public override void visit_invocation_expression (InvocationExpression expr) { expr.accept_children (this); // the bare function call @@ -566,7 +566,7 @@ public class Vala.CCodeGenerator { } } - private CCodeExpression! get_dbus_array_type (ArrayType array_type) { + private CCodeExpression get_dbus_array_type (ArrayType array_type) { var carray_type = new CCodeFunctionCall (new CCodeIdentifier ("dbus_g_type_get_collection")); carray_type.add_argument (new CCodeConstant ("\"GArray\"")); carray_type.add_argument (new CCodeIdentifier (array_type.element_type.data_type.get_type_id ())); diff --git a/gobject/valaccodegeneratormemberaccess.vala b/gobject/valaccodegeneratormemberaccess.vala index 9ba17ec..f5918b4 100644 --- a/gobject/valaccodegeneratormemberaccess.vala +++ b/gobject/valaccodegeneratormemberaccess.vala @@ -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; @@ -224,7 +224,7 @@ public class Vala.CCodeGenerator { } } - public override void visit_member_access (MemberAccess! expr) { + public override void visit_member_access (MemberAccess expr) { CCodeExpression pub_inst = null; DataType base_type = null; diff --git a/gobject/valaccodegeneratormethod.vala b/gobject/valaccodegeneratormethod.vala index c5aec68..016339c 100644 --- a/gobject/valaccodegeneratormethod.vala +++ b/gobject/valaccodegeneratormethod.vala @@ -25,7 +25,7 @@ using GLib; using Gee; public class Vala.CCodeGenerator { - public override void visit_method (Method! m) { + public override void visit_method (Method m) { Method old_method = current_method; DataType old_return_type = current_return_type; bool old_method_inner_error = current_method_inner_error; @@ -637,11 +637,11 @@ public class Vala.CCodeGenerator { } } - private CCodeStatement create_method_type_check_statement (Method! m, DataType! return_type, Typesymbol! t, bool non_null, string! var_name) { + private CCodeStatement create_method_type_check_statement (Method m, DataType return_type, Typesymbol t, bool non_null, string var_name) { return create_type_check_statement (m, return_type, t, non_null, var_name); } - private CCodeStatement create_property_type_check_statement (Property! prop, bool check_return_type, Typesymbol! t, bool non_null, string! var_name) { + private CCodeStatement create_property_type_check_statement (Property prop, bool check_return_type, Typesymbol t, bool non_null, string var_name) { if (check_return_type) { return create_type_check_statement (prop, prop.type_reference, t, non_null, var_name); } else { @@ -649,7 +649,7 @@ public class Vala.CCodeGenerator { } } - private CCodeStatement create_type_check_statement (CodeNode! method_node, DataType ret_type, Typesymbol! t, bool non_null, string! var_name) { + private CCodeStatement create_type_check_statement (CodeNode method_node, DataType ret_type, Typesymbol t, bool non_null, string var_name) { var ccheck = new CCodeFunctionCall (); if ((t is Class && ((Class) t).is_subtype_of (gobject_type)) || (t is Interface && !((Interface) t).declaration_only)) { @@ -688,7 +688,7 @@ public class Vala.CCodeGenerator { return new CCodeExpressionStatement (ccheck); } - private CCodeStatement create_precondition_statement (CodeNode! method_node, DataType ret_type, Expression precondition) { + private CCodeStatement create_precondition_statement (CodeNode method_node, DataType ret_type, Expression precondition) { var ccheck = new CCodeFunctionCall (); ccheck.add_argument ((CCodeExpression) precondition.ccodenode); @@ -719,7 +719,7 @@ public class Vala.CCodeGenerator { return new CCodeExpressionStatement (cassert); } - private CCodeExpression default_value_for_type (DataType! type, bool initializer_expression) { + private CCodeExpression default_value_for_type (DataType type, bool initializer_expression) { if ((type.data_type != null && type.data_type.is_reference_type ()) || type is PointerType || type is ArrayType) { return new CCodeConstant ("NULL"); } else if (type.data_type != null && type.data_type.get_default_value () != null) { @@ -748,7 +748,7 @@ public class Vala.CCodeGenerator { return null; } - public override void visit_creation_method (CreationMethod! m) { + public override void visit_creation_method (CreationMethod m) { if (m.body != null && current_type_symbol is Class && current_class.is_subtype_of (gobject_type)) { int n_params = 0; foreach (Statement stmt in m.body.get_statements ()) { @@ -767,7 +767,7 @@ public class Vala.CCodeGenerator { visit_method (m); } - private bool is_possible_entry_point (Method! m, ref bool return_value, ref bool args_parameter) { + private bool is_possible_entry_point (Method m, ref bool return_value, ref bool args_parameter) { if (m.name == null || m.name != "main") { // method must be called "main" return false; @@ -823,7 +823,7 @@ public class Vala.CCodeGenerator { return true; } - private void add_object_creation (CCodeBlock! b, bool has_params) { + private void add_object_creation (CCodeBlock b, bool has_params) { var cl = (Class) current_type_symbol; var ccall = new CCodeFunctionCall (new CCodeIdentifier ("g_object_newv")); @@ -845,7 +845,7 @@ public class Vala.CCodeGenerator { b.add_statement (cdeclaration); } - private Class find_fundamental_class (Class! cl) { + private Class find_fundamental_class (Class cl) { var fundamental_class = cl; while (fundamental_class != null && fundamental_class.base_class != gtypeinstance_type) { fundamental_class = fundamental_class.base_class; diff --git a/gobject/valaccodegeneratorsignal.vala b/gobject/valaccodegeneratorsignal.vala index 9c45ed7..806b8c2 100644 --- a/gobject/valaccodegeneratorsignal.vala +++ b/gobject/valaccodegeneratorsignal.vala @@ -36,7 +36,7 @@ public class Vala.CCodeGenerator { } } - 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 (); @@ -62,7 +62,7 @@ public class Vala.CCodeGenerator { return ret; } - private string get_value_type_name_from_type_reference (DataType! t) { + private string get_value_type_name_from_type_reference (DataType t) { if (t is PointerType || t.type_parameter != null || t.is_ref || t.is_out) { return "gpointer"; } else if (t is VoidType) { @@ -89,7 +89,7 @@ public class Vala.CCodeGenerator { return null; } - private string get_signal_signature (Signal! sig) { + private string get_signal_signature (Signal sig) { string signature; var params = sig.get_parameters (); @@ -111,7 +111,7 @@ public class Vala.CCodeGenerator { return signature; } - public override void visit_signal (Signal! sig) { + public override void visit_signal (Signal sig) { // parent_symbol may be null for late bound signals if (sig.parent_symbol != null) { var dt = sig.parent_symbol as Typesymbol; diff --git a/gobject/valaccodegeneratorsourcefile.vala b/gobject/valaccodegeneratorsourcefile.vala index 5cd0d0d..7d64f88 100644 --- a/gobject/valaccodegeneratorsourcefile.vala +++ b/gobject/valaccodegeneratorsourcefile.vala @@ -25,7 +25,7 @@ using GLib; using Gee; public class Vala.CCodeGenerator { - private CCodeIncludeDirective get_internal_include (string! filename) { + private CCodeIncludeDirective get_internal_include (string filename) { return new CCodeIncludeDirective (filename, context.library == null); } @@ -172,7 +172,7 @@ public class Vala.CCodeGenerator { source_type_member_definition.append (fun); } - public override void visit_source_file (SourceFile! source_file) { + public override void visit_source_file (SourceFile source_file) { header_begin = new CCodeFragment (); header_type_declaration = new CCodeFragment (); header_type_definition = new CCodeFragment (); @@ -361,8 +361,8 @@ public class Vala.CCodeGenerator { source_signal_marshaller_declaration = null; } - private static string get_define_for_filename (string! filename) { - var define = new String ("__"); + private static string get_define_for_filename (string filename) { + var define = new StringBuilder ("__"); var i = filename; while (i.len () > 0) { diff --git a/gobject/valaccodegeneratorstruct.vala b/gobject/valaccodegeneratorstruct.vala index f6375ef..e79d4eb 100644 --- a/gobject/valaccodegeneratorstruct.vala +++ b/gobject/valaccodegeneratorstruct.vala @@ -24,7 +24,7 @@ using GLib; public class Vala.CCodeGenerator { - public override void visit_struct (Struct! st) { + public override void visit_struct (Struct st) { var old_type_symbol = current_type_symbol; var old_instance_struct = instance_struct; var old_instance_dispose_fragment = instance_dispose_fragment; diff --git a/gobject/valaccodemethodbinding.vala b/gobject/valaccodemethodbinding.vala index 32bf1b3..376e542 100644 --- a/gobject/valaccodemethodbinding.vala +++ b/gobject/valaccodemethodbinding.vala @@ -27,16 +27,16 @@ using Gee; * The link between a method and generated code. */ public class Vala.CCodeMethodBinding : CCodeBinding { - public Method! method { get; set; } + public Method method { get; set; } public bool has_wrapper { get { return (method.get_attribute ("NoWrapper") == null); } } - public CCodeMethodBinding (construct CodeGenerator! codegen, construct Method! method) { + public CCodeMethodBinding (construct CodeGenerator codegen, construct Method method) { } - public static CCodeMethodBinding! get (Method! method) { + public static CCodeMethodBinding get (Method method) { return (CCodeMethodBinding) method.code_binding; } diff --git a/gobject/valaclassregisterfunction.vala b/gobject/valaclassregisterfunction.vala index 402641e..d074026 100644 --- a/gobject/valaclassregisterfunction.vala +++ b/gobject/valaclassregisterfunction.vala @@ -29,7 +29,7 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction { /** * Specifies the class to be registered. */ - public weak Class! class_reference { get; set; } + public weak Class class_reference { get; set; } /** * Creates a new C function to register the specified class at runtime. @@ -37,35 +37,35 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction { * @param cl a class * @return newly created class register function */ - public ClassRegisterFunction (Class! cl) { + public ClassRegisterFunction (Class cl) { class_reference = cl; } - public override Typesymbol! get_type_declaration () { + public override Typesymbol get_type_declaration () { return class_reference; } - public override string! get_type_struct_name () { + public override string get_type_struct_name () { return "%sClass".printf (class_reference.get_cname ()); } - public override string! get_base_init_func_name () { + public override string get_base_init_func_name () { return "NULL"; } - public override string! get_class_init_func_name () { + public override string get_class_init_func_name () { return "%s_class_init".printf (class_reference.get_lower_case_cname (null)); } - public override string! get_instance_struct_size () { + public override string get_instance_struct_size () { return "sizeof (%s)".printf (class_reference.get_cname ()); } - public override string! get_instance_init_func_name () { + public override string get_instance_init_func_name () { return "%s_init".printf (class_reference.get_lower_case_cname (null)); } - public override string! get_parent_type_name () { + public override string get_parent_type_name () { return class_reference.base_class.get_upper_case_cname ("TYPE_"); } @@ -81,7 +81,7 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction { return class_reference.access; } - public override CCodeFragment! get_type_interface_init_declaration () { + public override CCodeFragment get_type_interface_init_declaration () { var frag = new CCodeFragment (); foreach (DataType base_type in class_reference.get_base_types ()) { @@ -102,7 +102,7 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction { return frag; } - public override CCodeFragment! get_type_interface_init_statements () { + public override CCodeFragment get_type_interface_init_statements () { var frag = new CCodeFragment (); foreach (DataType base_type in class_reference.get_base_types ()) { diff --git a/gobject/valadbusbindingprovider.vala b/gobject/valadbusbindingprovider.vala index 5d8461a..95bec0e 100644 --- a/gobject/valadbusbindingprovider.vala +++ b/gobject/valadbusbindingprovider.vala @@ -51,7 +51,7 @@ public class Vala.DBusBindingProvider : Object, BindingProvider { public DBusBindingProvider () { } - public Symbol get_binding (MemberAccess! ma) { + public Symbol get_binding (MemberAccess ma) { if (connection_type != null && ma.inner != null && ma.inner.static_type != null && ma.inner.static_type.data_type == connection_type) { var type_args = ma.get_type_arguments (); if (type_args.size != 1) { @@ -105,7 +105,7 @@ public class Vala.DBusBindingProvider : Object, BindingProvider { return null; } - private bool is_dbus_interface (DataType! t) { + private bool is_dbus_interface (DataType t) { if (!(t.data_type is Interface)) { return false; } diff --git a/gobject/valadbusmethod.vala b/gobject/valadbusmethod.vala index 975fb84..e7774bf 100644 --- a/gobject/valadbusmethod.vala +++ b/gobject/valadbusmethod.vala @@ -34,7 +34,7 @@ public class Vala.DBusMethod : Method { return new ReadOnlyCollection (); } - public override string! get_default_cname () { + public override string get_default_cname () { return "dbus_g_proxy_begin_call"; } } diff --git a/gobject/valagidlwriter.vala b/gobject/valagidlwriter.vala index eeeb9c9..729ffaa 100644 --- a/gobject/valagidlwriter.vala +++ b/gobject/valagidlwriter.vala @@ -42,7 +42,7 @@ public class Vala.GIdlWriter : CodeVisitor { * @param context a code context * @param filename a relative or absolute filename */ - public void write_file (CodeContext! context, string! filename) { + public void write_file (CodeContext context, string filename) { this.context = context; var root_symbol = context.root; @@ -62,7 +62,7 @@ public class Vala.GIdlWriter : CodeVisitor { stream = null; } - public override void visit_namespace (Namespace! ns) { + public override void visit_namespace (Namespace ns) { if (ns.pkg) { return; } @@ -84,7 +84,7 @@ public class Vala.GIdlWriter : CodeVisitor { stream.printf ("\n"); } - public override void visit_class (Class! cl) { + public override void visit_class (Class cl) { if (cl.source_reference != null && cl.source_reference.file.pkg) { return; } @@ -142,7 +142,7 @@ public class Vala.GIdlWriter : CodeVisitor { } } - public override void visit_struct (Struct! st) { + public override void visit_struct (Struct st) { if (st.source_reference != null && st.source_reference.file.pkg) { return; } @@ -163,7 +163,7 @@ public class Vala.GIdlWriter : CodeVisitor { stream.printf ("\n"); } - public override void visit_interface (Interface! iface) { + public override void visit_interface (Interface iface) { if (iface.source_reference != null && iface.source_reference.file.pkg) { return; } @@ -210,7 +210,7 @@ public class Vala.GIdlWriter : CodeVisitor { stream.printf ("\n"); } - public override void visit_enum (Enum! en) { + public override void visit_enum (Enum en) { if (en.source_reference != null && en.source_reference.file.pkg) { return; } @@ -232,7 +232,7 @@ public class Vala.GIdlWriter : CodeVisitor { stream.printf ("\n"); } - public override void visit_enum_value (EnumValue! ev) { + public override void visit_enum_value (EnumValue ev) { write_indent (); stream.printf ("\n", ev.get_cname ()); } @@ -263,7 +263,7 @@ public class Vala.GIdlWriter : CodeVisitor { stream.printf ("\n", ecode.get_cname ()); } - public override void visit_constant (Constant! c) { + public override void visit_constant (Constant c) { if (c.source_reference != null && c.source_reference.file.pkg) { return; } @@ -276,7 +276,7 @@ public class Vala.GIdlWriter : CodeVisitor { stream.printf ("\n", c.get_cname ()); } - public override void visit_field (Field! f) { + public override void visit_field (Field f) { if (f.source_reference != null && f.source_reference.file.pkg) { return; } @@ -346,7 +346,7 @@ public class Vala.GIdlWriter : CodeVisitor { stream.printf ("\n"); } - public override void visit_delegate (Delegate! cb) { + public override void visit_delegate (Delegate cb) { if (cb.source_reference != null && cb.source_reference.file.pkg) { return; } @@ -369,7 +369,7 @@ public class Vala.GIdlWriter : CodeVisitor { stream.printf ("\n"); } - public override void visit_method (Method! m) { + public override void visit_method (Method m) { if (m.source_reference != null && m.source_reference.file.pkg) { return; } @@ -398,7 +398,7 @@ public class Vala.GIdlWriter : CodeVisitor { stream.printf ("\n"); } - public override void visit_creation_method (CreationMethod! m) { + public override void visit_creation_method (CreationMethod m) { if (m.source_reference != null && m.source_reference.file.pkg) { return; } @@ -426,7 +426,7 @@ public class Vala.GIdlWriter : CodeVisitor { stream.printf ("\n"); } - public override void visit_property (Property! prop) { + public override void visit_property (Property prop) { if (!check_accessibility (prop) || prop.overrides || prop.base_interface_property != null) { return; } @@ -442,7 +442,7 @@ public class Vala.GIdlWriter : CodeVisitor { stream.printf ("/>\n"); } - public override void visit_signal (Signal! sig) { + public override void visit_signal (Signal sig) { if (!check_accessibility (sig)) { return; } @@ -469,7 +469,7 @@ public class Vala.GIdlWriter : CodeVisitor { } } - private void write_return_type (DataType! type) { + private void write_return_type (DataType type) { write_indent (); stream.printf ("\n"); } - private bool check_accessibility (Symbol! sym) { + private bool check_accessibility (Symbol sym) { if (sym.access == SymbolAccessibility.PUBLIC || sym.access == SymbolAccessibility.PROTECTED) { return true; diff --git a/gobject/valainterfaceregisterfunction.vala b/gobject/valainterfaceregisterfunction.vala index 757524d..f7b32e4 100644 --- a/gobject/valainterfaceregisterfunction.vala +++ b/gobject/valainterfaceregisterfunction.vala @@ -30,37 +30,37 @@ public class Vala.InterfaceRegisterFunction : TypeRegisterFunction { /** * Specifies the interface to be registered. */ - public weak Interface! interface_reference { get; set; } + public weak Interface interface_reference { get; set; } - public InterfaceRegisterFunction (Interface! iface) { + public InterfaceRegisterFunction (Interface iface) { interface_reference = iface; } - public override Typesymbol! get_type_declaration () { + public override Typesymbol get_type_declaration () { return interface_reference; } - public override string! get_type_struct_name () { + public override string get_type_struct_name () { return interface_reference.get_type_cname (); } - public override string! get_base_init_func_name () { + public override string get_base_init_func_name () { return "%s_base_init".printf (interface_reference.get_lower_case_cname (null)); } - public override string! get_class_init_func_name () { + public override string get_class_init_func_name () { return "NULL"; } - public override string! get_instance_struct_size () { + public override string get_instance_struct_size () { return "0"; } - public override string! get_instance_init_func_name () { + public override string get_instance_init_func_name () { return "NULL"; } - public override string! get_parent_type_name () { + public override string get_parent_type_name () { return "G_TYPE_INTERFACE"; } @@ -68,7 +68,7 @@ public class Vala.InterfaceRegisterFunction : TypeRegisterFunction { return interface_reference.access; } - public override CCodeFragment! get_type_interface_init_statements () { + public override CCodeFragment get_type_interface_init_statements () { var frag = new CCodeFragment (); /* register all prerequisites */ diff --git a/gobject/valatyperegisterfunction.vala b/gobject/valatyperegisterfunction.vala index ee52df1..f2edaa0 100644 --- a/gobject/valatyperegisterfunction.vala +++ b/gobject/valatyperegisterfunction.vala @@ -137,49 +137,49 @@ public abstract class Vala.TypeRegisterFunction : Object { * * @return type to be registered */ - public abstract Typesymbol! get_type_declaration (); + public abstract Typesymbol get_type_declaration (); /** * Returns the name of the type struct in C code. * * @return C struct name */ - public abstract string! get_type_struct_name (); + public abstract string get_type_struct_name (); /** * Returns the name of the base_init function in C code. * * @return C function name */ - public abstract string! get_base_init_func_name (); + public abstract string get_base_init_func_name (); /** * Returns the name of the class_init function in C code. * * @return C function name */ - public abstract string! get_class_init_func_name (); + public abstract string get_class_init_func_name (); /** * Returns the size of the instance struct in C code. * * @return C instance struct size */ - public abstract string! get_instance_struct_size (); + public abstract string get_instance_struct_size (); /** * Returns the name of the instance_init function in C code. * * @return C function name */ - public abstract string! get_instance_init_func_name (); + public abstract string get_instance_init_func_name (); /** * Returns the name of the parent type in C code. * * @return C parent type name */ - public abstract string! get_parent_type_name (); + public abstract string get_parent_type_name (); /** * Returns the set of type flags to be applied when registering. @@ -195,7 +195,7 @@ public abstract class Vala.TypeRegisterFunction : Object { * * @return C declarations */ - public virtual CCodeFragment! get_type_interface_init_declaration () { + public virtual CCodeFragment get_type_interface_init_declaration () { return new CCodeFragment (); } @@ -204,14 +204,14 @@ public abstract class Vala.TypeRegisterFunction : Object { * * @return C statements */ - public abstract CCodeFragment! get_type_interface_init_statements (); + public abstract CCodeFragment get_type_interface_init_statements (); /** * Returns the declaration for this type register function in C code. * * @return C function declaration fragment */ - public CCodeFragment! get_declaration () { + public CCodeFragment get_declaration () { return declaration_fragment; } @@ -220,7 +220,7 @@ public abstract class Vala.TypeRegisterFunction : Object { * * @return C function definition fragment */ - public CCodeFragment! get_definition () { + public CCodeFragment get_definition () { return definition_fragment; } diff --git a/vala/valaaddressofexpression.vala b/vala/valaaddressofexpression.vala index 509db04..68d169b 100644 --- a/vala/valaaddressofexpression.vala +++ b/vala/valaaddressofexpression.vala @@ -29,7 +29,7 @@ public class Vala.AddressofExpression : Expression { /** * The variable whose address is to be computed. */ - public Expression! inner { + public Expression inner { get { return _inner; } @@ -39,7 +39,7 @@ public class Vala.AddressofExpression : Expression { } } - private Expression! _inner; + private Expression _inner; /** * Creates a new address-of expression. @@ -47,16 +47,16 @@ public class Vala.AddressofExpression : Expression { * @param inner variable whose address is to be computed * @return newly created address-of expression */ - public AddressofExpression (construct Expression! inner, construct SourceReference source_reference = null) { + public AddressofExpression (construct Expression inner, construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { inner.accept (visitor); visitor.visit_addressof_expression (this); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (inner == old_node) { inner = new_node; } diff --git a/vala/valaarraycreationexpression.vala b/vala/valaarraycreationexpression.vala index b2a8cc6..bbac6f0 100644 --- a/vala/valaarraycreationexpression.vala +++ b/vala/valaarraycreationexpression.vala @@ -59,7 +59,7 @@ public class Vala.ArrayCreationExpression : Expression { /** * Add a size expression. */ - public void append_size (Expression! size) { + public void append_size (Expression size) { sizes.add (size); } @@ -73,7 +73,7 @@ public class Vala.ArrayCreationExpression : Expression { public ArrayCreationExpression (construct DataType element_type, construct int rank, construct InitializerList initializer_list, construct SourceReference source_reference) { } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { if (element_type != null) { element_type.accept (visitor); } @@ -87,7 +87,7 @@ public class Vala.ArrayCreationExpression : Expression { } } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_array_creation_expression (this); } @@ -95,7 +95,7 @@ public class Vala.ArrayCreationExpression : Expression { return false; } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (element_type == old_type) { element_type = new_type; } diff --git a/vala/valaarraytype.vala b/vala/valaarraytype.vala index 48c7ee6..dbe07d5 100644 --- a/vala/valaarraytype.vala +++ b/vala/valaarraytype.vala @@ -40,7 +40,7 @@ public class Vala.ArrayType : ReferenceType { 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; @@ -115,7 +115,7 @@ public class Vala.ArrayType : ReferenceType { return move_method; } - public override DataType! copy () { + public override DataType copy () { var result = new ArrayType (element_type, rank, source_reference); result.transfers_ownership = transfers_ownership; result.takes_ownership = takes_ownership; @@ -140,11 +140,11 @@ public class Vala.ArrayType : ReferenceType { return true; } - public override string! to_string () { + public override string to_string () { return element_type.to_string () + "[]"; } - public override bool compatible (DataType! target_type, bool enable_non_null) { + public override bool compatible (DataType target_type, bool enable_non_null) { if (target_type is PointerType || (target_type.data_type != null && target_type.data_type.get_attribute ("PointerType") != null)) { /* any array type can be cast to a generic pointer */ return true; diff --git a/vala/valaassignment.vala b/vala/valaassignment.vala index 5e62a7e..594d01b 100644 --- a/vala/valaassignment.vala +++ b/vala/valaassignment.vala @@ -31,7 +31,7 @@ public class Vala.Assignment : Expression { /** * Left hand side of the assignment. */ - public Expression! left { + public Expression left { get { return _left; } set construct { _left = value; @@ -47,7 +47,7 @@ public class Vala.Assignment : Expression { /** * Right hand side of the assignment. */ - public Expression! right { + public Expression right { get { return _right; } set construct { _right = value; @@ -55,8 +55,8 @@ public class Vala.Assignment : Expression { } } - private Expression! _left; - private Expression! _right; + private Expression _left; + private Expression _right; /** * Creates a new assignment. @@ -67,19 +67,19 @@ public class Vala.Assignment : Expression { * @param source_reference reference to source code * @return newly created assignment */ - public Assignment (construct Expression! left, construct Expression! right, construct AssignmentOperator operator = AssignmentOperator.SIMPLE, construct SourceReference source_reference = null) { + public Assignment (construct Expression left, construct Expression right, construct AssignmentOperator operator = AssignmentOperator.SIMPLE, construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_assignment (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { left.accept (visitor); right.accept (visitor); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (left == old_node) { left = new_node; } diff --git a/vala/valaattribute.vala b/vala/valaattribute.vala index 45f0033..2c2dd4d 100644 --- a/vala/valaattribute.vala +++ b/vala/valaattribute.vala @@ -30,7 +30,7 @@ public class Vala.Attribute : CodeNode { /** * The name of the attribute type. */ - public string! name { get; set; } + public string name { get; set; } /** * Contains all specified attribute arguments. @@ -44,7 +44,7 @@ public class Vala.Attribute : CodeNode { * @param source_reference reference to source code * @return newly created attribute */ - public Attribute (construct string! name, construct SourceReference source_reference) { + public Attribute (construct string name, construct SourceReference source_reference) { } /** @@ -52,7 +52,7 @@ public class Vala.Attribute : CodeNode { * * @param arg named argument */ - public void add_argument (NamedArgument! arg) { + public void add_argument (NamedArgument arg) { args.add (arg); } @@ -62,7 +62,7 @@ public class Vala.Attribute : CodeNode { * @param name argument name * @return true if the argument has been found, false otherwise */ - public bool has_argument (string! name) { + public bool has_argument (string name) { // FIXME: use hash table foreach (NamedArgument arg in args) { if (arg.name == name) { @@ -79,7 +79,7 @@ public class Vala.Attribute : CodeNode { * @param name argument name * @return string value */ - public string get_string (string! name) { + public string get_string (string name) { // FIXME: use hash table foreach (NamedArgument arg in args) { if (arg.name == name) { @@ -99,7 +99,7 @@ public class Vala.Attribute : CodeNode { * @param name argument name * @return integer value */ - public int get_integer (string! name) { + public int get_integer (string name) { // FIXME: use hash table foreach (NamedArgument arg in args) { if (arg.name == name) { @@ -119,7 +119,7 @@ public class Vala.Attribute : CodeNode { * @param name argument name * @return double value */ - public double get_double (string! name) { + public double get_double (string name) { // FIXME: use hash table foreach (NamedArgument arg in args) { if (arg.name == name) { @@ -153,7 +153,7 @@ public class Vala.Attribute : CodeNode { * @param name argument name * @return boolean value */ - public bool get_bool (string! name) { + public bool get_bool (string name) { // FIXME: use hash table foreach (NamedArgument arg in args) { if (arg.name == name) { diff --git a/vala/valaattributeprocessor.vala b/vala/valaattributeprocessor.vala index 8a04275..0dba10c 100644 --- a/vala/valaattributeprocessor.vala +++ b/vala/valaattributeprocessor.vala @@ -32,15 +32,15 @@ public class Vala.AttributeProcessor : CodeVisitor { * * @param context a code context */ - public void process (CodeContext! context) { + public void process (CodeContext context) { context.accept (this); } - public override void visit_source_file (SourceFile! source_file) { + public override void visit_source_file (SourceFile source_file) { source_file.accept_children (this); } - public override void visit_namespace (Namespace! ns) { + public override void visit_namespace (Namespace ns) { ns.process_attributes (); foreach (Namespace ns in ns.get_namespaces ()) { @@ -48,63 +48,63 @@ public class Vala.AttributeProcessor : CodeVisitor { } } - public override void visit_class (Class! cl) { + public override void visit_class (Class cl) { cl.process_attributes (); cl.accept_children (this); } - public override void visit_struct (Struct! st) { + public override void visit_struct (Struct st) { st.process_attributes (); st.accept_children (this); } - public override void visit_interface (Interface! iface) { + public override void visit_interface (Interface iface) { iface.process_attributes (); iface.accept_children (this); } - public override void visit_enum (Enum! en) { + public override void visit_enum (Enum en) { en.process_attributes (); } - public override void visit_method (Method! m) { + public override void visit_method (Method m) { m.process_attributes (); m.accept_children (this); } - public override void visit_creation_method (CreationMethod! m) { + public override void visit_creation_method (CreationMethod m) { m.process_attributes (); m.accept_children (this); } - public override void visit_formal_parameter (FormalParameter! p) { + public override void visit_formal_parameter (FormalParameter p) { p.process_attributes (); } - public override void visit_property (Property! prop) { + public override void visit_property (Property prop) { prop.process_attributes (); } - public override void visit_delegate (Delegate! d) { + public override void visit_delegate (Delegate d) { d.process_attributes (); d.accept_children (this); } - public override void visit_constant (Constant! c) { + public override void visit_constant (Constant c) { c.process_attributes (); } - public override void visit_field (Field! f) { + public override void visit_field (Field f) { f.process_attributes (); } - public override void visit_signal (Signal! sig) { + public override void visit_signal (Signal sig) { sig.process_attributes (); sig.accept_children (this); diff --git a/vala/valabaseaccess.vala b/vala/valabaseaccess.vala index 3b310dd..b65d928 100644 --- a/vala/valabaseaccess.vala +++ b/vala/valabaseaccess.vala @@ -36,11 +36,11 @@ public class Vala.BaseAccess : Expression { source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_base_access (this); } - public override string! to_string () { + public override string to_string () { return "base"; } diff --git a/vala/valabinaryexpression.vala b/vala/valabinaryexpression.vala index 4ba7b0e..53422c1 100644 --- a/vala/valabinaryexpression.vala +++ b/vala/valabinaryexpression.vala @@ -36,7 +36,7 @@ public class Vala.BinaryExpression : Expression { /** * The left operand. */ - public Expression! left { + public Expression left { get { return _left; } @@ -49,7 +49,7 @@ public class Vala.BinaryExpression : Expression { /** * The right operand. */ - public Expression! right { + public Expression right { get { return _right; } @@ -59,8 +59,8 @@ public class Vala.BinaryExpression : Expression { } } - private Expression! _left; - private Expression! _right; + private Expression _left; + private Expression _right; /** * Creates a new binary expression. @@ -71,21 +71,21 @@ public class Vala.BinaryExpression : Expression { * @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; source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { left.accept (visitor); right.accept (visitor); visitor.visit_binary_expression (this); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (left == old_node) { left = new_node; } @@ -94,7 +94,7 @@ public class Vala.BinaryExpression : Expression { } } - private string! get_operator_string () { + private string get_operator_string () { switch (_operator) { case BinaryOperator.PLUS: return "+"; case BinaryOperator.MINUS: return "-"; @@ -120,7 +120,7 @@ public class Vala.BinaryExpression : Expression { assert_not_reached (); } - public override string! to_string () { + public override string to_string () { return _left.to_string () + get_operator_string () + _right.to_string (); } diff --git a/vala/valabindingprovider.vala b/vala/valabindingprovider.vala index d19456e..2babe3a 100644 --- a/vala/valabindingprovider.vala +++ b/vala/valabindingprovider.vala @@ -32,6 +32,6 @@ public interface Vala.BindingProvider : Object { * @param ma member access expression * @return resolved symbol or null if no binding can be provided */ - public abstract Symbol get_binding (MemberAccess! ma); + public abstract Symbol get_binding (MemberAccess ma); } diff --git a/vala/valablock.vala b/vala/valablock.vala index ace0921..f742bf2 100644 --- a/vala/valablock.vala +++ b/vala/valablock.vala @@ -49,7 +49,7 @@ public class Vala.Block : Symbol, Statement { * * @param stmt a statement */ - public void add_statement (Statement! stmt) { + public void add_statement (Statement stmt) { statement_list.add (stmt); } @@ -67,7 +67,7 @@ public class Vala.Block : Symbol, Statement { * * @param decl a variable declarator */ - public void add_local_variable (VariableDeclarator! decl) { + public void add_local_variable (VariableDeclarator decl) { local_variables.add (decl); } @@ -80,12 +80,12 @@ public class Vala.Block : Symbol, Statement { return new ReadOnlyCollection (local_variables); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_block (this); } - public override void accept_children (CodeVisitor! visitor) { - foreach (Statement! stmt in statement_list) { + public override void accept_children (CodeVisitor visitor) { + foreach (Statement stmt in statement_list) { stmt.accept (visitor); } } diff --git a/vala/valabooleanliteral.vala b/vala/valabooleanliteral.vala index fa1a519..7c435c7 100644 --- a/vala/valabooleanliteral.vala +++ b/vala/valabooleanliteral.vala @@ -43,11 +43,11 @@ public class Vala.BooleanLiteral : Literal { source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_boolean_literal (this); } - public override string! to_string () { + public override string to_string () { if (value) { return "true"; } else { diff --git a/vala/valabreakstatement.vala b/vala/valabreakstatement.vala index 1fa7315..9ac82a7 100644 --- a/vala/valabreakstatement.vala +++ b/vala/valabreakstatement.vala @@ -36,7 +36,7 @@ public class Vala.BreakStatement : CodeNode, Statement { source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_break_statement (this); } } diff --git a/vala/valacastexpression.vala b/vala/valacastexpression.vala index 64ae38c..4b73c3e 100644 --- a/vala/valacastexpression.vala +++ b/vala/valacastexpression.vala @@ -29,7 +29,7 @@ public class Vala.CastExpression : Expression { /** * The expression to be cast. */ - public Expression! inner { + public Expression inner { get { return _inner; } @@ -42,7 +42,7 @@ public class Vala.CastExpression : Expression { /** * The target type. */ - public DataType! type_reference { + public DataType type_reference { get { return _data_type; } set { _data_type = value; @@ -55,7 +55,7 @@ public class Vala.CastExpression : Expression { */ public bool is_silent_cast { get; set construct; } - private Expression! _inner; + private Expression _inner; private DataType _data_type; @@ -66,17 +66,17 @@ public class Vala.CastExpression : Expression { * @param type target type * @return newly created cast expression */ - public CastExpression (construct Expression! inner, construct DataType! type_reference, construct SourceReference source_reference, construct bool is_silent_cast) { + public CastExpression (construct Expression inner, construct DataType type_reference, construct SourceReference source_reference, construct bool is_silent_cast) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { inner.accept (visitor); type_reference.accept (visitor); visitor.visit_cast_expression (this); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (inner == old_node) { inner = new_node; } @@ -86,7 +86,7 @@ public class Vala.CastExpression : Expression { return inner.is_pure (); } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (type_reference == old_type) { type_reference = new_type; } diff --git a/vala/valacatchclause.vala b/vala/valacatchclause.vala index 1c97253..a0d895c 100644 --- a/vala/valacatchclause.vala +++ b/vala/valacatchclause.vala @@ -68,11 +68,11 @@ public class Vala.CatchClause : CodeNode { public CatchClause (construct DataType? type_reference, construct string variable_name, construct Block body, construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_catch_clause (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { if (type_reference != null) { type_reference.accept (visitor); } @@ -80,7 +80,7 @@ public class Vala.CatchClause : CodeNode { body.accept (visitor); } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (type_reference == old_type) { type_reference = new_type; } diff --git a/vala/valacfgbuilder.vala b/vala/valacfgbuilder.vala index 99812f8..0a08b19 100644 --- a/vala/valacfgbuilder.vala +++ b/vala/valacfgbuilder.vala @@ -73,7 +73,7 @@ public class Vala.CFGBuilder : CodeVisitor { * * @param context a code context */ - public void build_cfg (CodeContext! context) { + public void build_cfg (CodeContext context) { this.context = context; /* we're only interested in non-pkg source files */ @@ -85,27 +85,27 @@ public class Vala.CFGBuilder : CodeVisitor { } } - public override void visit_source_file (SourceFile! source_file) { + public override void visit_source_file (SourceFile source_file) { source_file.accept_children (this); } - public override void visit_class (Class! cl) { + public override void visit_class (Class cl) { cl.accept_children (this); } - public override void visit_struct (Struct! st) { + public override void visit_struct (Struct st) { st.accept_children (this); } - public override void visit_interface (Interface! iface) { + public override void visit_interface (Interface iface) { iface.accept_children (this); } - public override void visit_enum (Enum! en) { + public override void visit_enum (Enum en) { en.accept_children (this); } - public override void visit_method (Method! m) { + public override void visit_method (Method m) { if (m.body == null) { return; } @@ -134,11 +134,11 @@ public class Vala.CFGBuilder : CodeVisitor { } } - public override void visit_property (Property! prop) { + public override void visit_property (Property prop) { prop.accept_children (this); } - public override void visit_property_accessor (PropertyAccessor! acc) { + public override void visit_property_accessor (PropertyAccessor acc) { if (acc.body == null) { return; } @@ -167,11 +167,11 @@ public class Vala.CFGBuilder : CodeVisitor { } } - public override void visit_block (Block! b) { + public override void visit_block (Block b) { b.accept_children (this); } - public override void visit_declaration_statement (DeclarationStatement! stmt) { + public override void visit_declaration_statement (DeclarationStatement stmt) { if (unreachable (stmt)) { return; } @@ -185,7 +185,7 @@ public class Vala.CFGBuilder : CodeVisitor { } } - public override void visit_expression_statement (ExpressionStatement! stmt) { + public override void visit_expression_statement (ExpressionStatement stmt) { if (unreachable (stmt)) { return; } @@ -205,7 +205,7 @@ public class Vala.CFGBuilder : CodeVisitor { } } - public override void visit_if_statement (IfStatement! stmt) { + public override void visit_if_statement (IfStatement stmt) { if (unreachable (stmt)) { return; } @@ -243,7 +243,7 @@ public class Vala.CFGBuilder : CodeVisitor { } } - public override void visit_switch_statement (SwitchStatement! stmt) { + public override void visit_switch_statement (SwitchStatement stmt) { if (unreachable (stmt)) { return; } @@ -293,7 +293,7 @@ public class Vala.CFGBuilder : CodeVisitor { jump_stack.remove_at (jump_stack.size - 1); } - public override void visit_while_statement (WhileStatement! stmt) { + public override void visit_while_statement (WhileStatement stmt) { if (unreachable (stmt)) { return; } @@ -328,7 +328,7 @@ public class Vala.CFGBuilder : CodeVisitor { jump_stack.remove_at (jump_stack.size - 1); } - public override void visit_do_statement (DoStatement! stmt) { + public override void visit_do_statement (DoStatement stmt) { if (unreachable (stmt)) { return; } @@ -373,7 +373,7 @@ public class Vala.CFGBuilder : CodeVisitor { jump_stack.remove_at (jump_stack.size - 1); } - public override void visit_for_statement (ForStatement! stmt) { + public override void visit_for_statement (ForStatement stmt) { if (unreachable (stmt)) { return; } @@ -428,7 +428,7 @@ public class Vala.CFGBuilder : CodeVisitor { jump_stack.remove_at (jump_stack.size - 1); } - public override void visit_foreach_statement (ForeachStatement! stmt) { + public override void visit_foreach_statement (ForeachStatement stmt) { if (unreachable (stmt)) { return; } @@ -462,7 +462,7 @@ public class Vala.CFGBuilder : CodeVisitor { jump_stack.remove_at (jump_stack.size - 1); } - public override void visit_break_statement (BreakStatement! stmt) { + public override void visit_break_statement (BreakStatement stmt) { if (unreachable (stmt)) { return; } @@ -486,7 +486,7 @@ public class Vala.CFGBuilder : CodeVisitor { stmt.error = true; } - public override void visit_continue_statement (ContinueStatement! stmt) { + public override void visit_continue_statement (ContinueStatement stmt) { if (unreachable (stmt)) { return; } @@ -510,7 +510,7 @@ public class Vala.CFGBuilder : CodeVisitor { stmt.error = true; } - public override void visit_return_statement (ReturnStatement! stmt) { + public override void visit_return_statement (ReturnStatement stmt) { if (unreachable (stmt)) { return; } @@ -567,7 +567,7 @@ public class Vala.CFGBuilder : CodeVisitor { } } - public override void visit_throw_statement (ThrowStatement! stmt) { + public override void visit_throw_statement (ThrowStatement stmt) { if (unreachable (stmt)) { return; } @@ -598,7 +598,7 @@ public class Vala.CFGBuilder : CodeVisitor { assert_not_reached (); } - public override void visit_try_statement (TryStatement! stmt) { + public override void visit_try_statement (TryStatement stmt) { if (unreachable (stmt)) { return; } @@ -682,7 +682,7 @@ public class Vala.CFGBuilder : CodeVisitor { } } - public override void visit_lock_statement (LockStatement! stmt) { + public override void visit_lock_statement (LockStatement stmt) { if (unreachable (stmt)) { return; } diff --git a/vala/valacharacterliteral.vala b/vala/valacharacterliteral.vala index d593e5b..ba1177b 100644 --- a/vala/valacharacterliteral.vala +++ b/vala/valacharacterliteral.vala @@ -30,7 +30,7 @@ public class Vala.CharacterLiteral : Literal { /** * The literal value. */ - public string! value { + public string value { get { return _value; } @@ -43,7 +43,7 @@ public class Vala.CharacterLiteral : Literal { } } - private string! _value; + private string _value; /** * Creates a new character literal. @@ -52,7 +52,7 @@ public class Vala.CharacterLiteral : Literal { * @param source reference to source code * @return newly created character literal */ - public CharacterLiteral (string! c, SourceReference source) { + public CharacterLiteral (string c, SourceReference source) { value = c; source_reference = source; @@ -64,7 +64,7 @@ public class Vala.CharacterLiteral : Literal { } } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_character_literal (this); } diff --git a/vala/valaclass.vala b/vala/valaclass.vala index efb0865..54f128a 100644 --- a/vala/valaclass.vala +++ b/vala/valaclass.vala @@ -111,7 +111,7 @@ public class Vala.Class : Typesymbol { * @param source reference to source code * @return newly created class */ - public Class (construct string! name, construct SourceReference source_reference = null) { + public Class (construct string name, construct SourceReference source_reference = null) { } /** @@ -120,7 +120,7 @@ public class Vala.Class : Typesymbol { * * @param type a class or interface reference */ - public void add_base_type (DataType! type) { + public void add_base_type (DataType type) { base_types.add (type); type.parent_node = this; } @@ -139,7 +139,7 @@ public class Vala.Class : Typesymbol { * * @param p a type parameter */ - public void add_type_parameter (TypeParameter! p) { + public void add_type_parameter (TypeParameter p) { type_parameters.add (p); p.type = this; scope.add (p.name, p); @@ -159,7 +159,7 @@ public class Vala.Class : Typesymbol { * * @param c a constant */ - public void add_constant (Constant! c) { + public void add_constant (Constant c) { constants.add (c); scope.add (c.name, c); } @@ -169,7 +169,7 @@ public class Vala.Class : Typesymbol { * * @param f a field */ - public void add_field (Field! f) { + public void add_field (Field f) { fields.add (f); if (f.access == SymbolAccessibility.PRIVATE && f.instance) { has_private_fields = true; @@ -191,7 +191,7 @@ public class Vala.Class : Typesymbol { * * @param m a method */ - public void add_method (Method! m) { + public void add_method (Method m) { if (m.instance || m is CreationMethod) { if (m.this_parameter != null) { m.scope.remove (m.this_parameter.name); @@ -242,7 +242,7 @@ public class Vala.Class : Typesymbol { * * @param prop a property */ - public void add_property (Property! prop, bool no_field = false) { + public void add_property (Property prop, bool no_field = false) { properties.add (prop); scope.add (prop.name, prop); @@ -288,7 +288,7 @@ public class Vala.Class : Typesymbol { * * @param sig a signal */ - public void add_signal (Signal! sig) { + public void add_signal (Signal sig) { signals.add (sig); scope.add (sig.name, sig); } @@ -307,7 +307,7 @@ public class Vala.Class : Typesymbol { * * @param cl a class */ - public void add_class (Class! cl) { + public void add_class (Class cl) { classes.add (cl); scope.add (cl.name, cl); } @@ -317,7 +317,7 @@ public class Vala.Class : Typesymbol { * * @param st a struct */ - public void add_struct (Struct! st) { + public void add_struct (Struct st) { structs.add (st); scope.add (st.name, st); } @@ -337,16 +337,16 @@ public class Vala.Class : Typesymbol { * * @param d a delegate */ - public void add_delegate (Delegate! d) { + public void add_delegate (Delegate d) { delegates.add (d); scope.add (d.name, d); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_class (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { foreach (DataType type in base_types) { type.accept (visitor); } @@ -404,7 +404,7 @@ public class Vala.Class : Typesymbol { } } - public override string! get_cprefix () { + public override string get_cprefix () { return get_cname (); } @@ -424,7 +424,7 @@ public class Vala.Class : Typesymbol { * * @return the name to be used in C code by default */ - public string! get_default_cname () { + public string get_default_cname () { return "%s%s".printf (parent_symbol.get_cprefix (), name); } @@ -433,7 +433,7 @@ public class Vala.Class : Typesymbol { * * @param cname the name to be used in C code */ - public void set_cname (string! cname) { + public void set_cname (string cname) { this.cname = cname; } @@ -461,7 +461,7 @@ public class Vala.Class : Typesymbol { return "%s%s%s".printf (parent_symbol.get_lower_case_cprefix (), infix, get_lower_case_csuffix ()); } - public override string! get_lower_case_cprefix () { + public override string get_lower_case_cprefix () { if (lower_case_cprefix == null) { lower_case_cprefix = "%s_".printf (get_lower_case_cname (null)); } @@ -476,7 +476,7 @@ public class Vala.Class : Typesymbol { return true; } - private void process_ccode_attribute (Attribute! a) { + private void process_ccode_attribute (Attribute a) { if (a.has_argument ("ref_function")) { set_ref_function (a.get_string ("ref_function")); } @@ -554,7 +554,7 @@ public class Vala.Class : Typesymbol { return type_id; } - public void set_type_id (string! type_id) { + public void set_type_id (string type_id) { this.type_id = type_id; } @@ -606,7 +606,7 @@ public class Vala.Class : Typesymbol { } } - public void set_ref_function (string! name) { + public void set_ref_function (string name) { this.ref_function = name; } @@ -618,7 +618,7 @@ public class Vala.Class : Typesymbol { } } - public void set_unref_function (string! name) { + public void set_unref_function (string name) { this.unref_function = name; } @@ -626,7 +626,7 @@ public class Vala.Class : Typesymbol { return copy_function; } - public void set_dup_function (string! name) { + public void set_dup_function (string name) { this.copy_function = name; } @@ -641,11 +641,11 @@ public class Vala.Class : Typesymbol { return free_function; } - public void set_free_function (string! name) { + public void set_free_function (string name) { this.free_function = name; } - public override bool is_subtype_of (Typesymbol! t) { + public override bool is_subtype_of (Typesymbol t) { if (this == t) { return true; } @@ -659,7 +659,7 @@ public class Vala.Class : Typesymbol { return false; } - public override int get_type_parameter_index (string! name) { + public override int get_type_parameter_index (string name) { int i = 0; foreach (TypeParameter parameter in type_parameters) { if (parameter.name == name) { @@ -670,7 +670,7 @@ public class Vala.Class : Typesymbol { return -1; } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { for (int i = 0; i < base_types.size; i++) { if (base_types[i] == old_type) { base_types[i] = new_type; diff --git a/vala/valaclasstype.vala b/vala/valaclasstype.vala index 0a7bf7c..2180d16 100644 --- a/vala/valaclasstype.vala +++ b/vala/valaclasstype.vala @@ -31,7 +31,7 @@ public class Vala.ClassType : ReferenceType { */ public weak Class class_symbol { get; set; } - public ClassType (construct Class! class_symbol) { + public ClassType (construct Class class_symbol) { data_type = class_symbol; } diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala index 0d2ffc4..6b74a8f 100644 --- a/vala/valacodecontext.vala +++ b/vala/valacodecontext.vala @@ -118,7 +118,7 @@ public class Vala.CodeContext : Object { private Gee.List source_files = new ArrayList (); private Gee.List c_source_files = new ArrayList (); - private Namespace! _root = new Namespace (null); + private Namespace _root = new Namespace (null); private Gee.List cycles = new ArrayList (); @@ -133,7 +133,7 @@ public class Vala.CodeContext : Object { * * @return root namespace */ - public Namespace! root { + public Namespace root { get { return _root; } } @@ -176,7 +176,7 @@ public class Vala.CodeContext : Object { * * @param file a source file */ - public void add_source_file (SourceFile! file) { + public void add_source_file (SourceFile file) { source_files.add (file); } @@ -185,7 +185,7 @@ public class Vala.CodeContext : Object { * * @param file a C source file */ - public void add_c_source_file (string! file) { + public void add_c_source_file (string file) { c_source_files.add (file); } @@ -204,7 +204,7 @@ public class Vala.CodeContext : Object { * @param pkg a package name * @return true if the specified package is being used */ - public bool has_package (string! pkg) { + public bool has_package (string pkg) { return packages.contains (pkg); } @@ -213,7 +213,7 @@ public class Vala.CodeContext : Object { * * @param pkg a package name */ - public void add_package (string! pkg) { + public void add_package (string pkg) { packages.add (pkg); } @@ -222,7 +222,7 @@ public class Vala.CodeContext : Object { * * @param visitor the visitor to be called when traversing */ - public void accept (CodeVisitor! visitor) { + public void accept (CodeVisitor visitor) { root.accept (visitor); foreach (SourceFile file in source_files) { @@ -279,7 +279,7 @@ public class Vala.CodeContext : Object { } - private weak SourceFile find_cycle_head (SourceFile! file) { + private weak SourceFile find_cycle_head (SourceFile file) { foreach (SourceFile dep in file.get_header_internal_full_dependencies ()) { if (dep == file) { /* ignore file-internal dependencies */ @@ -298,7 +298,7 @@ public class Vala.CodeContext : Object { return file; } - private void visit (SourceFile! file, Collection chain) { + private void visit (SourceFile file, Collection chain) { Gee.List l = new ArrayList (); foreach (SourceFile chain_file in chain) { l.add (chain_file); @@ -385,7 +385,7 @@ public class Vala.CodeContext : Object { } } - public string get_package_path (string! pkg, [CCode (array_length_pos = 1.9)] string[] vapi_directories) { + public string get_package_path (string pkg, [CCode (array_length_pos = 1.9)] string[] vapi_directories) { string basename = "%s.vapi".printf (pkg); string filename = null; @@ -413,283 +413,283 @@ public class Vala.CodeContext : Object { 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; } - public ErrorCode create_error_code (string! name) { + public ErrorCode create_error_code (string name) { var node = new ErrorCode (name); node.code_binding = codegen.create_error_code_binding (node); 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; @@ -701,175 +701,175 @@ public class Vala.CodeContext : Object { 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; diff --git a/vala/valacodegenerator.vala b/vala/valacodegenerator.vala index 8a1ebd9..d34eaa5 100644 --- a/vala/valacodegenerator.vala +++ b/vala/valacodegenerator.vala @@ -31,30 +31,30 @@ public class Vala.CodeGenerator : CodeVisitor { * * @param context a code context */ - public virtual void emit (CodeContext! context) { + public virtual void emit (CodeContext context) { } - public virtual CodeBinding create_namespace_binding (Namespace! node) { + public virtual CodeBinding create_namespace_binding (Namespace node) { return null; } - public virtual CodeBinding create_class_binding (Class! node) { + public virtual CodeBinding create_class_binding (Class node) { return null; } - public virtual CodeBinding create_struct_binding (Struct! node) { + public virtual CodeBinding create_struct_binding (Struct node) { return null; } - public virtual CodeBinding create_interface_binding (Interface! node) { + public virtual CodeBinding create_interface_binding (Interface node) { return null; } - public virtual CodeBinding create_enum_binding (Enum! node) { + public virtual CodeBinding create_enum_binding (Enum node) { return null; } - public virtual CodeBinding create_enum_value_binding (EnumValue! node) { + public virtual CodeBinding create_enum_value_binding (EnumValue node) { return null; } @@ -66,139 +66,139 @@ public class Vala.CodeGenerator : CodeVisitor { return null; } - public virtual CodeBinding create_delegate_binding (Delegate! node) { + public virtual CodeBinding create_delegate_binding (Delegate node) { return null; } - public virtual CodeBinding create_constant_binding (Constant! node) { + public virtual CodeBinding create_constant_binding (Constant node) { return null; } - public virtual CodeBinding create_field_binding (Field! node) { + public virtual CodeBinding create_field_binding (Field node) { return null; } - public virtual CodeBinding create_method_binding (Method! node) { + public virtual CodeBinding create_method_binding (Method node) { return null; } - public virtual CodeBinding create_creation_method_binding (CreationMethod! node) { + public virtual CodeBinding create_creation_method_binding (CreationMethod node) { return null; } - public virtual CodeBinding create_formal_parameter_binding (FormalParameter! node) { + public virtual CodeBinding create_formal_parameter_binding (FormalParameter node) { return null; } - public virtual CodeBinding create_property_binding (Property! node) { + public virtual CodeBinding create_property_binding (Property node) { return null; } - public virtual CodeBinding create_property_accessor_binding (PropertyAccessor! node) { + public virtual CodeBinding create_property_accessor_binding (PropertyAccessor node) { return null; } - public virtual CodeBinding create_signal_binding (Signal! node) { + public virtual CodeBinding create_signal_binding (Signal node) { return null; } - public virtual CodeBinding create_constructor_binding (Constructor! node) { + public virtual CodeBinding create_constructor_binding (Constructor node) { return null; } - public virtual CodeBinding create_destructor_binding (Destructor! node) { + public virtual CodeBinding create_destructor_binding (Destructor node) { return null; } - public virtual CodeBinding create_type_parameter_binding (TypeParameter! node) { + public virtual CodeBinding create_type_parameter_binding (TypeParameter node) { return null; } - public virtual CodeBinding create_block_binding (Block! node) { + public virtual CodeBinding create_block_binding (Block node) { return null; } - public virtual CodeBinding create_empty_statement_binding (EmptyStatement! node) { + public virtual CodeBinding create_empty_statement_binding (EmptyStatement node) { return null; } - public virtual CodeBinding create_declaration_statement_binding (DeclarationStatement! node) { + public virtual CodeBinding create_declaration_statement_binding (DeclarationStatement node) { return null; } - public virtual CodeBinding create_local_variable_declaration_binding (LocalVariableDeclaration! node) { + public virtual CodeBinding create_local_variable_declaration_binding (LocalVariableDeclaration node) { return null; } - public virtual CodeBinding create_variable_declarator_binding (VariableDeclarator! node) { + public virtual CodeBinding create_variable_declarator_binding (VariableDeclarator node) { return null; } - public virtual CodeBinding create_initializer_list_binding (InitializerList! node) { + public virtual CodeBinding create_initializer_list_binding (InitializerList node) { return null; } - public virtual CodeBinding create_expression_statement_binding (ExpressionStatement! node) { + public virtual CodeBinding create_expression_statement_binding (ExpressionStatement node) { return null; } - public virtual CodeBinding create_if_statement_binding (IfStatement! node) { + public virtual CodeBinding create_if_statement_binding (IfStatement node) { return null; } - public virtual CodeBinding create_switch_statement_binding (SwitchStatement! node) { + public virtual CodeBinding create_switch_statement_binding (SwitchStatement node) { return null; } - public virtual CodeBinding create_switch_section_binding (SwitchSection! node) { + public virtual CodeBinding create_switch_section_binding (SwitchSection node) { return null; } - public virtual CodeBinding create_switch_label_binding (SwitchLabel! node) { + public virtual CodeBinding create_switch_label_binding (SwitchLabel node) { return null; } - public virtual CodeBinding create_while_statement_binding (WhileStatement! node) { + public virtual CodeBinding create_while_statement_binding (WhileStatement node) { return null; } - public virtual CodeBinding create_do_statement_binding (DoStatement! node) { + public virtual CodeBinding create_do_statement_binding (DoStatement node) { return null; } - public virtual CodeBinding create_for_statement_binding (ForStatement! node) { + public virtual CodeBinding create_for_statement_binding (ForStatement node) { return null; } - public virtual CodeBinding create_foreach_statement_binding (ForeachStatement! node) { + public virtual CodeBinding create_foreach_statement_binding (ForeachStatement node) { return null; } - public virtual CodeBinding create_break_statement_binding (BreakStatement! node) { + public virtual CodeBinding create_break_statement_binding (BreakStatement node) { return null; } - public virtual CodeBinding create_continue_statement_binding (ContinueStatement! node) { + public virtual CodeBinding create_continue_statement_binding (ContinueStatement node) { return null; } - public virtual CodeBinding create_return_statement_binding (ReturnStatement! node) { + public virtual CodeBinding create_return_statement_binding (ReturnStatement node) { return null; } - public virtual CodeBinding create_throw_statement_binding (ThrowStatement! node) { + public virtual CodeBinding create_throw_statement_binding (ThrowStatement node) { return null; } - public virtual CodeBinding create_try_statement_binding (TryStatement! node) { + public virtual CodeBinding create_try_statement_binding (TryStatement node) { return null; } - public virtual CodeBinding create_catch_clause_binding (CatchClause! node) { + public virtual CodeBinding create_catch_clause_binding (CatchClause node) { return null; } - public virtual CodeBinding create_lock_statement_binding (LockStatement! node) { + public virtual CodeBinding create_lock_statement_binding (LockStatement node) { return null; } @@ -206,115 +206,115 @@ public class Vala.CodeGenerator : CodeVisitor { return null; } - public virtual CodeBinding create_array_creation_expression_binding (ArrayCreationExpression! node) { + public virtual CodeBinding create_array_creation_expression_binding (ArrayCreationExpression node) { return null; } - public virtual CodeBinding create_boolean_literal_binding (BooleanLiteral! node) { + public virtual CodeBinding create_boolean_literal_binding (BooleanLiteral node) { return null; } - public virtual CodeBinding create_character_literal_binding (CharacterLiteral! node) { + public virtual CodeBinding create_character_literal_binding (CharacterLiteral node) { return null; } - public virtual CodeBinding create_integer_literal_binding (IntegerLiteral! node) { + public virtual CodeBinding create_integer_literal_binding (IntegerLiteral node) { return null; } - public virtual CodeBinding create_real_literal_binding (RealLiteral! node) { + public virtual CodeBinding create_real_literal_binding (RealLiteral node) { return null; } - public virtual CodeBinding create_string_literal_binding (StringLiteral! node) { + public virtual CodeBinding create_string_literal_binding (StringLiteral node) { return null; } - public virtual CodeBinding create_null_literal_binding (NullLiteral! node) { + public virtual CodeBinding create_null_literal_binding (NullLiteral node) { return null; } - public virtual CodeBinding create_parenthesized_expression_binding (ParenthesizedExpression! node) { + public virtual CodeBinding create_parenthesized_expression_binding (ParenthesizedExpression node) { return null; } - public virtual CodeBinding create_member_access_binding (MemberAccess! node) { + public virtual CodeBinding create_member_access_binding (MemberAccess node) { return null; } - public virtual CodeBinding create_member_access_simple_binding (MemberAccess! node) { + public virtual CodeBinding create_member_access_simple_binding (MemberAccess node) { return null; } - public virtual CodeBinding create_invocation_expression_binding (InvocationExpression! node) { + public virtual CodeBinding create_invocation_expression_binding (InvocationExpression node) { return null; } - public virtual CodeBinding create_element_access_binding (ElementAccess! node) { + public virtual CodeBinding create_element_access_binding (ElementAccess node) { return null; } - public virtual CodeBinding create_base_access_binding (BaseAccess! node) { + public virtual CodeBinding create_base_access_binding (BaseAccess node) { return null; } - public virtual CodeBinding create_postfix_expression_binding (PostfixExpression! node) { + public virtual CodeBinding create_postfix_expression_binding (PostfixExpression node) { return null; } - public virtual CodeBinding create_object_creation_expression_binding (ObjectCreationExpression! node) { + public virtual CodeBinding create_object_creation_expression_binding (ObjectCreationExpression node) { return null; } - public virtual CodeBinding create_sizeof_expression_binding (SizeofExpression! node) { + public virtual CodeBinding create_sizeof_expression_binding (SizeofExpression node) { return null; } - public virtual CodeBinding create_typeof_expression_binding (TypeofExpression! node) { + public virtual CodeBinding create_typeof_expression_binding (TypeofExpression node) { return null; } - public virtual CodeBinding create_unary_expression_binding (UnaryExpression! node) { + public virtual CodeBinding create_unary_expression_binding (UnaryExpression node) { return null; } - public virtual CodeBinding create_cast_expression_binding (CastExpression! node) { + public virtual CodeBinding create_cast_expression_binding (CastExpression node) { return null; } - public virtual CodeBinding create_pointer_indirection_binding (PointerIndirection! node) { + public virtual CodeBinding create_pointer_indirection_binding (PointerIndirection node) { return null; } - public virtual CodeBinding create_addressof_expression_binding (AddressofExpression! node) { + public virtual CodeBinding create_addressof_expression_binding (AddressofExpression node) { return null; } - public virtual CodeBinding create_reference_transfer_expression_binding (ReferenceTransferExpression! node) { + public virtual CodeBinding create_reference_transfer_expression_binding (ReferenceTransferExpression node) { return null; } - public virtual CodeBinding create_binary_expression_binding (BinaryExpression! node) { + public virtual CodeBinding create_binary_expression_binding (BinaryExpression node) { return null; } - public virtual CodeBinding create_type_check_binding (TypeCheck! node) { + public virtual CodeBinding create_type_check_binding (TypeCheck node) { return null; } - public virtual CodeBinding create_conditional_expression_binding (ConditionalExpression! node) { + public virtual CodeBinding create_conditional_expression_binding (ConditionalExpression node) { return null; } - public virtual CodeBinding create_lambda_expression_binding (LambdaExpression! node) { + public virtual CodeBinding create_lambda_expression_binding (LambdaExpression node) { return null; } - public virtual CodeBinding create_lambda_expression_with_statement_body_binding (LambdaExpression! node) { + public virtual CodeBinding create_lambda_expression_with_statement_body_binding (LambdaExpression node) { return null; } - public virtual CodeBinding create_assignment_binding (Assignment! node) { + public virtual CodeBinding create_assignment_binding (Assignment node) { return null; } } diff --git a/vala/valacodenode.vala b/vala/valacodenode.vala index dc39ef8..4d65e1f 100644 --- a/vala/valacodenode.vala +++ b/vala/valacodenode.vala @@ -83,7 +83,7 @@ public abstract class Vala.CodeNode : Object { * * @param visitor the visitor to be called while traversing */ - public virtual void accept (CodeVisitor! visitor) { + public virtual void accept (CodeVisitor visitor) { } /** @@ -91,13 +91,13 @@ public abstract class Vala.CodeNode : Object { * * @param visitor the visitor to be called while traversing */ - public virtual void accept_children (CodeVisitor! visitor) { + public virtual void accept_children (CodeVisitor visitor) { } - public virtual void replace_type (DataType! old_type, DataType! new_type) { + public virtual void replace_type (DataType old_type, DataType new_type) { } - public virtual void replace_expression (Expression! old_node, Expression! new_node) { + public virtual void replace_expression (Expression old_node, Expression new_node) { } /** @@ -106,7 +106,7 @@ public abstract class Vala.CodeNode : Object { * @param name attribute name * @return attribute */ - public Attribute get_attribute (string! name) { + public Attribute get_attribute (string name) { // FIXME: use hash table foreach (Attribute a in attributes) { if (a.name == name) { @@ -124,8 +124,8 @@ public abstract class Vala.CodeNode : Object { * * @return a string representation */ - public virtual string! to_string () { - var str = new String (); + public virtual string to_string () { + var str = new StringBuilder (); str.append ("/* ").append (get_type ().name ()); diff --git a/vala/valacodevisitor.vala b/vala/valacodevisitor.vala index 0bce054..7cb11ed 100644 --- a/vala/valacodevisitor.vala +++ b/vala/valacodevisitor.vala @@ -32,7 +32,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param source_file a source file */ - public virtual void visit_source_file (SourceFile! source_file) { + public virtual void visit_source_file (SourceFile source_file) { } /** @@ -40,7 +40,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param ns a namespace */ - public virtual void visit_namespace (Namespace! ns) { + public virtual void visit_namespace (Namespace ns) { } /** @@ -48,7 +48,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param cl a class */ - public virtual void visit_class (Class! cl) { + public virtual void visit_class (Class cl) { } /** @@ -56,7 +56,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param st a struct */ - public virtual void visit_struct (Struct! st) { + public virtual void visit_struct (Struct st) { } /** @@ -64,7 +64,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param iface an interface */ - public virtual void visit_interface (Interface! iface) { + public virtual void visit_interface (Interface iface) { } /** @@ -72,7 +72,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param en an enum */ - public virtual void visit_enum (Enum! en) { + public virtual void visit_enum (Enum en) { } /** @@ -80,7 +80,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param ev an enum value */ - public virtual void visit_enum_value (EnumValue! ev) { + public virtual void visit_enum_value (EnumValue ev) { } /** @@ -104,7 +104,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param d a delegate */ - public virtual void visit_delegate (Delegate! d) { + public virtual void visit_delegate (Delegate d) { } /** @@ -112,7 +112,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param m a member */ - public virtual void visit_member (Member! m) { + public virtual void visit_member (Member m) { } /** @@ -120,7 +120,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param c a constant */ - public virtual void visit_constant (Constant! c) { + public virtual void visit_constant (Constant c) { } /** @@ -128,7 +128,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param f a field */ - public virtual void visit_field (Field! f) { + public virtual void visit_field (Field f) { } /** @@ -136,7 +136,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param m a method */ - public virtual void visit_method (Method! m) { + public virtual void visit_method (Method m) { } /** @@ -144,7 +144,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param m a method */ - public virtual void visit_creation_method (CreationMethod! m) { + public virtual void visit_creation_method (CreationMethod m) { } /** @@ -152,7 +152,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param p a formal parameter */ - public virtual void visit_formal_parameter (FormalParameter! p) { + public virtual void visit_formal_parameter (FormalParameter p) { } /** @@ -160,7 +160,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param prop a property */ - public virtual void visit_property (Property! prop) { + public virtual void visit_property (Property prop) { } /** @@ -168,7 +168,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param acc a property accessor */ - public virtual void visit_property_accessor (PropertyAccessor! acc) { + public virtual void visit_property_accessor (PropertyAccessor acc) { } /** @@ -176,7 +176,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param sig a signal */ - public virtual void visit_signal (Signal! sig) { + public virtual void visit_signal (Signal sig) { } /** @@ -184,7 +184,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param c a constructor */ - public virtual void visit_constructor (Constructor! c) { + public virtual void visit_constructor (Constructor c) { } /** @@ -192,7 +192,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param d a destructor */ - public virtual void visit_destructor (Destructor! d) { + public virtual void visit_destructor (Destructor d) { } /** @@ -200,7 +200,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param n a named argument */ - public virtual void visit_named_argument (NamedArgument! n) { + public virtual void visit_named_argument (NamedArgument n) { } /** @@ -208,7 +208,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param p a type parameter */ - public virtual void visit_type_parameter (TypeParameter! p) { + public virtual void visit_type_parameter (TypeParameter p) { } /** @@ -216,7 +216,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param ns a namespace reference */ - public virtual void visit_namespace_reference (NamespaceReference! ns) { + public virtual void visit_namespace_reference (NamespaceReference ns) { } /** @@ -224,7 +224,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param type a type reference */ - public virtual void visit_data_type (DataType! type) { + public virtual void visit_data_type (DataType type) { } /** @@ -232,7 +232,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param b a block */ - public virtual void visit_block (Block! b) { + public virtual void visit_block (Block b) { } /** @@ -240,7 +240,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt an empty statement */ - public virtual void visit_empty_statement (EmptyStatement! stmt) { + public virtual void visit_empty_statement (EmptyStatement stmt) { } /** @@ -248,7 +248,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt a declaration statement */ - public virtual void visit_declaration_statement (DeclarationStatement! stmt) { + public virtual void visit_declaration_statement (DeclarationStatement stmt) { } /** @@ -256,7 +256,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param decl a local variable declaration */ - public virtual void visit_local_variable_declaration (LocalVariableDeclaration! decl) { + public virtual void visit_local_variable_declaration (LocalVariableDeclaration decl) { } /** @@ -264,7 +264,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param decl a variable declarator */ - public virtual void visit_variable_declarator (VariableDeclarator! decl) { + public virtual void visit_variable_declarator (VariableDeclarator decl) { } /** @@ -272,7 +272,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param list an initializer list */ - public virtual void visit_initializer_list (InitializerList! list) { + public virtual void visit_initializer_list (InitializerList list) { } /** @@ -280,7 +280,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt an expression statement */ - public virtual void visit_expression_statement (ExpressionStatement! stmt) { + public virtual void visit_expression_statement (ExpressionStatement stmt) { } /** @@ -288,7 +288,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt an if statement */ - public virtual void visit_if_statement (IfStatement! stmt) { + public virtual void visit_if_statement (IfStatement stmt) { } /** @@ -296,7 +296,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt a switch statement */ - public virtual void visit_switch_statement (SwitchStatement! stmt) { + public virtual void visit_switch_statement (SwitchStatement stmt) { } /** @@ -304,7 +304,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param section a switch section */ - public virtual void visit_switch_section (SwitchSection! section) { + public virtual void visit_switch_section (SwitchSection section) { } /** @@ -312,7 +312,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param label a switch label */ - public virtual void visit_switch_label (SwitchLabel! label) { + public virtual void visit_switch_label (SwitchLabel label) { } /** @@ -320,7 +320,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt an while statement */ - public virtual void visit_while_statement (WhileStatement! stmt) { + public virtual void visit_while_statement (WhileStatement stmt) { } /** @@ -328,7 +328,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt a do statement */ - public virtual void visit_do_statement (DoStatement! stmt) { + public virtual void visit_do_statement (DoStatement stmt) { } /** @@ -336,7 +336,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt a for statement */ - public virtual void visit_for_statement (ForStatement! stmt) { + public virtual void visit_for_statement (ForStatement stmt) { } /** @@ -344,7 +344,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt a foreach statement */ - public virtual void visit_foreach_statement (ForeachStatement! stmt) { + public virtual void visit_foreach_statement (ForeachStatement stmt) { } /** @@ -352,7 +352,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt a break statement */ - public virtual void visit_break_statement (BreakStatement! stmt) { + public virtual void visit_break_statement (BreakStatement stmt) { } /** @@ -360,7 +360,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt a continue statement */ - public virtual void visit_continue_statement (ContinueStatement! stmt) { + public virtual void visit_continue_statement (ContinueStatement stmt) { } /** @@ -368,7 +368,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt a return statement */ - public virtual void visit_return_statement (ReturnStatement! stmt) { + public virtual void visit_return_statement (ReturnStatement stmt) { } /** @@ -376,7 +376,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt a throw statement */ - public virtual void visit_throw_statement (ThrowStatement! stmt) { + public virtual void visit_throw_statement (ThrowStatement stmt) { } /** @@ -384,7 +384,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt a try statement */ - public virtual void visit_try_statement (TryStatement! stmt) { + public virtual void visit_try_statement (TryStatement stmt) { } /** @@ -392,7 +392,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param clause a catch cluase */ - public virtual void visit_catch_clause (CatchClause! clause) { + public virtual void visit_catch_clause (CatchClause clause) { } /** @@ -400,7 +400,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param stmt a lock statement */ - public virtual void visit_lock_statement (LockStatement! stmt) { + public virtual void visit_lock_statement (LockStatement stmt) { } /** @@ -416,7 +416,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr an array creation expression */ - public virtual void visit_array_creation_expression (ArrayCreationExpression! expr) { + public virtual void visit_array_creation_expression (ArrayCreationExpression expr) { } /** @@ -424,7 +424,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param lit a boolean literal */ - public virtual void visit_boolean_literal (BooleanLiteral! lit) { + public virtual void visit_boolean_literal (BooleanLiteral lit) { } /** @@ -432,7 +432,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param lit a character literal */ - public virtual void visit_character_literal (CharacterLiteral! lit) { + public virtual void visit_character_literal (CharacterLiteral lit) { } /** @@ -440,7 +440,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param lit an integer literal */ - public virtual void visit_integer_literal (IntegerLiteral! lit) { + public virtual void visit_integer_literal (IntegerLiteral lit) { } /** @@ -448,7 +448,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param lit a real literal */ - public virtual void visit_real_literal (RealLiteral! lit) { + public virtual void visit_real_literal (RealLiteral lit) { } /** @@ -456,7 +456,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param lit a string literal */ - public virtual void visit_string_literal (StringLiteral! lit) { + public virtual void visit_string_literal (StringLiteral lit) { } /** @@ -464,7 +464,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param lit a null literal */ - public virtual void visit_null_literal (NullLiteral! lit) { + public virtual void visit_null_literal (NullLiteral lit) { } /** @@ -472,7 +472,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr a parenthesized expression */ - public virtual void visit_parenthesized_expression (ParenthesizedExpression! expr) { + public virtual void visit_parenthesized_expression (ParenthesizedExpression expr) { } /** @@ -480,7 +480,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr a member access expression */ - public virtual void visit_member_access (MemberAccess! expr) { + public virtual void visit_member_access (MemberAccess expr) { } /** @@ -488,7 +488,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr an invocation expression */ - public virtual void visit_invocation_expression (InvocationExpression! expr) { + public virtual void visit_invocation_expression (InvocationExpression expr) { } /** @@ -496,7 +496,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr an element access expression */ - public virtual void visit_element_access (ElementAccess! expr) { + public virtual void visit_element_access (ElementAccess expr) { } /** @@ -504,7 +504,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr a base access expression */ - public virtual void visit_base_access (BaseAccess! expr) { + public virtual void visit_base_access (BaseAccess expr) { } /** @@ -512,7 +512,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr a postfix expression */ - public virtual void visit_postfix_expression (PostfixExpression! expr) { + public virtual void visit_postfix_expression (PostfixExpression expr) { } /** @@ -520,7 +520,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr an object creation expression */ - public virtual void visit_object_creation_expression (ObjectCreationExpression! expr) { + public virtual void visit_object_creation_expression (ObjectCreationExpression expr) { } /** @@ -528,7 +528,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr a sizeof expression */ - public virtual void visit_sizeof_expression (SizeofExpression! expr) { + public virtual void visit_sizeof_expression (SizeofExpression expr) { } /** @@ -536,7 +536,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr a typeof expression */ - public virtual void visit_typeof_expression (TypeofExpression! expr) { + public virtual void visit_typeof_expression (TypeofExpression expr) { } /** @@ -544,7 +544,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr an unary expression */ - public virtual void visit_unary_expression (UnaryExpression! expr) { + public virtual void visit_unary_expression (UnaryExpression expr) { } /** @@ -552,7 +552,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr a call expression */ - public virtual void visit_cast_expression (CastExpression! expr) { + public virtual void visit_cast_expression (CastExpression expr) { } /** @@ -560,7 +560,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr a pointer indirection */ - public virtual void visit_pointer_indirection (PointerIndirection! expr) { + public virtual void visit_pointer_indirection (PointerIndirection expr) { } /** @@ -568,7 +568,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr an address-of expression */ - public virtual void visit_addressof_expression (AddressofExpression! expr) { + public virtual void visit_addressof_expression (AddressofExpression expr) { } /** @@ -576,7 +576,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr a reference transfer expression */ - public virtual void visit_reference_transfer_expression (ReferenceTransferExpression! expr) { + public virtual void visit_reference_transfer_expression (ReferenceTransferExpression expr) { } /** @@ -584,7 +584,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr a binary expression */ - public virtual void visit_binary_expression (BinaryExpression! expr) { + public virtual void visit_binary_expression (BinaryExpression expr) { } /** @@ -592,7 +592,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr a type check expression */ - public virtual void visit_type_check (TypeCheck! expr) { + public virtual void visit_type_check (TypeCheck expr) { } /** @@ -600,7 +600,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr a conditional expression */ - public virtual void visit_conditional_expression (ConditionalExpression! expr) { + public virtual void visit_conditional_expression (ConditionalExpression expr) { } /** @@ -608,7 +608,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr a lambda expression */ - public virtual void visit_lambda_expression (LambdaExpression! expr) { + public virtual void visit_lambda_expression (LambdaExpression expr) { } /** @@ -616,7 +616,7 @@ public abstract class Vala.CodeVisitor : Object { * * @param a an assignment */ - public virtual void visit_assignment (Assignment! a) { + public virtual void visit_assignment (Assignment a) { } /** @@ -624,6 +624,6 @@ public abstract class Vala.CodeVisitor : Object { * * @param expr a full expression */ - public virtual void visit_end_full_expression (Expression! expr) { + public virtual void visit_end_full_expression (Expression expr) { } } diff --git a/vala/valaconditionalexpression.vala b/vala/valaconditionalexpression.vala index a4cd9c0..87c75d9 100644 --- a/vala/valaconditionalexpression.vala +++ b/vala/valaconditionalexpression.vala @@ -29,17 +29,17 @@ public class Vala.ConditionalExpression : Expression { /** * The condition. */ - public Expression! condition { get; set construct; } + public Expression condition { get; set construct; } /** * The expression to be evaluated if the condition holds. */ - public Expression! true_expression { get; set construct; } + public Expression true_expression { get; set construct; } /** * The expression to be evaluated if the condition doesn't hold. */ - public Expression! false_expression { get; set construct; } + public Expression false_expression { get; set construct; } /** * Creates a new conditional expression. @@ -49,14 +49,14 @@ public class Vala.ConditionalExpression : Expression { * @param false_expr expression to be evaluated if condition is false * @return newly created conditional expression */ - public ConditionalExpression (Expression! cond, Expression! true_expr, Expression! false_expr, SourceReference source) { + public ConditionalExpression (Expression cond, Expression true_expr, Expression false_expr, SourceReference source) { condition = cond; true_expression = true_expr; false_expression = false_expr; source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { condition.accept (visitor); true_expression.accept (visitor); false_expression.accept (visitor); diff --git a/vala/valaconstant.vala b/vala/valaconstant.vala index 7c7101c..8e5a2b9 100644 --- a/vala/valaconstant.vala +++ b/vala/valaconstant.vala @@ -29,7 +29,7 @@ public class Vala.Constant : Member, Lockable { /** * The data type of this constant. */ - public DataType! type_reference { + public DataType type_reference { get { return _data_type; } set { _data_type = value; @@ -57,16 +57,16 @@ public class Vala.Constant : Member, Lockable { * @param source_reference reference to source code * @return newly created constant */ - public Constant (construct string! name, construct DataType! type_reference, construct Expression initializer, construct SourceReference source_reference) { + public Constant (construct string name, construct DataType type_reference, construct Expression initializer, construct SourceReference source_reference) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_member (this); visitor.visit_constant (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { type_reference.accept (visitor); if (initializer != null) { @@ -79,7 +79,7 @@ public class Vala.Constant : Member, Lockable { * * @return the name to be used in C code */ - public string! get_cname () { + public string get_cname () { if (cname == null) { if (parent_symbol == null) { // global constant @@ -99,13 +99,13 @@ public class Vala.Constant : Member, Lockable { lock_used = used; } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (type_reference == old_type) { type_reference = new_type; } } - private void process_ccode_attribute (Attribute! a) { + private void process_ccode_attribute (Attribute a) { if (a.has_argument ("cname")) { cname = a.get_string ("cname"); } diff --git a/vala/valaconstructor.vala b/vala/valaconstructor.vala index a01e14e..9c23bb8 100644 --- a/vala/valaconstructor.vala +++ b/vala/valaconstructor.vala @@ -51,11 +51,11 @@ public class Vala.Constructor : Symbol { source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_constructor (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { if (body != null) { body.accept (visitor); } diff --git a/vala/valacontinuestatement.vala b/vala/valacontinuestatement.vala index 43c1ae0..8ca4111 100644 --- a/vala/valacontinuestatement.vala +++ b/vala/valacontinuestatement.vala @@ -36,7 +36,7 @@ public class Vala.ContinueStatement : CodeNode, Statement { source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_continue_statement (this); } } diff --git a/vala/valacreationmethod.vala b/vala/valacreationmethod.vala index ffcc078..787a427 100644 --- a/vala/valacreationmethod.vala +++ b/vala/valacreationmethod.vala @@ -48,11 +48,11 @@ public class Vala.CreationMethod : Method { return_type = new VoidType (); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_creation_method (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { foreach (FormalParameter param in get_parameters()) { param.accept (visitor); } @@ -66,7 +66,7 @@ public class Vala.CreationMethod : Method { } } - public override string! get_default_cname () { + public override string get_default_cname () { var parent = parent_symbol as Typesymbol; string infix = "new"; diff --git a/vala/valadatatype.vala b/vala/valadatatype.vala index 53a5548..7e301eb 100644 --- a/vala/valadatatype.vala +++ b/vala/valadatatype.vala @@ -83,7 +83,7 @@ public abstract class Vala.DataType : CodeNode { * * @param arg a type reference */ - public void add_type_argument (DataType! arg) { + public void add_type_argument (DataType arg) { type_argument_list.add (arg); arg.parent_node = this; } @@ -104,7 +104,7 @@ public abstract class Vala.DataType : CodeNode { type_argument_list.clear (); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { if (type_argument_list.size > 0) { foreach (DataType type_arg in type_argument_list) { type_arg.accept (visitor); @@ -187,7 +187,7 @@ public abstract class Vala.DataType : CodeNode { return data_type.get_lower_case_cname (infix); } - public override string! to_string () { + public override string to_string () { string s; if (data_type != null) { @@ -241,7 +241,7 @@ public abstract class Vala.DataType : CodeNode { * @return true if this type reference is equal to type2, false * otherwise */ - public virtual bool equals (DataType! type2) { + public virtual bool equals (DataType type2) { if (type2.transfers_ownership != transfers_ownership) { return false; } @@ -282,7 +282,7 @@ public abstract class Vala.DataType : CodeNode { * @param type2 a type reference * @return true if this type reference is stricter or equal */ - public virtual bool stricter (DataType! type2) { + public virtual bool stricter (DataType type2) { if (type2.transfers_ownership != transfers_ownership) { return false; } @@ -315,7 +315,7 @@ public abstract class Vala.DataType : CodeNode { return true; } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { for (int i = 0; i < type_argument_list.size; i++) { if (type_argument_list[i] == old_type) { type_argument_list[i] = new_type; @@ -324,7 +324,7 @@ public abstract class Vala.DataType : CodeNode { } } - public virtual bool compatible (DataType! target_type, bool enable_non_null = true) { + public virtual bool compatible (DataType target_type, bool enable_non_null = true) { if (target_type is DelegateType && this is DelegateType) { return ((DelegateType) target_type).delegate_symbol == ((DelegateType) this).delegate_symbol; } diff --git a/vala/valadeclarationstatement.vala b/vala/valadeclarationstatement.vala index 1642a40..77ed725 100644 --- a/vala/valadeclarationstatement.vala +++ b/vala/valadeclarationstatement.vala @@ -29,7 +29,7 @@ public class Vala.DeclarationStatement : CodeNode, Statement { /** * The local variable declaration. */ - public LocalVariableDeclaration! declaration { get; set construct; } + public LocalVariableDeclaration declaration { get; set construct; } /** * Creates a new declaration statement. @@ -38,12 +38,12 @@ public class Vala.DeclarationStatement : CodeNode, Statement { * @param source reference to source code * @return newly created declaration statement */ - public DeclarationStatement (LocalVariableDeclaration! decl, SourceReference source) { + public DeclarationStatement (LocalVariableDeclaration decl, SourceReference source) { declaration = decl; source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { declaration.accept (visitor); visitor.visit_declaration_statement (this); diff --git a/vala/valadelegate.vala b/vala/valadelegate.vala index c50bc26..0f3ac23 100644 --- a/vala/valadelegate.vala +++ b/vala/valadelegate.vala @@ -108,7 +108,7 @@ public class Vala.Delegate : Typesymbol { * * @param p a type parameter */ - public void add_type_parameter (TypeParameter! p) { + public void add_type_parameter (TypeParameter p) { type_parameters.add (p); p.type = this; scope.add (p.name, p); @@ -119,7 +119,7 @@ public class Vala.Delegate : Typesymbol { * * @param param a formal parameter */ - public void add_parameter (FormalParameter! param) { + public void add_parameter (FormalParameter param) { if (no_array_length) { param.no_array_length = true; } @@ -148,7 +148,7 @@ public class Vala.Delegate : Typesymbol { * @param m a method * @return true if the specified method is compatible to this callback */ - public bool matches_method (Method! m) { + public bool matches_method (Method m) { // method is allowed to ensure stricter return type (stronger postcondition) if (!m.return_type.stricter (return_type)) { return false; @@ -187,18 +187,18 @@ public class Vala.Delegate : Typesymbol { return true; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_delegate (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { foreach (TypeParameter p in type_parameters) { p.accept (visitor); } return_type.accept (visitor); - foreach (FormalParameter! param in parameters) { + foreach (FormalParameter param in parameters) { param.accept (visitor); } } @@ -273,7 +273,7 @@ public class Vala.Delegate : Typesymbol { return "g_value_set_pointer"; } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (return_type == old_type) { return_type = new_type; } diff --git a/vala/valadelegatetype.vala b/vala/valadelegatetype.vala index 3e8113b..9b79190 100644 --- a/vala/valadelegatetype.vala +++ b/vala/valadelegatetype.vala @@ -44,11 +44,11 @@ public class Vala.DelegateType : DataType { return delegate_symbol.get_parameters (); } - public override string! to_string () { + public override string to_string () { return delegate_symbol.get_full_name (); } - public override DataType! copy () { + public override DataType copy () { return new DelegateType (delegate_symbol); } diff --git a/vala/valadeletestatement.vala b/vala/valadeletestatement.vala index 59c7001..40b21e3 100644 --- a/vala/valadeletestatement.vala +++ b/vala/valadeletestatement.vala @@ -36,11 +36,11 @@ public class Vala.DeleteStatement : CodeNode, Statement { this.source_reference = source_reference; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_delete_statement (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { expression.accept (visitor); } } diff --git a/vala/valadestructor.vala b/vala/valadestructor.vala index 293569c..2c3da0d 100644 --- a/vala/valadestructor.vala +++ b/vala/valadestructor.vala @@ -50,11 +50,11 @@ public class Vala.Destructor : Symbol { public Destructor (construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_destructor (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { if (body != null) { body.accept (visitor); } diff --git a/vala/valadostatement.vala b/vala/valadostatement.vala index e5fdd22..0b9beb8 100644 --- a/vala/valadostatement.vala +++ b/vala/valadostatement.vala @@ -42,7 +42,7 @@ public class Vala.DoStatement : CodeNode, Statement { /** * Specifies the loop condition. */ - public Expression! condition { + public Expression condition { get { return _condition; } @@ -52,7 +52,7 @@ public class Vala.DoStatement : CodeNode, Statement { } } - private Expression! _condition; + private Expression _condition; private Block _body; /** @@ -63,14 +63,14 @@ public class Vala.DoStatement : CodeNode, Statement { * @param source reference to source code * @return newly created do statement */ - public DoStatement (construct Block! body, construct Expression! condition, construct SourceReference source_reference = null) { + public DoStatement (construct Block body, construct Expression condition, construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_do_statement (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { body.accept (visitor); condition.accept (visitor); @@ -78,7 +78,7 @@ public class Vala.DoStatement : CodeNode, Statement { visitor.visit_end_full_expression (condition); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (condition == old_node) { condition = new_node; } diff --git a/vala/valaelementaccess.vala b/vala/valaelementaccess.vala index 9353e92..9dc6b27 100644 --- a/vala/valaelementaccess.vala +++ b/vala/valaelementaccess.vala @@ -31,14 +31,14 @@ public class Vala.ElementAccess : Expression { /** * Expression representing the container on wich we want to access. */ - public Expression! container { get; set; } + public Expression container { get; set; } /** * Expressions representing the indices we want to access inside the container. */ - private Gee.List! indices = new ArrayList (); + private Gee.List indices = new ArrayList (); - public void append_index (Expression! index) { + public void append_index (Expression index) { indices.add (index); index.parent_node = this; } @@ -50,7 +50,7 @@ public class Vala.ElementAccess : Expression { public ElementAccess (construct Expression container, construct SourceReference source_reference) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { container.accept (visitor); foreach (Expression e in indices) { e.accept (visitor); @@ -59,7 +59,7 @@ public class Vala.ElementAccess : Expression { visitor.visit_element_access (this); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (container == old_node) { container = new_node; } diff --git a/vala/valaemptystatement.vala b/vala/valaemptystatement.vala index 4ae80ca..8b6826d 100644 --- a/vala/valaemptystatement.vala +++ b/vala/valaemptystatement.vala @@ -36,7 +36,7 @@ public class Vala.EmptyStatement : CodeNode, Statement { source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_empty_statement (this); } } diff --git a/vala/valaenum.vala b/vala/valaenum.vala index 0c0e76c..38989dc 100644 --- a/vala/valaenum.vala +++ b/vala/valaenum.vala @@ -52,7 +52,7 @@ public class Vala.Enum : Typesymbol { * @param source_reference reference to source code * @return newly created enum */ - public Enum (construct string! name, construct SourceReference source_reference = null) { + public Enum (construct string name, construct SourceReference source_reference = null) { } /** @@ -60,7 +60,7 @@ public class Vala.Enum : Typesymbol { * * @param value an enum value */ - public void add_value (EnumValue! value) { + public void add_value (EnumValue value) { values.add (value); scope.add (value.name, value); } @@ -70,7 +70,7 @@ public class Vala.Enum : Typesymbol { * * @param m a method */ - public void add_method (Method! m) { + public void add_method (Method m) { if (m is CreationMethod) { Report.error (m.source_reference, "construction methods may only be declared within classes and structs"); @@ -104,11 +104,11 @@ public class Vala.Enum : Typesymbol { return new ReadOnlyCollection (methods); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_enum (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { foreach (EnumValue value in values) { value.accept (visitor); } @@ -125,7 +125,7 @@ public class Vala.Enum : Typesymbol { return cname; } - public override string! get_lower_case_cprefix () { + public override string get_lower_case_cprefix () { if (lower_case_cprefix == null) { lower_case_cprefix = "%s_".printf (get_lower_case_cname (null)); } @@ -154,7 +154,7 @@ public class Vala.Enum : Typesymbol { return false; } - private void set_cname (string! cname) { + private void set_cname (string cname) { this.cname = cname; } @@ -164,7 +164,7 @@ public class Vala.Enum : Typesymbol { * * @return the prefix to be used in C code */ - public string! get_cprefix () { + public string get_cprefix () { if (cprefix == null) { cprefix = "%s_".printf (get_upper_case_cname ()); } @@ -177,11 +177,11 @@ public class Vala.Enum : Typesymbol { * * @param cprefix the prefix to be used in C code */ - public void set_cprefix (string! cprefix) { + public void set_cprefix (string cprefix) { this.cprefix = cprefix; } - private void process_ccode_attribute (Attribute! a) { + private void process_ccode_attribute (Attribute a) { if (a.has_argument ("cname")) { set_cname (a.get_string ("cname")); } @@ -218,7 +218,7 @@ public class Vala.Enum : Typesymbol { } } - public void set_type_id (string! type_id) { + public void set_type_id (string type_id) { this.type_id = type_id; } diff --git a/vala/valaenumvalue.vala b/vala/valaenumvalue.vala index 3669483..d5d2e16 100644 --- a/vala/valaenumvalue.vala +++ b/vala/valaenumvalue.vala @@ -39,7 +39,7 @@ public class Vala.EnumValue : Symbol { * @param name enum value name * @return newly created enum value */ - public EnumValue (construct string! name, SourceReference source_reference = null) { + public EnumValue (construct string name, SourceReference source_reference = null) { this.source_reference = source_reference; } @@ -50,7 +50,7 @@ public class Vala.EnumValue : Symbol { * @param value numerical representation * @return newly created enum value */ - public EnumValue.with_value (construct string! name, construct Expression value, SourceReference source_reference = null) { + public EnumValue.with_value (construct string name, construct Expression value, SourceReference source_reference = null) { this.source_reference = source_reference; } @@ -60,8 +60,8 @@ public class Vala.EnumValue : Symbol { * * @return string literal to be used in C code */ - public CCodeConstant! get_canonical_cconstant () { - var str = new String ("\""); + public CCodeConstant get_canonical_cconstant () { + var str = new StringBuilder ("\""); string i = name; @@ -81,11 +81,11 @@ public class Vala.EnumValue : Symbol { return new CCodeConstant (str.str); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_enum_value (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { if (value != null) { value.accept (visitor); } @@ -96,7 +96,7 @@ public class Vala.EnumValue : Symbol { * * @return the name to be used in C code */ - public string! get_cname () { + public string get_cname () { if (cname == null) { var en = (Enum) parent_symbol; cname = "%s%s".printf (en.get_cprefix (), name); diff --git a/vala/valaerrorcode.vala b/vala/valaerrorcode.vala index da4eb3b..3901fbb 100644 --- a/vala/valaerrorcode.vala +++ b/vala/valaerrorcode.vala @@ -39,7 +39,7 @@ public class Vala.ErrorCode : Symbol { * @param name enum value name * @return newly created enum value */ - public ErrorCode (construct string! name) { + public ErrorCode (construct string name) { } /** @@ -49,14 +49,14 @@ public class Vala.ErrorCode : Symbol { * @param value numerical representation * @return newly created enum value */ - public ErrorCode.with_value (construct string! name, construct Expression value) { + public ErrorCode.with_value (construct string name, construct Expression value) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_error_code (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { if (value != null) { value.accept (visitor); } @@ -67,7 +67,7 @@ public class Vala.ErrorCode : Symbol { * * @return the name to be used in C code */ - public string! get_cname () { + public string get_cname () { if (cname == null) { var edomain = (ErrorDomain) parent_symbol; cname = "%s%s".printf (edomain.get_cprefix (), name); diff --git a/vala/valaerrordomain.vala b/vala/valaerrordomain.vala index 437866b..0207880 100644 --- a/vala/valaerrordomain.vala +++ b/vala/valaerrordomain.vala @@ -41,7 +41,7 @@ public class Vala.ErrorDomain : Typesymbol { * @param source_reference reference to source code * @return newly created error domain */ - public ErrorDomain (construct string! name, construct SourceReference source_reference = null) { + public ErrorDomain (construct string name, construct SourceReference source_reference = null) { } /** @@ -59,7 +59,7 @@ public class Vala.ErrorDomain : Typesymbol { * * @param m a method */ - public void add_method (Method! m) { + public void add_method (Method m) { if (m is CreationMethod) { Report.error (m.source_reference, "construction methods may only be declared within classes and structs"); @@ -93,11 +93,11 @@ public class Vala.ErrorDomain : Typesymbol { return new ReadOnlyCollection (methods); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_error_domain (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { foreach (ErrorCode ecode in codes) { ecode.accept (visitor); } @@ -114,7 +114,7 @@ public class Vala.ErrorDomain : Typesymbol { return cname; } - public override string! get_lower_case_cprefix () { + public override string get_lower_case_cprefix () { if (lower_case_cprefix == null) { lower_case_cprefix = "%s_".printf (get_lower_case_cname (null)); } @@ -143,7 +143,7 @@ public class Vala.ErrorDomain : Typesymbol { return false; } - private void set_cname (string! cname) { + private void set_cname (string cname) { this.cname = cname; } @@ -153,7 +153,7 @@ public class Vala.ErrorDomain : Typesymbol { * * @return the prefix to be used in C code */ - public string! get_cprefix () { + public string get_cprefix () { if (cprefix == null) { cprefix = "%s_".printf (get_upper_case_cname (null)); } @@ -166,11 +166,11 @@ public class Vala.ErrorDomain : Typesymbol { * * @param cprefix the prefix to be used in C code */ - public void set_cprefix (string! cprefix) { + public void set_cprefix (string cprefix) { this.cprefix = cprefix; } - private void process_ccode_attribute (Attribute! a) { + private void process_ccode_attribute (Attribute a) { if (a.has_argument ("cname")) { set_cname (a.get_string ("cname")); } diff --git a/vala/valaerrortype.vala b/vala/valaerrortype.vala index 274cfe6..7e730ef 100644 --- a/vala/valaerrortype.vala +++ b/vala/valaerrortype.vala @@ -38,7 +38,7 @@ public class Vala.ErrorType : ReferenceType { this.source_reference = source_reference; } - public override bool compatible (DataType! target_type, bool enable_non_null = true) { + public override bool compatible (DataType target_type, bool enable_non_null = true) { /* temporarily ignore type parameters */ if (target_type.type_parameter != null) { return true; @@ -88,7 +88,7 @@ public class Vala.ErrorType : ReferenceType { } } - public override bool equals (DataType! type2) { + public override bool equals (DataType type2) { var et = type2 as ErrorType; if (et == null) { diff --git a/vala/valaexpressionstatement.vala b/vala/valaexpressionstatement.vala index f407881..bac7f7a 100644 --- a/vala/valaexpressionstatement.vala +++ b/vala/valaexpressionstatement.vala @@ -30,7 +30,7 @@ public class Vala.ExpressionStatement : CodeNode, Statement { /** * Specifies the expression to evaluate. */ - public Expression! expression { + public Expression expression { get { return _expression; } @@ -40,7 +40,7 @@ public class Vala.ExpressionStatement : CodeNode, Statement { } } - private Expression! _expression; + private Expression _expression; /** * Creates a new expression statement. @@ -49,16 +49,16 @@ public class Vala.ExpressionStatement : CodeNode, Statement { * @param source reference to source code * @return newly created expression statement */ - public ExpressionStatement (construct Expression! expression, construct SourceReference source_reference = null) { + public ExpressionStatement (construct Expression expression, construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { expression.accept (visitor); visitor.visit_expression_statement (this); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (expression == old_node) { expression = new_node; } diff --git a/vala/valafield.vala b/vala/valafield.vala index d4c63e8..ac09e96 100644 --- a/vala/valafield.vala +++ b/vala/valafield.vala @@ -30,7 +30,7 @@ public class Vala.Field : Member, Lockable { /** * The data type of this field. */ - public DataType! type_reference { + public DataType type_reference { get { return _data_type; } set { _data_type = value; @@ -80,16 +80,16 @@ public class Vala.Field : Member, Lockable { * @param source reference to source code * @return newly created field */ - public Field (construct string! name, construct DataType! type_reference, construct Expression initializer, construct SourceReference source_reference = null) { + public Field (construct string name, construct DataType type_reference, construct Expression initializer, construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_member (this); visitor.visit_field (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { type_reference.accept (visitor); if (initializer != null) { @@ -102,7 +102,7 @@ public class Vala.Field : Member, Lockable { * * @return the name to be used in C code */ - public string! get_cname () { + public string get_cname () { if (cname == null) { cname = get_default_cname (); } @@ -114,7 +114,7 @@ public class Vala.Field : Member, Lockable { * * @param cname the name to be used in C code */ - public void set_cname (string! cname) { + public void set_cname (string cname) { this.cname = cname; } @@ -123,7 +123,7 @@ public class Vala.Field : Member, Lockable { * * @return the name to be used in C code by default */ - public string! get_default_cname () { + public string get_default_cname () { if (!instance) { return parent_symbol.get_lower_case_cprefix () + name; } else { @@ -131,7 +131,7 @@ public class Vala.Field : Member, Lockable { } } - private void process_ccode_attribute (Attribute! a) { + private void process_ccode_attribute (Attribute a) { if (a.has_argument ("cname")) { set_cname (a.get_string ("cname")); } @@ -164,7 +164,7 @@ public class Vala.Field : Member, Lockable { lock_used = used; } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (type_reference == old_type) { type_reference = new_type; } diff --git a/vala/valaforeachstatement.vala b/vala/valaforeachstatement.vala index 3c93e3c..7c8eb96 100644 --- a/vala/valaforeachstatement.vala +++ b/vala/valaforeachstatement.vala @@ -30,7 +30,7 @@ public class Vala.ForeachStatement : Block { /** * Specifies the element type. */ - public DataType! type_reference { + public DataType type_reference { get { return _data_type; } set { _data_type = value; @@ -41,12 +41,12 @@ public class Vala.ForeachStatement : Block { /** * Specifies the element variable name. */ - public string! variable_name { get; set construct; } + public string variable_name { get; set construct; } /** * Specifies the container. */ - public Expression! collection { + public Expression collection { get { return _collection; } @@ -84,7 +84,7 @@ public class Vala.ForeachStatement : Block { */ public VariableDeclarator iterator_variable_declarator { get; set; } - private Expression! _collection; + private Expression _collection; private Block _body; private DataType _data_type; @@ -98,14 +98,14 @@ public class Vala.ForeachStatement : Block { * @param source reference to source code * @return newly created foreach statement */ - public ForeachStatement (construct DataType! type_reference, construct string! variable_name, construct Expression! collection, construct Block body, construct SourceReference source_reference) { + public ForeachStatement (construct DataType type_reference, construct string variable_name, construct Expression collection, construct Block body, construct SourceReference source_reference) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_foreach_statement (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { type_reference.accept (visitor); collection.accept (visitor); @@ -114,13 +114,13 @@ public class Vala.ForeachStatement : Block { body.accept (visitor); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (collection == old_node) { collection = new_node; } } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (type_reference == old_type) { type_reference = new_type; } diff --git a/vala/valaformalparameter.vala b/vala/valaformalparameter.vala index a023826..b6b6cc3 100644 --- a/vala/valaformalparameter.vala +++ b/vala/valaformalparameter.vala @@ -90,7 +90,7 @@ public class Vala.FormalParameter : Symbol { * @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; @@ -109,11 +109,11 @@ public class Vala.FormalParameter : Symbol { access = SymbolAccessibility.PUBLIC; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_formal_parameter (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { if (!ellipsis) { type_reference.accept (visitor); @@ -123,7 +123,7 @@ public class Vala.FormalParameter : Symbol { } } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (type_reference == old_type) { type_reference = new_type; } diff --git a/vala/valaforstatement.vala b/vala/valaforstatement.vala index 245b514..610ef84 100644 --- a/vala/valaforstatement.vala +++ b/vala/valaforstatement.vala @@ -58,7 +58,7 @@ public class Vala.ForStatement : CodeNode, Statement { private Gee.List initializer = new ArrayList (); private Gee.List iterator = new ArrayList (); - private Expression! _condition; + private Expression _condition; private Block _body; /** @@ -77,7 +77,7 @@ public class Vala.ForStatement : CodeNode, Statement { * * @param init an initializer expression */ - public void add_initializer (Expression! init) { + public void add_initializer (Expression init) { init.parent_node = this; initializer.add (init); } @@ -96,7 +96,7 @@ public class Vala.ForStatement : CodeNode, Statement { * * @param iter an iterator expression */ - public void add_iterator (Expression! iter) { + public void add_iterator (Expression iter) { iter.parent_node = this; iterator.add (iter); } @@ -110,11 +110,11 @@ public class Vala.ForStatement : CodeNode, Statement { return new ReadOnlyCollection (iterator); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_for_statement (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { foreach (Expression init_expr in initializer) { init_expr.accept (visitor); visitor.visit_end_full_expression (init_expr); @@ -134,7 +134,7 @@ public class Vala.ForStatement : CodeNode, Statement { body.accept (visitor); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (condition == old_node) { condition = new_node; return; diff --git a/vala/valaifstatement.vala b/vala/valaifstatement.vala index 237a00e..16bc57d 100644 --- a/vala/valaifstatement.vala +++ b/vala/valaifstatement.vala @@ -29,7 +29,7 @@ public class Vala.IfStatement : CodeNode, Statement { /** * The boolean condition to evaluate. */ - public Expression! condition { + public Expression condition { get { return _condition; } @@ -42,14 +42,14 @@ public class Vala.IfStatement : CodeNode, Statement { /** * The statement to be evaluated if the condition holds. */ - public Block! true_statement { get; set construct; } + public Block true_statement { get; set construct; } /** * The optional statement to be evaluated if the condition doesn't hold. */ public Block false_statement { get; set construct; } - private Expression! _condition; + private Expression _condition; /** * Creates a new if statement. @@ -59,18 +59,18 @@ public class Vala.IfStatement : CodeNode, Statement { * @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; source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_if_statement (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { condition.accept (visitor); visitor.visit_end_full_expression (condition); @@ -81,7 +81,7 @@ public class Vala.IfStatement : CodeNode, Statement { } } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (condition == old_node) { condition = new_node; } diff --git a/vala/valainitializerlist.vala b/vala/valainitializerlist.vala index cecec41..55aba15 100644 --- a/vala/valainitializerlist.vala +++ b/vala/valainitializerlist.vala @@ -35,7 +35,7 @@ public class Vala.InitializerList : Expression { * * @param expr an expression */ - public void append (Expression! expr) { + public void append (Expression expr) { initializers.add (expr); } @@ -64,13 +64,13 @@ public class Vala.InitializerList : Expression { public InitializerList (construct SourceReference source_reference) { } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { foreach (Expression expr in initializers) { expr.accept (visitor); } } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_initializer_list (this); } diff --git a/vala/valainstancecast.vala b/vala/valainstancecast.vala index 137b2da..116c88e 100644 --- a/vala/valainstancecast.vala +++ b/vala/valainstancecast.vala @@ -29,12 +29,12 @@ public class Vala.InstanceCast : CCodeFunctionCall { /** * The target type. */ - public weak Typesymbol! type_reference { get; set construct; } + public weak Typesymbol type_reference { get; set construct; } /** * The expression to be cast. */ - public CCodeExpression! inner { get; set construct; } + public CCodeExpression inner { get; set construct; } /** * Creates a new instance cast expression. @@ -43,7 +43,7 @@ public class Vala.InstanceCast : CCodeFunctionCall { * @param type the target type * @return newly created instance cast expression */ - public InstanceCast (CCodeExpression! expr, Typesymbol! type) { + public InstanceCast (CCodeExpression expr, Typesymbol type) { inner = expr; type_reference = type; } diff --git a/vala/valaintegerliteral.vala b/vala/valaintegerliteral.vala index ea909f0..e7dea54 100644 --- a/vala/valaintegerliteral.vala +++ b/vala/valaintegerliteral.vala @@ -29,7 +29,7 @@ public class Vala.IntegerLiteral : Literal { /** * The literal value. */ - public string! value { get; set; } + public string value { get; set; } /** * Creates a new integer literal. @@ -38,16 +38,16 @@ public class Vala.IntegerLiteral : Literal { * @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; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_integer_literal (this); } - public override string! to_string () { + public override string to_string () { return value; } @@ -56,7 +56,7 @@ public class Vala.IntegerLiteral : Literal { * * @return the name of literal type */ - public string! get_type_name () { + public string get_type_name () { string number = value; int l = 0; diff --git a/vala/valaintegertype.vala b/vala/valaintegertype.vala index 40309af..c7cdb36 100644 --- a/vala/valaintegertype.vala +++ b/vala/valaintegertype.vala @@ -28,17 +28,17 @@ using GLib; public class Vala.IntegerType : ValueType { public IntegerLiteral literal { get; set; } - public IntegerType (construct Typesymbol! type_symbol) { + public IntegerType (construct Typesymbol type_symbol) { data_type = type_symbol; } - public override DataType! copy () { + public override DataType copy () { var type = new IntegerType (type_symbol); type.literal = literal; return type; } - public override bool compatible (DataType! target_type, bool enable_non_null = true) { + public override bool compatible (DataType target_type, bool enable_non_null = true) { if (target_type.data_type is Struct && literal.get_type_name () == "int") { // int literals are implicitly convertible to integer types // of a lower rank if the value of the literal is within diff --git a/vala/valainterface.vala b/vala/valainterface.vala index d726841..e654c2a 100644 --- a/vala/valainterface.vala +++ b/vala/valainterface.vala @@ -62,7 +62,7 @@ public class Vala.Interface : Typesymbol { * @param source reference to source code * @return newly created interface */ - public Interface (construct string! name, construct SourceReference source_reference = null) { + public Interface (construct string name, construct SourceReference source_reference = null) { } /** @@ -70,7 +70,7 @@ public class Vala.Interface : Typesymbol { * * @param p a type parameter */ - public void add_type_parameter (TypeParameter! p) { + public void add_type_parameter (TypeParameter p) { type_parameters.add (p); p.type = this; scope.add (p.name, p); @@ -91,7 +91,7 @@ public class Vala.Interface : Typesymbol { * * @param type an interface or class reference */ - public void add_prerequisite (DataType! type) { + public void add_prerequisite (DataType type) { prerequisites.add (type); type.parent_node = this; } @@ -102,7 +102,7 @@ public class Vala.Interface : Typesymbol { * * @param type an interface or class reference */ - public void prepend_prerequisite (DataType! type) { + public void prepend_prerequisite (DataType type) { prerequisites.insert (0, type); } @@ -120,7 +120,7 @@ public class Vala.Interface : Typesymbol { * * @param m a method */ - public void add_method (Method! m) { + public void add_method (Method m) { if (m is CreationMethod) { Report.error (m.source_reference, "construction methods may only be declared within classes and structs"); @@ -156,7 +156,7 @@ public class Vala.Interface : Typesymbol { * * @param f a field */ - public void add_field (Field! f) { + public void add_field (Field f) { fields.add (f); scope.add (f.name, f); } @@ -175,7 +175,7 @@ public class Vala.Interface : Typesymbol { * * @param prop a property */ - public void add_property (Property! prop) { + public void add_property (Property prop) { properties.add (prop); scope.add (prop.name, prop); } @@ -194,7 +194,7 @@ public class Vala.Interface : Typesymbol { * * @param sig a signal */ - public void add_signal (Signal! sig) { + public void add_signal (Signal sig) { signals.add (sig); scope.add (sig.name, sig); } @@ -213,7 +213,7 @@ public class Vala.Interface : Typesymbol { * * @param cl a class */ - public void add_class (Class! cl) { + public void add_class (Class cl) { classes.add (cl); scope.add (cl.name, cl); } @@ -223,7 +223,7 @@ public class Vala.Interface : Typesymbol { * * @param st a struct */ - public void add_struct (Struct! st) { + public void add_struct (Struct st) { structs.add (st); scope.add (st.name, st); } @@ -243,7 +243,7 @@ public class Vala.Interface : Typesymbol { * * @param d a delegate */ - public void add_delegate (Delegate! d) { + public void add_delegate (Delegate d) { delegates.add (d); scope.add (d.name, d); } @@ -261,7 +261,7 @@ public class Vala.Interface : Typesymbol { * * @return the suffix to be used in C code */ - public string! get_lower_case_csuffix () { + public string get_lower_case_csuffix () { if (lower_case_csuffix == null) { lower_case_csuffix = get_default_lower_case_csuffix (); } @@ -274,7 +274,7 @@ public class Vala.Interface : Typesymbol { * * @return the suffix to be used in C code */ - public string! get_default_lower_case_csuffix () { + public string get_default_lower_case_csuffix () { string result = camel_case_to_lower_case (name); // remove underscores in some cases to avoid conflicts of type macros @@ -296,7 +296,7 @@ public class Vala.Interface : Typesymbol { * * @param csuffix the suffix to be used in C code */ - public void set_lower_case_csuffix (string! csuffix) { + public void set_lower_case_csuffix (string csuffix) { this.lower_case_csuffix = csuffix; } @@ -307,7 +307,7 @@ public class Vala.Interface : Typesymbol { return "%s%s%s".printf (parent_symbol.get_lower_case_cprefix (), infix, get_lower_case_csuffix ()); } - public override string! get_lower_case_cprefix () { + public override string get_lower_case_cprefix () { return "%s_".printf (get_lower_case_cname (null)); } @@ -315,11 +315,11 @@ public class Vala.Interface : Typesymbol { return get_lower_case_cname (infix).up (); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_interface (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { foreach (DataType type in prerequisites) { type.accept (visitor); } @@ -377,7 +377,7 @@ public class Vala.Interface : Typesymbol { return "g_object_unref"; } - public override bool is_subtype_of (Typesymbol! t) { + public override bool is_subtype_of (Typesymbol t) { if (this == t) { return true; } @@ -391,7 +391,7 @@ public class Vala.Interface : Typesymbol { return false; } - private void process_ccode_attribute (Attribute! a) { + private void process_ccode_attribute (Attribute a) { if (a.has_argument ("type_cname")) { set_type_cname (a.get_string ("type_cname")); } @@ -406,7 +406,7 @@ public class Vala.Interface : Typesymbol { } } - private void process_dbus_interface_attribute (Attribute! a) { + private void process_dbus_interface_attribute (Attribute a) { if (declaration_only) { cname = "DBusGProxy"; } @@ -442,7 +442,7 @@ public class Vala.Interface : Typesymbol { * * @param type_cname the type struct name to be used in C code */ - public void set_type_cname (string! type_cname) { + public void set_type_cname (string type_cname) { this.type_cname = type_cname; } @@ -466,7 +466,7 @@ public class Vala.Interface : Typesymbol { return type_id; } - public override int get_type_parameter_index (string! name) { + public override int get_type_parameter_index (string name) { int i = 0; foreach (TypeParameter parameter in type_parameters) { if (parameter.name == name) { @@ -477,7 +477,7 @@ public class Vala.Interface : Typesymbol { return -1; } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { for (int i = 0; i < prerequisites.size; i++) { if (prerequisites[i] == old_type) { prerequisites[i] = new_type; diff --git a/vala/valainterfacetype.vala b/vala/valainterfacetype.vala index 2ea9ac6..96b39c4 100644 --- a/vala/valainterfacetype.vala +++ b/vala/valainterfacetype.vala @@ -31,7 +31,7 @@ public class Vala.InterfaceType : ReferenceType { */ public weak Interface interface_symbol { get; set; } - public InterfaceType (construct Interface! interface_symbol) { + public InterfaceType (construct Interface interface_symbol) { data_type = interface_symbol; } diff --git a/vala/valainterfacewriter.vala b/vala/valainterfacewriter.vala index 0463636..51d3330 100644 --- a/vala/valainterfacewriter.vala +++ b/vala/valainterfacewriter.vala @@ -45,7 +45,7 @@ public class Vala.InterfaceWriter : CodeVisitor { * @param context a code context * @param filename a relative or absolute filename */ - public void write_file (CodeContext! context, string! filename) { + public void write_file (CodeContext context, string filename) { this.context = context; stream = FileStream.open (filename, "w"); @@ -59,7 +59,7 @@ public class Vala.InterfaceWriter : CodeVisitor { stream = null; } - public override void visit_namespace (Namespace! ns) { + public override void visit_namespace (Namespace ns) { if (ns.pkg) { return; } @@ -84,7 +84,7 @@ public class Vala.InterfaceWriter : CodeVisitor { write_newline (); } - public override void visit_class (Class! cl) { + public override void visit_class (Class cl) { if (cl.source_reference != null && cl.source_reference.file.pkg) { return; } @@ -177,7 +177,7 @@ public class Vala.InterfaceWriter : CodeVisitor { write_newline (); } - public override void visit_struct (Struct! st) { + public override void visit_struct (Struct st) { if (st.source_reference != null && st.source_reference.file.pkg) { return; } @@ -219,7 +219,7 @@ public class Vala.InterfaceWriter : CodeVisitor { write_newline (); } - public override void visit_interface (Interface! iface) { + public override void visit_interface (Interface iface) { if (iface.source_reference != null && iface.source_reference.file.pkg) { return; } @@ -289,7 +289,7 @@ public class Vala.InterfaceWriter : CodeVisitor { write_newline (); } - public override void visit_enum (Enum! en) { + public override void visit_enum (Enum en) { if (en.source_reference != null && en.source_reference.file.pkg) { return; } @@ -400,7 +400,7 @@ public class Vala.InterfaceWriter : CodeVisitor { write_newline (); } - public override void visit_constant (Constant! c) { + public override void visit_constant (Constant c) { if (c.source_reference != null && c.source_reference.file.pkg) { return; } @@ -421,7 +421,7 @@ public class Vala.InterfaceWriter : CodeVisitor { write_newline (); } - public override void visit_field (Field! f) { + public override void visit_field (Field f) { if (f.source_reference != null && f.source_reference.file.pkg) { return; } @@ -494,7 +494,7 @@ public class Vala.InterfaceWriter : CodeVisitor { } - var ccode_params = new String (); + var ccode_params = new StringBuilder (); var separator = ""; if (!float_equal (param.carray_length_parameter_position, i + 0.1)) { @@ -541,7 +541,7 @@ public class Vala.InterfaceWriter : CodeVisitor { write_string (")"); } - public override void visit_delegate (Delegate! cb) { + public override void visit_delegate (Delegate cb) { if (cb.source_reference != null && cb.source_reference.file.pkg) { return; } @@ -586,7 +586,7 @@ public class Vala.InterfaceWriter : CodeVisitor { write_newline (); } - public override void visit_method (Method! m) { + public override void visit_method (Method m) { if (m.source_reference != null && m.source_reference.file.pkg) { return; } @@ -614,7 +614,7 @@ public class Vala.InterfaceWriter : CodeVisitor { } } - var ccode_params = new String (); + var ccode_params = new StringBuilder (); var separator = ""; if (m.get_cname () != m.get_default_cname ()) { @@ -689,11 +689,11 @@ public class Vala.InterfaceWriter : CodeVisitor { write_newline (); } - public override void visit_creation_method (CreationMethod! m) { + public override void visit_creation_method (CreationMethod m) { visit_method (m); } - public override void visit_property (Property! prop) { + public override void visit_property (Property prop) { if (!check_accessibility (prop) || prop.overrides || prop.base_interface_property != null) { return; } @@ -740,7 +740,7 @@ public class Vala.InterfaceWriter : CodeVisitor { write_newline (); } - public override void visit_signal (Signal! sig) { + public override void visit_signal (Signal sig) { if (!check_accessibility (sig)) { return; } @@ -782,7 +782,7 @@ public class Vala.InterfaceWriter : CodeVisitor { bol = false; } - private void write_identifier (string! s) { + private void write_identifier (string s) { if (s == "base" || s == "break" || s == "class" || s == "construct" || s == "delegate" || s == "delete" || s == "do" || s == "foreach" || s == "in" || @@ -794,7 +794,7 @@ public class Vala.InterfaceWriter : CodeVisitor { write_string (s); } - private void write_return_type (DataType! type) { + private void write_return_type (DataType type) { if (type.is_reference_type_or_type_parameter ()) { if (!type.transfers_ownership) { write_string ("weak "); @@ -804,11 +804,11 @@ public class Vala.InterfaceWriter : CodeVisitor { write_type (type); } - private void write_type (DataType! type) { + private void write_type (DataType type) { write_string (type.to_string ()); } - private void write_string (string! s) { + private void write_string (string s) { stream.printf ("%s", s); bol = false; } @@ -835,7 +835,7 @@ public class Vala.InterfaceWriter : CodeVisitor { stream.printf ("}"); } - private bool check_accessibility (Symbol! sym) { + private bool check_accessibility (Symbol sym) { if (sym.access == SymbolAccessibility.PUBLIC || sym.access == SymbolAccessibility.PROTECTED) { return true; @@ -844,7 +844,7 @@ public class Vala.InterfaceWriter : CodeVisitor { return false; } - private void write_accessibility (Symbol! sym) { + private void write_accessibility (Symbol sym) { if (sym.access == SymbolAccessibility.PUBLIC) { write_string ("public "); } else if (sym.access == SymbolAccessibility.PROTECTED) { diff --git a/vala/valainvocationexpression.vala b/vala/valainvocationexpression.vala index ce9428e..3eeeadf 100644 --- a/vala/valainvocationexpression.vala +++ b/vala/valainvocationexpression.vala @@ -30,7 +30,7 @@ public class Vala.InvocationExpression : Expression { /** * The method to call. */ - public Expression! call { + public Expression call { get { return _call; } set construct { _call = value; @@ -40,7 +40,7 @@ public class Vala.InvocationExpression : Expression { public CCodeExpression delegate_target { get; set; } - public Expression! _call; + public Expression _call; private Gee.List argument_list = new ArrayList (); private Gee.List array_sizes = new ArrayList (); @@ -52,7 +52,7 @@ public class Vala.InvocationExpression : Expression { * @param source_reference reference to source code * @return newly created invocation expression */ - public InvocationExpression (construct Expression! call, construct SourceReference source_reference = null) { + public InvocationExpression (construct Expression call, construct SourceReference source_reference = null) { } /** @@ -60,7 +60,7 @@ public class Vala.InvocationExpression : Expression { * * @param arg an argument */ - public void add_argument (Expression! arg) { + public void add_argument (Expression arg) { argument_list.add (arg); arg.parent_node = this; } @@ -77,7 +77,7 @@ public class Vala.InvocationExpression : Expression { /** * Add an array size C code expression. */ - public void append_array_size (CCodeExpression! size) { + public void append_array_size (CCodeExpression size) { array_sizes.add (size); } @@ -89,11 +89,11 @@ public class Vala.InvocationExpression : Expression { return new ReadOnlyList (array_sizes); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_invocation_expression (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { call.accept (visitor); foreach (Expression expr in argument_list) { @@ -101,7 +101,7 @@ public class Vala.InvocationExpression : Expression { } } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (call == old_node) { call = new_node; } diff --git a/vala/valalambdaexpression.vala b/vala/valalambdaexpression.vala index 545c3be..eb2c8d4 100644 --- a/vala/valalambdaexpression.vala +++ b/vala/valalambdaexpression.vala @@ -54,7 +54,7 @@ public class Vala.LambdaExpression : Expression { * @param source_reference reference to source code * @return newly created lambda expression */ - public LambdaExpression (construct Expression! expression_body, construct SourceReference source_reference) { + public LambdaExpression (construct Expression expression_body, construct SourceReference source_reference) { } /** @@ -64,7 +64,7 @@ public class Vala.LambdaExpression : Expression { * @param source_reference reference to source code * @return newly created lambda expression */ - public LambdaExpression.with_statement_body (construct Block! statement_body, construct SourceReference source_reference) { + public LambdaExpression.with_statement_body (construct Block statement_body, construct SourceReference source_reference) { } /** @@ -72,7 +72,7 @@ public class Vala.LambdaExpression : Expression { * * @param param parameter name */ - public void add_parameter (string! param) { + public void add_parameter (string param) { parameters.add (param); } @@ -85,11 +85,11 @@ public class Vala.LambdaExpression : Expression { return new ReadOnlyCollection (parameters); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_lambda_expression (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { if (method == null) { if (expression_body != null) { expression_body.accept (visitor); diff --git a/vala/valalocalvariabledeclaration.vala b/vala/valalocalvariabledeclaration.vala index 13ff54b..2d4c3ae 100644 --- a/vala/valalocalvariabledeclaration.vala +++ b/vala/valalocalvariabledeclaration.vala @@ -30,7 +30,7 @@ public class Vala.LocalVariableDeclaration : CodeNode { /** * The type of the local variable. */ - public DataType! type_reference { + public DataType type_reference { get { return _data_type; } set { _data_type = value; @@ -69,7 +69,7 @@ public class Vala.LocalVariableDeclaration : CodeNode { * * @param declarator a variable declarator */ - public void add_declarator (VariableDeclarator! declarator) { + public void add_declarator (VariableDeclarator declarator) { variable_declarators.add (declarator); } @@ -82,7 +82,7 @@ public class Vala.LocalVariableDeclaration : CodeNode { return new ReadOnlyCollection (variable_declarators); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { if (type_reference != null) { type_reference.accept (visitor); } @@ -94,7 +94,7 @@ public class Vala.LocalVariableDeclaration : CodeNode { visitor.visit_local_variable_declaration (this); } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (type_reference == old_type) { type_reference = new_type; } diff --git a/vala/valalockstatement.vala b/vala/valalockstatement.vala index 754ea41..3c14cc1 100644 --- a/vala/valalockstatement.vala +++ b/vala/valalockstatement.vala @@ -29,17 +29,17 @@ public class Vala.LockStatement : CodeNode, Statement { /** * Expression representing the resource to be locked. */ - public Expression! resource { get; set construct; } + public Expression resource { get; set construct; } /** * The statement during its execution the resource is locked. */ - public Block! body { get; set construct; } + public Block body { get; set construct; } public LockStatement (construct Expression resource, construct Block body, construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { resource.accept (visitor); body.accept (visitor); visitor.visit_lock_statement (this); diff --git a/vala/valamember.vala b/vala/valamember.vala index 87549a9..120ae7e 100644 --- a/vala/valamember.vala +++ b/vala/valamember.vala @@ -29,7 +29,7 @@ using Gee; public class Vala.Member : Symbol { private Gee.List cheader_filenames = new ArrayList (); - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_member (this); } @@ -55,7 +55,7 @@ public class Vala.Member : Symbol { * * @param filename a C header filename */ - public void add_cheader_filename (string! filename) { + public void add_cheader_filename (string filename) { cheader_filenames.add (filename); } } diff --git a/vala/valamemberaccess.vala b/vala/valamemberaccess.vala index 59fcb30..aaeec0d 100644 --- a/vala/valamemberaccess.vala +++ b/vala/valamemberaccess.vala @@ -45,7 +45,7 @@ public class Vala.MemberAccess : Expression { /** * The name of the member. */ - public string! member_name { get; set; } + public string member_name { get; set; } /** * Pointer member access. @@ -74,13 +74,13 @@ public class Vala.MemberAccess : Expression { * @param source_reference reference to source code * @return newly created member access expression */ - public MemberAccess (construct Expression inner, construct string! member_name, construct SourceReference source_reference = null) { + public MemberAccess (construct Expression inner, construct string member_name, construct SourceReference source_reference = null) { } - public MemberAccess.simple (construct string! member_name, construct SourceReference source_reference = null) { + public MemberAccess.simple (construct string member_name, construct SourceReference source_reference = null) { } - public MemberAccess.pointer (construct Expression inner, construct string! member_name, construct SourceReference source_reference = null) { + public MemberAccess.pointer (construct Expression inner, construct string member_name, construct SourceReference source_reference = null) { pointer_member_access = true; } @@ -89,7 +89,7 @@ public class Vala.MemberAccess : Expression { * * @param arg a type reference */ - public void add_type_argument (DataType! arg) { + public void add_type_argument (DataType arg) { type_argument_list.add (arg); arg.parent_node = this; } @@ -103,7 +103,7 @@ public class Vala.MemberAccess : Expression { return new ReadOnlyCollection (type_argument_list); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { if (inner != null) { inner.accept (visitor); } @@ -115,7 +115,7 @@ public class Vala.MemberAccess : Expression { visitor.visit_member_access (this); } - public override string! to_string () { + public override string to_string () { if (inner == null) { return member_name; } else { @@ -123,7 +123,7 @@ public class Vala.MemberAccess : Expression { } } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (inner == old_node) { inner = new_node; } @@ -134,7 +134,7 @@ public class Vala.MemberAccess : Expression { return (inner == null || inner.is_pure ()) && !(symbol_reference is Property); } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { for (int i = 0; i < type_argument_list.size; i++) { if (type_argument_list[i] == old_type) { type_argument_list[i] = new_type; diff --git a/vala/valamemberinitializer.vala b/vala/valamemberinitializer.vala index 597c8b3..4fe2066 100644 --- a/vala/valamemberinitializer.vala +++ b/vala/valamemberinitializer.vala @@ -30,12 +30,12 @@ public class Vala.MemberInitializer : CodeNode { /** * Member name. */ - public string! name { get; set; } + public string name { get; set; } /** * Initializer expression. */ - public Expression! initializer { get; set; } + public Expression initializer { get; set; } /** * The symbol this expression refers to. @@ -50,10 +50,10 @@ public class Vala.MemberInitializer : CodeNode { * @param source_reference reference to source code * @return newly created member initializer */ - public MemberInitializer (construct string! name, construct Expression! initializer, construct SourceReference source_reference = null) { + public MemberInitializer (construct string name, construct Expression initializer, construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { initializer.accept (visitor); } } diff --git a/vala/valamemorymanager.vala b/vala/valamemorymanager.vala index 92043f5..76ed9b0 100644 --- a/vala/valamemorymanager.vala +++ b/vala/valamemorymanager.vala @@ -36,11 +36,11 @@ public class Vala.MemoryManager : CodeVisitor { * * @param context a code context */ - public void analyze (CodeContext! context) { + public void analyze (CodeContext context) { context.accept (this); } - private void visit_possibly_leaked_expression (Expression! expr) { + private void visit_possibly_leaked_expression (Expression expr) { if (expr.static_type != null && expr.static_type.transfers_ownership) { /* mark reference as leaked */ @@ -48,7 +48,7 @@ public class Vala.MemoryManager : CodeVisitor { } } - private void visit_possibly_missing_copy_expression (Expression! expr) { + private void visit_possibly_missing_copy_expression (Expression expr) { if (expr.static_type != null && !expr.static_type.transfers_ownership && !(expr.static_type is NullType)) { @@ -57,25 +57,25 @@ public class Vala.MemoryManager : CodeVisitor { } } - public override void visit_source_file (SourceFile! source_file) { + public override void visit_source_file (SourceFile source_file) { if (!source_file.pkg) { source_file.accept_children (this); } } - public override void visit_class (Class! cl) { + public override void visit_class (Class cl) { cl.accept_children (this); } - public override void visit_struct (Struct! st) { + public override void visit_struct (Struct st) { st.accept_children (this); } - public override void visit_interface (Interface! iface) { + public override void visit_interface (Interface iface) { iface.accept_children (this); } - public override void visit_field (Field! f) { + public override void visit_field (Field f) { if (f.initializer != null) { if (!(f.type_reference is PointerType)) { if (f.type_reference.takes_ownership) { @@ -87,7 +87,7 @@ public class Vala.MemoryManager : CodeVisitor { } } - public override void visit_method (Method! m) { + public override void visit_method (Method m) { var old_symbol = current_symbol; current_symbol = m; @@ -96,37 +96,37 @@ public class Vala.MemoryManager : CodeVisitor { current_symbol = old_symbol; } - public override void visit_creation_method (CreationMethod! m) { + public override void visit_creation_method (CreationMethod m) { visit_method (m); } - public override void visit_property (Property! prop) { + public override void visit_property (Property prop) { current_symbol = prop; prop.accept_children (this); } - public override void visit_property_accessor (PropertyAccessor! acc) { + public override void visit_property_accessor (PropertyAccessor acc) { acc.accept_children (this); } - public override void visit_constructor (Constructor! c) { + public override void visit_constructor (Constructor c) { c.accept_children (this); } - public override void visit_destructor (Destructor! d) { + public override void visit_destructor (Destructor d) { d.accept_children (this); } - public override void visit_named_argument (NamedArgument! n) { + public override void visit_named_argument (NamedArgument n) { visit_possibly_leaked_expression (n.argument); } - public override void visit_block (Block! b) { + public override void visit_block (Block b) { b.accept_children (this); } - public override void visit_variable_declarator (VariableDeclarator! decl) { + public override void visit_variable_declarator (VariableDeclarator decl) { decl.accept_children (this); if (decl.initializer != null) { @@ -140,39 +140,39 @@ public class Vala.MemoryManager : CodeVisitor { } } - public override void visit_initializer_list (InitializerList! list) { + public override void visit_initializer_list (InitializerList list) { list.accept_children (this); } - public override void visit_expression_statement (ExpressionStatement! stmt) { + public override void visit_expression_statement (ExpressionStatement stmt) { visit_possibly_leaked_expression (stmt.expression); } - public override void visit_if_statement (IfStatement! stmt) { + public override void visit_if_statement (IfStatement stmt) { stmt.accept_children (this); } - public override void visit_switch_section (SwitchSection! section) { + public override void visit_switch_section (SwitchSection section) { section.accept_children (this); } - public override void visit_while_statement (WhileStatement! stmt) { + public override void visit_while_statement (WhileStatement stmt) { stmt.accept_children (this); } - public override void visit_do_statement (DoStatement! stmt) { + public override void visit_do_statement (DoStatement stmt) { stmt.accept_children (this); } - public override void visit_for_statement (ForStatement! stmt) { + public override void visit_for_statement (ForStatement stmt) { stmt.accept_children (this); } - public override void visit_foreach_statement (ForeachStatement! stmt) { + public override void visit_foreach_statement (ForeachStatement stmt) { stmt.accept_children (this); } - public override void visit_return_statement (ReturnStatement! stmt) { + public override void visit_return_statement (ReturnStatement stmt) { stmt.accept_children (this); if (stmt.return_expression != null) { @@ -200,19 +200,19 @@ public class Vala.MemoryManager : CodeVisitor { } } - public override void visit_throw_statement (ThrowStatement! stmt) { + public override void visit_throw_statement (ThrowStatement stmt) { stmt.accept_children (this); } - public override void visit_try_statement (TryStatement! stmt) { + public override void visit_try_statement (TryStatement stmt) { stmt.accept_children (this); } - public override void visit_catch_clause (CatchClause! clause) { + public override void visit_catch_clause (CatchClause clause) { clause.accept_children (this); } - public override void visit_array_creation_expression (ArrayCreationExpression! e) { + public override void visit_array_creation_expression (ArrayCreationExpression e) { if (e.initializer_list != null) { foreach (Expression init in e.initializer_list.get_initializers ()) { if (init.static_type.is_reference_type_or_type_parameter ()) { @@ -224,17 +224,17 @@ public class Vala.MemoryManager : CodeVisitor { } } - public override void visit_parenthesized_expression (ParenthesizedExpression! expr) { + public override void visit_parenthesized_expression (ParenthesizedExpression expr) { expr.accept_children (this); } - public override void visit_member_access (MemberAccess! expr) { + public override void visit_member_access (MemberAccess expr) { if (expr.inner != null) { visit_possibly_leaked_expression (expr.inner); } } - public override void visit_invocation_expression (InvocationExpression! expr) { + public override void visit_invocation_expression (InvocationExpression expr) { expr.accept_children (this); var mtype = expr.call.static_type; @@ -271,7 +271,7 @@ public class Vala.MemoryManager : CodeVisitor { } } - public override void visit_object_creation_expression (ObjectCreationExpression! expr) { + public override void visit_object_creation_expression (ObjectCreationExpression expr) { expr.accept_children (this); if (!(expr.symbol_reference is Method)) { @@ -309,16 +309,16 @@ public class Vala.MemoryManager : CodeVisitor { } } - public override void visit_binary_expression (BinaryExpression! expr) { + public override void visit_binary_expression (BinaryExpression expr) { visit_possibly_leaked_expression (expr.left); visit_possibly_leaked_expression (expr.right); } - public override void visit_lambda_expression (LambdaExpression! l) { + public override void visit_lambda_expression (LambdaExpression l) { l.accept_children (this); } - public override void visit_assignment (Assignment! a) { + public override void visit_assignment (Assignment a) { a.accept_children (this); if (a.left is PointerIndirection || a.left.symbol_reference is Signal) { diff --git a/vala/valamethod.vala b/vala/valamethod.vala index ef43e1a..eb948fd 100644 --- a/vala/valamethod.vala +++ b/vala/valamethod.vala @@ -71,7 +71,7 @@ public class Vala.Method : Member { /** * The name of the vfunc of this method as it is used in C code. */ - public string! vfunc_name { + public string vfunc_name { get { if (_vfunc_name == null) { _vfunc_name = this.name; @@ -86,7 +86,7 @@ public class Vala.Method : Member { /** * The sentinel to use for terminating variable length argument lists. */ - public string! sentinel { + public string sentinel { get { if (_sentinel == null) { return DEFAULT_SENTINEL; @@ -224,7 +224,7 @@ public class Vala.Method : Member { * * @param param a formal parameter */ - public void add_parameter (FormalParameter! param) { + public void add_parameter (FormalParameter param) { if (no_array_length) { param.no_array_length = true; } @@ -243,11 +243,11 @@ public class Vala.Method : Member { return new ReadOnlyCollection (parameters); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_method (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { if (return_type != null) { return_type.accept (visitor); } @@ -282,7 +282,7 @@ public class Vala.Method : Member { * * @return the name to be used in C code */ - public string! get_cname () { + public string get_cname () { if (cname == null) { cname = get_default_cname (); } @@ -295,7 +295,7 @@ public class Vala.Method : Member { * * @return the name to be used in C code by default */ - public virtual string! get_default_cname () { + public virtual string get_default_cname () { if (name == "main" && parent_symbol.name == null) { // avoid conflict with generated main function return "_main"; @@ -312,7 +312,7 @@ public class Vala.Method : Member { * * @return the name to be used in C code */ - public string! get_real_cname () { + public string get_real_cname () { if (base_method != null || base_interface_method != null) { return "%s_real_%s".printf (parent_symbol.get_lower_case_cname (null), name); } else { @@ -384,7 +384,7 @@ public class Vala.Method : Member { * @param m a method * @return true if the specified method is compatible to this method */ - public bool equals (Method! m2) { + public bool equals (Method m2) { if (!m2.return_type.equals (return_type)) { return false; } @@ -426,7 +426,7 @@ public class Vala.Method : Member { * * @param error_domain an error domain */ - public void add_error_domain (DataType! error_domain) { + public void add_error_domain (DataType error_domain) { error_domains.add (error_domain); error_domain.parent_node = this; } @@ -445,7 +445,7 @@ public class Vala.Method : Member { * * @param precondition a boolean precondition expression */ - public void add_precondition (Expression! precondition) { + public void add_precondition (Expression precondition) { preconditions.add (precondition); precondition.parent_node = this; } @@ -464,7 +464,7 @@ public class Vala.Method : Member { * * @param postcondition a boolean postcondition expression */ - public void add_postcondition (Expression! postcondition) { + public void add_postcondition (Expression postcondition) { postconditions.add (postcondition); postcondition.parent_node = this; } @@ -478,7 +478,7 @@ public class Vala.Method : Member { return new ReadOnlyCollection (postconditions); } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (return_type == old_type) { return_type = new_type; return; diff --git a/vala/valamethodtype.vala b/vala/valamethodtype.vala index e04fb62..be0df49 100644 --- a/vala/valamethodtype.vala +++ b/vala/valamethodtype.vala @@ -44,11 +44,11 @@ public class Vala.MethodType : DataType { return method_symbol.get_parameters (); } - public override DataType! copy () { + public override DataType copy () { return new MethodType (method_symbol); } - public override bool compatible (DataType! target_type, bool enable_non_null = true) { + public override bool compatible (DataType target_type, bool enable_non_null = true) { var dt = target_type as DelegateType; if (dt == null) { // method types incompatible to anything but delegates @@ -58,7 +58,7 @@ public class Vala.MethodType : DataType { return dt.delegate_symbol.matches_method (method_symbol); } - public override string! to_string () { + public override string to_string () { return method_symbol.get_full_name (); } } diff --git a/vala/valanamedargument.vala b/vala/valanamedargument.vala index 341014c..897b216 100644 --- a/vala/valanamedargument.vala +++ b/vala/valanamedargument.vala @@ -30,12 +30,12 @@ public class Vala.NamedArgument : CodeNode { /** * The name of a property. */ - public string! name { get; set construct; } + public string name { get; set construct; } /** * The expression the property should assign. */ - public Expression! argument { get; set construct; } + public Expression argument { get; set construct; } /** * Creates a new named argument. @@ -45,13 +45,13 @@ public class Vala.NamedArgument : CodeNode { * @param source reference to source code * @return newly created named argument */ - public NamedArgument (string! _name, Expression! arg, SourceReference source) { + public NamedArgument (string _name, Expression arg, SourceReference source) { name = _name; argument = arg; source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { argument.accept (visitor); visitor.visit_named_argument (this); diff --git a/vala/valanamespace.vala b/vala/valanamespace.vala index ef31866..3be699e 100644 --- a/vala/valanamespace.vala +++ b/vala/valanamespace.vala @@ -65,7 +65,7 @@ public class Vala.Namespace : Symbol { * * @param ns a namespace */ - public void add_namespace (Namespace! ns) { + public void add_namespace (Namespace ns) { namespaces.add (ns); scope.add (ns.name, ns); } @@ -84,7 +84,7 @@ public class Vala.Namespace : Symbol { * * @param cl a class */ - public void add_class (Class! cl) { + public void add_class (Class cl) { classes.add (cl); scope.add (cl.name, cl); } @@ -94,7 +94,7 @@ public class Vala.Namespace : Symbol { * * @param iface an interface */ - public void add_interface (Interface! iface) { + public void add_interface (Interface iface) { interfaces.add (iface); scope.add (iface.name, iface); } @@ -104,7 +104,7 @@ public class Vala.Namespace : Symbol { * * @param st a struct */ - public void add_struct (Struct! st) { + public void add_struct (Struct st) { structs.add (st); scope.add (st.name, st); } @@ -114,7 +114,7 @@ public class Vala.Namespace : Symbol { * * @param en an enum */ - public void add_enum (Enum! en) { + public void add_enum (Enum en) { enums.add (en); scope.add (en.name, en); } @@ -134,7 +134,7 @@ public class Vala.Namespace : Symbol { * * @param d a delegate */ - public void add_delegate (Delegate! d) { + public void add_delegate (Delegate d) { delegates.add (d); scope.add (d.name, d); } @@ -225,7 +225,7 @@ public class Vala.Namespace : Symbol { * * @param constant a constant */ - public void add_constant (Constant! constant) { + public void add_constant (Constant constant) { constants.add (constant); scope.add (constant.name, constant); } @@ -235,7 +235,7 @@ public class Vala.Namespace : Symbol { * * @param f a field */ - public void add_field (Field! f) { + public void add_field (Field f) { fields.add (f); scope.add (f.name, f); } @@ -245,7 +245,7 @@ public class Vala.Namespace : Symbol { * * @param m a method */ - public void add_method (Method! m) { + public void add_method (Method m) { if (m is CreationMethod) { Report.error (m.source_reference, "construction methods may only be declared within classes and structs"); @@ -263,11 +263,11 @@ public class Vala.Namespace : Symbol { scope.add (m.name, m); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_namespace (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { foreach (Namespace ns in namespaces) { ns.accept (visitor); } @@ -310,7 +310,7 @@ public class Vala.Namespace : Symbol { } } - public override string! get_cprefix () { + public override string get_cprefix () { if (cprefixes.size > 0) { return cprefixes[0]; } else if (null != name) { @@ -339,7 +339,7 @@ public class Vala.Namespace : Symbol { * * @param cprefixes the camel case prefixes used in C code */ - public void add_cprefix (string! cprefix) { + public void add_cprefix (string cprefix) { return_if_fail (cprefix.len() >= 1); cprefixes.add (cprefix); } @@ -350,7 +350,7 @@ public class Vala.Namespace : Symbol { * * @return the lower case prefix to be used in C code */ - public override string! get_lower_case_cprefix () { + public override string get_lower_case_cprefix () { if (lower_case_cprefix == null) { if (name == null) { lower_case_cprefix = ""; @@ -387,7 +387,7 @@ public class Vala.Namespace : Symbol { * @return header filename */ public string get_cheader_filename () { - var s = new String (); + var s = new StringBuilder (); bool first = true; foreach (string cheader_filename in get_cheader_filenames ()) { if (first) { @@ -406,12 +406,12 @@ public class Vala.Namespace : Symbol { * * @param cheader_filename header filename */ - public void set_cheader_filename (string! cheader_filename) { + public void set_cheader_filename (string cheader_filename) { cheader_filenames = new ArrayList (); cheader_filenames.add (cheader_filename); } - private void process_ccode_attribute (Attribute! a) { + private void process_ccode_attribute (Attribute a) { if (a.has_argument ("cprefix")) { foreach (string name in a.get_string ("cprefix").split (",")) add_cprefix (name); diff --git a/vala/valanamespacereference.vala b/vala/valanamespacereference.vala index 76204f8..faaa707 100644 --- a/vala/valanamespacereference.vala +++ b/vala/valanamespacereference.vala @@ -29,7 +29,7 @@ public class Vala.NamespaceReference : CodeNode { /** * The name of the namespace this reference is referring to. */ - public string! name { get; set; } + public string name { get; set; } /** * The resolved symbol of the namespace this reference is referring to. @@ -43,10 +43,10 @@ public class Vala.NamespaceReference : CodeNode { * @param source_reference reference to source code * @return newly created namespace reference */ - public NamespaceReference (construct string! name, construct SourceReference source_reference) { + public NamespaceReference (construct string name, construct SourceReference source_reference) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_namespace_reference (this); } } diff --git a/vala/valanullliteral.vala b/vala/valanullliteral.vala index e162676..f19b528 100644 --- a/vala/valanullliteral.vala +++ b/vala/valanullliteral.vala @@ -36,11 +36,11 @@ public class Vala.NullLiteral : Literal { source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_null_literal (this); } - public override string! to_string () { + public override string to_string () { return "null"; } diff --git a/vala/valanulltype.vala b/vala/valanulltype.vala index 744a959..47655aa 100644 --- a/vala/valanulltype.vala +++ b/vala/valanulltype.vala @@ -30,7 +30,7 @@ public class Vala.NullType : ReferenceType { this.source_reference = source_reference; } - public override bool compatible (DataType! target_type, bool enable_non_null = true) { + public override bool compatible (DataType target_type, bool enable_non_null = true) { if (!(target_type is PointerType) && (target_type is NullType || (target_type.data_type == null && target_type.type_parameter == null))) { return true; } @@ -55,7 +55,7 @@ public class Vala.NullType : ReferenceType { return false; } - public override DataType! copy () { + public override DataType copy () { return new NullType (source_reference); } } diff --git a/vala/valaobjectcreationexpression.vala b/vala/valaobjectcreationexpression.vala index 6b5aa67..e78eb07 100644 --- a/vala/valaobjectcreationexpression.vala +++ b/vala/valaobjectcreationexpression.vala @@ -30,7 +30,7 @@ public class Vala.ObjectCreationExpression : Expression { /** * The object type to create. */ - public DataType! type_reference { + public DataType type_reference { get { return _data_type; } set { _data_type = value; @@ -63,7 +63,7 @@ public class Vala.ObjectCreationExpression : Expression { * @param source_reference reference to source code * @return newly created object creation expression */ - public ObjectCreationExpression (construct MemberAccess! member_name, construct SourceReference source_reference) { + public ObjectCreationExpression (construct MemberAccess member_name, construct SourceReference source_reference) { } /** @@ -71,7 +71,7 @@ public class Vala.ObjectCreationExpression : Expression { * * @param arg an argument */ - public void add_argument (Expression! arg) { + public void add_argument (Expression arg) { argument_list.add (arg); arg.parent_node = this; } @@ -90,7 +90,7 @@ public class Vala.ObjectCreationExpression : Expression { * * @param init a member initializer */ - public void add_member_initializer (MemberInitializer! init) { + public void add_member_initializer (MemberInitializer init) { object_initializer.add (init); init.parent_node = this; } @@ -104,11 +104,11 @@ public class Vala.ObjectCreationExpression : Expression { return new ReadOnlyCollection (object_initializer); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_object_creation_expression (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { if (type_reference != null) { type_reference.accept (visitor); } @@ -126,7 +126,7 @@ public class Vala.ObjectCreationExpression : Expression { } } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { int index = argument_list.index_of (old_node); if (index >= 0 && new_node.parent_node == null) { argument_list[index] = new_node; @@ -138,7 +138,7 @@ public class Vala.ObjectCreationExpression : Expression { return false; } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (type_reference == old_type) { type_reference = new_type; } diff --git a/vala/valaparenthesizedexpression.vala b/vala/valaparenthesizedexpression.vala index bcc380c..8e334bb 100644 --- a/vala/valaparenthesizedexpression.vala +++ b/vala/valaparenthesizedexpression.vala @@ -29,7 +29,7 @@ public class Vala.ParenthesizedExpression : Expression { /** * The inner expression. */ - public Expression! inner { + public Expression inner { get { return _inner; } @@ -39,7 +39,7 @@ public class Vala.ParenthesizedExpression : Expression { } } - private Expression! _inner; + private Expression _inner; /** * Creates a new parenthesized expression. @@ -48,20 +48,20 @@ public class Vala.ParenthesizedExpression : Expression { * @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; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_parenthesized_expression (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { inner.accept (visitor); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (inner == old_node) { inner = new_node; } diff --git a/vala/valaparser.vala b/vala/valaparser.vala index da1c44a..84bfe77 100644 --- a/vala/valaparser.vala +++ b/vala/valaparser.vala @@ -68,12 +68,12 @@ public class Vala.Parser : CodeVisitor { * * @param context a code context */ - public void parse (CodeContext! context) { + public void parse (CodeContext context) { this.context = context; context.accept (this); } - public override void visit_source_file (SourceFile! source_file) { + public override void visit_source_file (SourceFile source_file) { if (source_file.filename.has_suffix (".vala") || source_file.filename.has_suffix (".vapi")) { parse_file (source_file); } @@ -368,8 +368,9 @@ public class Vala.Parser : CodeVisitor { expect (TokenType.CLOSE_BRACKET); } - // deprecated - accept (TokenType.OP_NEG); + if (accept (TokenType.OP_NEG)) { + Report.warning (get_last_src (), "obsolete syntax, types are non-null by default"); + } bool nullable = accept (TokenType.INTERR); diff --git a/vala/valapointerindirection.vala b/vala/valapointerindirection.vala index 918e5a5..a874e4b 100644 --- a/vala/valapointerindirection.vala +++ b/vala/valapointerindirection.vala @@ -29,7 +29,7 @@ public class Vala.PointerIndirection : Expression { /** * The pointer to dereference. */ - public Expression! inner { + public Expression inner { get { return _inner; } @@ -39,7 +39,7 @@ public class Vala.PointerIndirection : Expression { } } - private Expression! _inner; + private Expression _inner; /** * Creates a new pointer indirection. @@ -47,16 +47,16 @@ public class Vala.PointerIndirection : Expression { * @param inner pointer to be dereferenced * @return newly created pointer indirection */ - public PointerIndirection (construct Expression! inner, construct SourceReference source_reference = null) { + public PointerIndirection (construct Expression inner, construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { inner.accept (visitor); visitor.visit_pointer_indirection (this); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (inner == old_node) { inner = new_node; } diff --git a/vala/valapointertype.vala b/vala/valapointertype.vala index a1366b4..97af5d1 100644 --- a/vala/valapointertype.vala +++ b/vala/valapointertype.vala @@ -32,10 +32,10 @@ public class Vala.PointerType : DataType { */ public DataType base_type { get; set; } - public PointerType (construct DataType! base_type) { + public PointerType (construct DataType base_type) { } - public override string! to_string () { + public override string to_string () { return base_type.to_string () + "*"; } @@ -47,11 +47,11 @@ public class Vala.PointerType : DataType { } } - public override DataType! copy () { + public override DataType copy () { return new PointerType (base_type); } - public override bool compatible (DataType! target_type, bool enable_non_null = true) { + public override bool compatible (DataType target_type, bool enable_non_null = true) { if (target_type is PointerType || (target_type.data_type != null && target_type.data_type.get_attribute ("PointerType") != null)) { return true; } diff --git a/vala/valapostfixexpression.vala b/vala/valapostfixexpression.vala index 078301d..e32d68d 100644 --- a/vala/valapostfixexpression.vala +++ b/vala/valapostfixexpression.vala @@ -29,7 +29,7 @@ public class Vala.PostfixExpression : Expression { /** * The operand, must be a variable or a property. */ - public Expression! inner { get; set construct; } + public Expression inner { get; set construct; } /** * Specifies whether value should be incremented or decremented. @@ -44,13 +44,13 @@ public class Vala.PostfixExpression : Expression { * @param source reference to source code * @return newly created postfix expression */ - public PostfixExpression (Expression! _inner, bool inc, SourceReference source) { + public PostfixExpression (Expression _inner, bool inc, SourceReference source) { inner = _inner; increment = inc; source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { inner.accept (visitor); visitor.visit_postfix_expression (this); diff --git a/vala/valaproperty.vala b/vala/valaproperty.vala index f52486f..afac99d 100644 --- a/vala/valaproperty.vala +++ b/vala/valaproperty.vala @@ -29,7 +29,7 @@ public class Vala.Property : Member, Lockable { /** * The property type. */ - public DataType! type_reference { + public DataType type_reference { get { return _data_type; } set { _data_type = value; @@ -164,7 +164,7 @@ public class Vala.Property : Member, Lockable { * @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; @@ -172,13 +172,13 @@ public class Vala.Property : Member, Lockable { source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_member (this); visitor.visit_property (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { type_reference.accept (visitor); if (get_accessor != null) { @@ -200,7 +200,7 @@ public class Vala.Property : Member, Lockable { * * @return the upper case name to be used in C code */ - public string! get_upper_case_cname () { + public string get_upper_case_cname () { return "%s_%s".printf (parent_symbol.get_lower_case_cname (null), camel_case_to_lower_case (name)).up (); } @@ -209,12 +209,12 @@ public class Vala.Property : Member, Lockable { * * @return string literal to be used in C code */ - public CCodeConstant! get_canonical_cconstant () { + public CCodeConstant get_canonical_cconstant () { return new CCodeConstant ("\"%s\"".printf (get_canonical_name ())); } private string get_canonical_name () { - var str = new String (); + var str = new StringBuilder (); string i = name; @@ -268,7 +268,7 @@ public class Vala.Property : Member, Lockable { * @return true if the specified property is compatible to this * property */ - public bool equals (Property! prop2) { + public bool equals (Property prop2) { if (!prop2.type_reference.equals (type_reference)) { return false; } @@ -295,7 +295,7 @@ public class Vala.Property : Member, Lockable { return true; } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (type_reference == old_type) { type_reference = new_type; } diff --git a/vala/valapropertyaccessor.vala b/vala/valapropertyaccessor.vala index 0b0d4bf..3c82c11 100644 --- a/vala/valapropertyaccessor.vala +++ b/vala/valapropertyaccessor.vala @@ -84,11 +84,11 @@ public class Vala.PropertyAccessor : CodeNode { public PropertyAccessor (construct bool readable, construct bool writable, construct bool construction, construct Block body, construct SourceReference source_reference) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_property_accessor (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { if (body != null) { body.accept (visitor); } diff --git a/vala/valarealliteral.vala b/vala/valarealliteral.vala index 778f863..296635b 100644 --- a/vala/valarealliteral.vala +++ b/vala/valarealliteral.vala @@ -43,7 +43,7 @@ public class Vala.RealLiteral : Literal { source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_real_literal (this); } @@ -52,7 +52,7 @@ public class Vala.RealLiteral : Literal { * * @return the name of literal type */ - public string! get_type_name () { + public string get_type_name () { if (value.has_suffix ("F")) { return "float"; } diff --git a/vala/valareferencetransferexpression.vala b/vala/valareferencetransferexpression.vala index 8ba9e83..b2ccf37 100644 --- a/vala/valareferencetransferexpression.vala +++ b/vala/valareferencetransferexpression.vala @@ -29,7 +29,7 @@ public class Vala.ReferenceTransferExpression : Expression { /** * The variable whose reference is to be transferred. */ - public Expression! inner { + public Expression inner { get { return _inner; } @@ -39,7 +39,7 @@ public class Vala.ReferenceTransferExpression : Expression { } } - private Expression! _inner; + private Expression _inner; /** * Creates a new reference transfer expression. @@ -47,16 +47,16 @@ public class Vala.ReferenceTransferExpression : Expression { * @param inner variable whose reference is to be transferred * @return newly created reference transfer expression */ - public ReferenceTransferExpression (construct Expression! inner, construct SourceReference source_reference = null) { + public ReferenceTransferExpression (construct Expression inner, construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { inner.accept (visitor); visitor.visit_reference_transfer_expression (this); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (inner == old_node) { inner = new_node; } diff --git a/vala/valareport.vala b/vala/valareport.vala index d819408..5b21c9a 100644 --- a/vala/valareport.vala +++ b/vala/valareport.vala @@ -55,7 +55,7 @@ public static class Vala.Report { /** * Pretty-print the actual line of offending code if possible. */ - private static void report_source (SourceReference! source) { + private static void report_source (SourceReference source) { if (source.first_line != source.last_line) { // FIXME Cannot report multi-line issues currently return; @@ -96,7 +96,7 @@ public static class Vala.Report { * @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 @@ public static class Vala.Report { * @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); diff --git a/vala/valareturnstatement.vala b/vala/valareturnstatement.vala index 399f2d2..77566e2 100644 --- a/vala/valareturnstatement.vala +++ b/vala/valareturnstatement.vala @@ -39,7 +39,7 @@ public class Vala.ReturnStatement : CodeNode, Statement { } } - private Expression! _return_expression; + private Expression _return_expression; /** * Creates a new return statement. @@ -51,11 +51,11 @@ public class Vala.ReturnStatement : CodeNode, Statement { public ReturnStatement (construct Expression return_expression = null, construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_return_statement (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { if (return_expression != null) { return_expression.accept (visitor); @@ -63,7 +63,7 @@ public class Vala.ReturnStatement : CodeNode, Statement { } } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (return_expression == old_node) { return_expression = new_node; } diff --git a/vala/valascanner.vala b/vala/valascanner.vala index 761a89f..f383c41 100644 --- a/vala/valascanner.vala +++ b/vala/valascanner.vala @@ -738,7 +738,7 @@ public class Vala.Scanner : Object { } } - void push_comment (string! comment_item, bool file_comment) { + void push_comment (string comment_item, bool file_comment) { if (_comment == null) { _comment = comment_item; } else { diff --git a/vala/valascope.vala b/vala/valascope.vala index d2ae791..94d821f 100644 --- a/vala/valascope.vala +++ b/vala/valascope.vala @@ -54,7 +54,7 @@ public class Vala.Scope : Object { * @param name name for the specified symbol * @param sym a symbol */ - public void add (string name, Symbol! sym) { + public void add (string name, Symbol sym) { if (name != null) { if (symbol_table == null) { symbol_table = new HashMap (str_hash, str_equal); @@ -80,7 +80,7 @@ public class Vala.Scope : Object { * @param name name of the symbol to be returned * @return found symbol or null */ - public Symbol lookup (string! name) { + public Symbol lookup (string name) { if (symbol_table == null) { return null; } diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala index 4619b53..c863553 100644 --- a/vala/valasemanticanalyzer.vala +++ b/vala/valasemanticanalyzer.vala @@ -65,7 +65,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { public SemanticAnalyzer () { } - public void add_binding_provider (BindingProvider! binding_provider) { + public void add_binding_provider (BindingProvider binding_provider) { binding_providers.add (binding_provider); } @@ -74,7 +74,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { * * @param context a code context */ - public void analyze (CodeContext! context) { + public void analyze (CodeContext context) { this.context = context; root_symbol = context.root; @@ -116,7 +116,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { context.accept (this); } - public override void visit_source_file (SourceFile! file) { + public override void visit_source_file (SourceFile file) { current_source_file = file; current_using_directives = file.get_using_directives (); @@ -127,7 +127,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { current_using_directives = null; } - public override void visit_class (Class! cl) { + public override void visit_class (Class cl) { current_symbol = cl; current_class = cl; @@ -215,7 +215,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { current_class = null; } - private void get_all_prerequisites (Interface! iface, Collection list) { + private void get_all_prerequisites (Interface iface, Collection list) { foreach (DataType prereq in iface.get_prerequisites ()) { Typesymbol type = prereq.data_type; /* skip on previous errors */ @@ -231,7 +231,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - private bool class_is_a (Class! cl, Typesymbol! t) { + private bool class_is_a (Class cl, Typesymbol t) { if (cl == t) { return true; } @@ -249,7 +249,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { return false; } - public override void visit_struct (Struct! st) { + public override void visit_struct (Struct st) { current_symbol = st; current_struct = st; @@ -259,7 +259,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { current_struct = null; } - public override void visit_interface (Interface! iface) { + public override void visit_interface (Interface iface) { current_symbol = iface; foreach (DataType prerequisite_reference in iface.get_prerequisites ()) { @@ -292,19 +292,19 @@ public class Vala.SemanticAnalyzer : CodeVisitor { current_symbol = current_symbol.parent_symbol; } - public override void visit_enum (Enum! en) { + public override void visit_enum (Enum en) { en.accept_children (this); } - public override void visit_enum_value (EnumValue! ev) { + public override void visit_enum_value (EnumValue ev) { ev.accept_children (this); } - public override void visit_delegate (Delegate! d) { + public override void visit_delegate (Delegate d) { d.accept_children (this); } - public override void visit_constant (Constant! c) { + public override void visit_constant (Constant c) { c.type_reference.accept (this); if (!current_source_file.pkg) { @@ -319,7 +319,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_field (Field! f) { + public override void visit_field (Field f) { f.accept_children (this); if (f.instance && f.parent_symbol is Interface) { @@ -341,7 +341,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_method (Method! m) { + public override void visit_method (Method m) { if (m.is_abstract) { if (m.parent_symbol is Class) { var cl = (Class) m.parent_symbol; @@ -453,7 +453,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - private void find_base_class_method (Method! m, Class! cl) { + private void find_base_class_method (Method m, Class cl) { var sym = cl.scope.lookup (m.name); if (sym is Method) { var base_method = (Method) sym; @@ -474,7 +474,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - private void find_base_interface_method (Method! m, Class! cl) { + private void find_base_interface_method (Method m, Class cl) { // FIXME report error if multiple possible base methods are found foreach (DataType type in cl.get_base_types ()) { if (type.data_type is Interface) { @@ -496,7 +496,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_creation_method (CreationMethod! m) { + public override void visit_creation_method (CreationMethod m) { if (m.type_name != null && m.type_name != current_symbol.name) { // type_name is null for constructors generated by GIdlParser Report.error (m.source_reference, "missing return type in method `%s.%s´".printf (current_symbol.get_full_name (), m.type_name)); @@ -524,7 +524,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_formal_parameter (FormalParameter! p) { + public override void visit_formal_parameter (FormalParameter p) { p.accept_children (this); if (!p.ellipsis) { @@ -571,7 +571,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { return true; } - private void find_base_class_property (Property! prop, Class! cl) { + private void find_base_class_property (Property prop, Class cl) { var sym = cl.scope.lookup (prop.name); if (sym is Property) { var base_property = (Property) sym; @@ -592,7 +592,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - private void find_base_interface_property (Property! prop, Class! cl) { + private void find_base_interface_property (Property prop, Class cl) { // FIXME report error if multiple possible base properties are found foreach (DataType type in cl.get_base_types ()) { if (type.data_type is Interface) { @@ -614,7 +614,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_property (Property! prop) { + public override void visit_property (Property prop) { current_symbol = prop; if (!prop.instance) { @@ -680,7 +680,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_property_accessor (PropertyAccessor! acc) { + public override void visit_property_accessor (PropertyAccessor acc) { acc.prop = (Property) current_symbol; if (acc.readable) { @@ -721,11 +721,11 @@ public class Vala.SemanticAnalyzer : CodeVisitor { current_return_type = null; } - public override void visit_signal (Signal! sig) { + public override void visit_signal (Signal sig) { sig.accept_children (this); } - public override void visit_constructor (Constructor! c) { + public override void visit_constructor (Constructor c) { c.this_parameter = new FormalParameter ("this", new ClassType (current_class)); c.scope.add (c.this_parameter.name, c.this_parameter); @@ -737,7 +737,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { current_symbol = current_symbol.parent_symbol; } - public override void visit_destructor (Destructor! d) { + public override void visit_destructor (Destructor d) { d.owner = current_symbol.scope; current_symbol = d; @@ -746,10 +746,10 @@ public class Vala.SemanticAnalyzer : CodeVisitor { current_symbol = current_symbol.parent_symbol; } - public override void visit_named_argument (NamedArgument! n) { + public override void visit_named_argument (NamedArgument n) { } - public override void visit_block (Block! b) { + public override void visit_block (Block b) { b.owner = current_symbol.scope; current_symbol = b; @@ -762,7 +762,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { current_symbol = current_symbol.parent_symbol; } - public override void visit_variable_declarator (VariableDeclarator! decl) { + public override void visit_variable_declarator (VariableDeclarator decl) { if (decl.initializer != null) { decl.initializer.expected_type = decl.type_reference; } @@ -849,7 +849,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { * * @param list an initializer list */ - public override void visit_initializer_list (InitializerList! list) { + public override void visit_initializer_list (InitializerList list) { if (list.expected_type is ArrayType) { /* initializer is used as array initializer */ var array_type = (ArrayType) list.expected_type; @@ -918,7 +918,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_expression_statement (ExpressionStatement! stmt) { + public override void visit_expression_statement (ExpressionStatement stmt) { if (stmt.expression.error) { // ignore inner error stmt.error = true; @@ -928,7 +928,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { stmt.tree_can_fail = stmt.expression.tree_can_fail; } - public override void visit_if_statement (IfStatement! stmt) { + public override void visit_if_statement (IfStatement stmt) { stmt.accept_children (this); if (stmt.condition.error) { @@ -944,7 +944,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_switch_section (SwitchSection! section) { + public override void visit_switch_section (SwitchSection section) { foreach (SwitchLabel label in section.get_labels ()) { label.accept (this); } @@ -963,7 +963,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { current_symbol = current_symbol.parent_symbol; } - public override void visit_while_statement (WhileStatement! stmt) { + public override void visit_while_statement (WhileStatement stmt) { stmt.accept_children (this); if (stmt.condition.error) { @@ -979,7 +979,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_do_statement (DoStatement! stmt) { + public override void visit_do_statement (DoStatement stmt) { stmt.accept_children (this); if (stmt.condition.error) { @@ -995,7 +995,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_for_statement (ForStatement! stmt) { + public override void visit_for_statement (ForStatement stmt) { stmt.accept_children (this); if (stmt.condition != null && stmt.condition.error) { @@ -1011,7 +1011,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_foreach_statement (ForeachStatement! stmt) { + public override void visit_foreach_statement (ForeachStatement stmt) { current_source_file.add_type_dependency (stmt.type_reference, SourceFileDependencyType.SOURCE); stmt.variable_declarator = new VariableDeclarator (stmt.variable_name); @@ -1101,7 +1101,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { stmt.tree_can_fail = stmt.collection.tree_can_fail || stmt.body.tree_can_fail; } - public override void visit_return_statement (ReturnStatement! stmt) { + public override void visit_return_statement (ReturnStatement stmt) { stmt.accept_children (this); if (stmt.return_expression != null && stmt.return_expression.error) { @@ -1153,15 +1153,15 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_throw_statement (ThrowStatement! stmt) { + public override void visit_throw_statement (ThrowStatement stmt) { stmt.accept_children (this); } - public override void visit_try_statement (TryStatement! stmt) { + public override void visit_try_statement (TryStatement stmt) { stmt.accept_children (this); } - public override void visit_catch_clause (CatchClause! clause) { + public override void visit_catch_clause (CatchClause clause) { if (clause.type_reference != null) { current_source_file.add_type_dependency (clause.type_reference, SourceFileDependencyType.SOURCE); @@ -1176,7 +1176,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { clause.accept_children (this); } - public override void visit_lock_statement (LockStatement! stmt) { + public override void visit_lock_statement (LockStatement stmt) { /* resource must be a member access and denote a Lockable */ if (!(stmt.resource is MemberAccess && stmt.resource.symbol_reference is Lockable)) { stmt.error = true; @@ -1209,7 +1209,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - private int create_sizes_from_initializer_list (InitializerList! il, int rank, Gee.List! sl) { + private int create_sizes_from_initializer_list (InitializerList il, int rank, Gee.List sl) { var init = new IntegerLiteral (il.size.to_string (), il.source_reference); init.accept (this); sl.add (init); @@ -1251,7 +1251,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { * * @param expr an array creation expression */ - public override void visit_array_creation_expression (ArrayCreationExpression! expr) { + public override void visit_array_creation_expression (ArrayCreationExpression expr) { Collection size = expr.get_sizes (); var initlist = expr.initializer_list; @@ -1329,33 +1329,33 @@ public class Vala.SemanticAnalyzer : CodeVisitor { expr.static_type.add_type_argument (expr.element_type); } - public override void visit_boolean_literal (BooleanLiteral! expr) { + public override void visit_boolean_literal (BooleanLiteral expr) { expr.static_type = bool_type; } - public override void visit_character_literal (CharacterLiteral! expr) { + public override void visit_character_literal (CharacterLiteral expr) { expr.static_type = new ValueType ((Typesymbol) root_symbol.scope.lookup ("char")); } - public override void visit_integer_literal (IntegerLiteral! expr) { + public override void visit_integer_literal (IntegerLiteral expr) { var int_type = new IntegerType ((Typesymbol) root_symbol.scope.lookup (expr.get_type_name ())); int_type.literal = expr; expr.static_type = int_type; } - public override void visit_real_literal (RealLiteral! expr) { + public override void visit_real_literal (RealLiteral expr) { expr.static_type = new ValueType ((Typesymbol) root_symbol.scope.lookup (expr.get_type_name ())); } - public override void visit_string_literal (StringLiteral! expr) { + public override void visit_string_literal (StringLiteral expr) { expr.static_type = string_type.copy (); } - public override void visit_null_literal (NullLiteral! expr) { + public override void visit_null_literal (NullLiteral expr) { expr.static_type = new NullType (expr.source_reference); } - private DataType get_static_type_for_symbol (Symbol! sym) { + private DataType get_static_type_for_symbol (Symbol sym) { if (sym is Field) { var f = (Field) sym; return f.type_reference; @@ -1387,7 +1387,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { return null; } - public static Symbol symbol_lookup_inherited (Symbol! sym, string! name) { + public static Symbol symbol_lookup_inherited (Symbol sym, string name) { var result = sym.scope.lookup (name); if (result != null) { return result; @@ -1442,7 +1442,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { return null; } - public override void visit_parenthesized_expression (ParenthesizedExpression! expr) { + public override void visit_parenthesized_expression (ParenthesizedExpression expr) { expr.inner.expected_type = expr.expected_type; expr.accept_children (this); @@ -1465,7 +1465,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { expr.static_type.floating_reference = false; } - public override void visit_member_access (MemberAccess! expr) { + public override void visit_member_access (MemberAccess expr) { Symbol base_symbol = null; bool may_access_instance_members = false; @@ -1660,7 +1660,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { current_source_file.add_symbol_dependency (expr.symbol_reference, SourceFileDependencyType.SOURCE); } - public override void visit_invocation_expression (InvocationExpression! expr) { + public override void visit_invocation_expression (InvocationExpression expr) { expr.call.accept (this); if (expr.call.error) { @@ -1757,7 +1757,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { check_arguments (expr, mtype, params, expr.get_argument_list ()); } - private bool check_arguments (Expression! expr, DataType! mtype, Collection params, Collection args) { + private bool check_arguments (Expression expr, DataType mtype, Collection params, Collection args) { Expression prev_arg = null; Iterator arg_it = args.iterator (); @@ -2016,7 +2016,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { return actual_type; } - public override void visit_element_access (ElementAccess! expr) { + public override void visit_element_access (ElementAccess expr) { if (expr.container.static_type == null) { /* don't proceed if a child expression failed */ expr.error = true; @@ -2110,7 +2110,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_base_access (BaseAccess! expr) { + public override void visit_base_access (BaseAccess expr) { if (current_class == null) { if (current_struct == null) { expr.error = true; @@ -2131,11 +2131,11 @@ public class Vala.SemanticAnalyzer : CodeVisitor { expr.symbol_reference = expr.static_type.data_type; } - public override void visit_postfix_expression (PostfixExpression! expr) { + public override void visit_postfix_expression (PostfixExpression expr) { expr.static_type = expr.inner.static_type; } - public override void visit_object_creation_expression (ObjectCreationExpression! expr) { + public override void visit_object_creation_expression (ObjectCreationExpression expr) { if (expr.member_name != null) { expr.member_name.accept (this); } @@ -2323,15 +2323,15 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_sizeof_expression (SizeofExpression! expr) { + public override void visit_sizeof_expression (SizeofExpression expr) { expr.static_type = ulong_type; } - public override void visit_typeof_expression (TypeofExpression! expr) { + public override void visit_typeof_expression (TypeofExpression expr) { expr.static_type = type_type; } - private bool is_numeric_type (DataType! type) { + private bool is_numeric_type (DataType type) { if (!(type.data_type is Struct)) { return false; } @@ -2340,7 +2340,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { return st.is_integer_type () || st.is_floating_type (); } - private bool is_integer_type (DataType! type) { + private bool is_integer_type (DataType type) { if (!(type.data_type is Struct)) { return false; } @@ -2349,7 +2349,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { return st.is_integer_type (); } - public override void visit_unary_expression (UnaryExpression! expr) { + public override void visit_unary_expression (UnaryExpression expr) { if (expr.inner.error) { /* if there was an error in the inner expression, skip type check */ expr.error = true; @@ -2423,7 +2423,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - private MemberAccess find_member_access (Expression! expr) { + private MemberAccess find_member_access (Expression expr) { if (expr is ParenthesizedExpression) { var pe = (ParenthesizedExpression) expr; return find_member_access (pe.inner); @@ -2436,7 +2436,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { return null; } - public override void visit_cast_expression (CastExpression! expr) { + public override void visit_cast_expression (CastExpression expr) { if (expr.inner.error) { expr.error = true; return; @@ -2450,7 +2450,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { expr.static_type.transfers_ownership = expr.inner.static_type.transfers_ownership; } - public override void visit_pointer_indirection (PointerIndirection! expr) { + public override void visit_pointer_indirection (PointerIndirection expr) { if (expr.inner.error) { return; } @@ -2469,7 +2469,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_addressof_expression (AddressofExpression! expr) { + public override void visit_addressof_expression (AddressofExpression expr) { if (expr.inner.error) { return; } @@ -2489,7 +2489,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_reference_transfer_expression (ReferenceTransferExpression! expr) { + public override void visit_reference_transfer_expression (ReferenceTransferExpression expr) { if (expr.inner.error) { /* if there was an error in the inner expression, skip type check */ expr.error = true; @@ -2514,7 +2514,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { expr.static_type.takes_ownership = false; } - private DataType get_arithmetic_result_type (DataType! left_type, DataType! right_type) { + private DataType get_arithmetic_result_type (DataType left_type, DataType right_type) { if (!(left_type.data_type is Struct) || !(right_type.data_type is Struct)) { // at least one operand not struct return null; @@ -2546,7 +2546,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_binary_expression (BinaryExpression! expr) { + public override void visit_binary_expression (BinaryExpression expr) { if (expr.left.error || expr.right.error) { /* if there were any errors in inner expressions, skip type check */ expr.error = true; @@ -2685,7 +2685,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { } } - public override void visit_type_check (TypeCheck! expr) { + public override void visit_type_check (TypeCheck expr) { if (expr.type_reference.data_type == null) { /* if type resolving didn't succeed, skip this check */ expr.error = true; @@ -2697,7 +2697,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { expr.static_type = bool_type; } - public override void visit_conditional_expression (ConditionalExpression! expr) { + public override void visit_conditional_expression (ConditionalExpression expr) { if (!expr.condition.static_type.compatible (bool_type)) { expr.error = true; Report.error (expr.condition.source_reference, "Condition must be boolean"); @@ -2746,7 +2746,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { return false; } - public override void visit_lambda_expression (LambdaExpression! l) { + public override void visit_lambda_expression (LambdaExpression l) { if (!(l.expected_type is DelegateType)) { l.error = true; Report.error (l.source_reference, "lambda expression not allowed in this context"); @@ -2810,7 +2810,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { l.accept_children (this); } - public override void visit_assignment (Assignment! a) { + public override void visit_assignment (Assignment a) { a.left.lvalue = true; a.left.accept (this); diff --git a/vala/valasignal.vala b/vala/valasignal.vala index 40bae6a..2ca9c73 100644 --- a/vala/valasignal.vala +++ b/vala/valasignal.vala @@ -30,7 +30,7 @@ public class Vala.Signal : Member, Lockable { /** * The return type of handlers of this signal. */ - public DataType! return_type { + public DataType return_type { get { return _return_type; } set { _return_type = value; @@ -60,7 +60,7 @@ public class Vala.Signal : Member, Lockable { * @param source reference to source code * @return newly created signal */ - public Signal (construct string! name, construct DataType! return_type, construct SourceReference source_reference = null) { + public Signal (construct string name, construct DataType return_type, construct SourceReference source_reference = null) { } /** @@ -68,7 +68,7 @@ public class Vala.Signal : Member, Lockable { * * @param param a formal parameter */ - public void add_parameter (FormalParameter! param) { + public void add_parameter (FormalParameter param) { // default C parameter position param.cparameter_position = parameters.size + 1; param.carray_length_parameter_position = param.cparameter_position + 0.1; @@ -87,7 +87,7 @@ public class Vala.Signal : Member, Lockable { * * @return delegate */ - public Delegate! get_delegate () { + public Delegate get_delegate () { if (generated_delegate == null) { generated_delegate = new Delegate (null, return_type); generated_delegate.instance = true; @@ -101,7 +101,7 @@ public class Vala.Signal : Member, Lockable { var sender_param = new FormalParameter ("sender", sender_type); generated_delegate.add_parameter (sender_param); - foreach (FormalParameter! param in parameters) { + foreach (FormalParameter param in parameters) { generated_delegate.add_parameter (param); } } @@ -114,7 +114,7 @@ public class Vala.Signal : Member, Lockable { * * @return the name to be used in C code */ - public string! get_cname () { + public string get_cname () { if (cname == null) { cname = name; } @@ -130,8 +130,8 @@ public class Vala.Signal : Member, Lockable { * * @return string literal to be used in C code */ - public CCodeConstant! get_canonical_cconstant () { - var str = new String ("\""); + public CCodeConstant get_canonical_cconstant () { + var str = new StringBuilder ("\""); string i = name; @@ -151,13 +151,13 @@ public class Vala.Signal : Member, Lockable { return new CCodeConstant (str.str); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_member (this); visitor.visit_signal (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { return_type.accept (visitor); foreach (FormalParameter param in parameters) { @@ -184,7 +184,7 @@ public class Vala.Signal : Member, Lockable { lock_used = used; } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (return_type == old_type) { return_type = new_type; } diff --git a/vala/valasignaltype.vala b/vala/valasignaltype.vala index 0664c93..e5c0de9 100644 --- a/vala/valasignaltype.vala +++ b/vala/valasignaltype.vala @@ -44,7 +44,7 @@ public class Vala.SignalType : DataType { return signal_symbol.get_parameters (); } - public override DataType! copy () { + public override DataType copy () { return new SignalType (signal_symbol); } } diff --git a/vala/valasizeofexpression.vala b/vala/valasizeofexpression.vala index 63e06c3..3252aec 100644 --- a/vala/valasizeofexpression.vala +++ b/vala/valasizeofexpression.vala @@ -29,7 +29,7 @@ public class Vala.SizeofExpression : Expression { /** * The type whose size to be retrieved. */ - public DataType! type_reference { + public DataType type_reference { get { return _data_type; } set { _data_type = value; @@ -46,12 +46,12 @@ public class Vala.SizeofExpression : Expression { * @param source reference to source code * @return newly created sizeof expression */ - public SizeofExpression (DataType! type, SourceReference source) { + public SizeofExpression (DataType type, SourceReference source) { type_reference = type; source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { type_reference.accept (visitor); visitor.visit_sizeof_expression (this); @@ -61,7 +61,7 @@ public class Vala.SizeofExpression : Expression { return true; } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (type_reference == old_type) { type_reference = new_type; } diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala index ddb7aef..59ae8c8 100644 --- a/vala/valasourcefile.vala +++ b/vala/valasourcefile.vala @@ -30,7 +30,7 @@ public class Vala.SourceFile : Object { /** * The name of this source file. */ - public string! filename { get; set; } + public string filename { get; set; } /** * The header comment of this source file. @@ -96,7 +96,7 @@ public class Vala.SourceFile : Object { * @param pkg true if this is a VAPI package file * @return newly created source file */ - public SourceFile (construct CodeContext! context, construct string! filename, construct bool pkg = false) { + public SourceFile (construct CodeContext context, construct string filename, construct bool pkg = false) { } /** @@ -104,7 +104,7 @@ public class Vala.SourceFile : Object { * * @param ns reference to namespace */ - public void add_using_directive (NamespaceReference! ns) { + public void add_using_directive (NamespaceReference ns) { using_directives.add (ns); } @@ -122,11 +122,11 @@ public class Vala.SourceFile : Object { * * @param node a code node */ - public void add_node (CodeNode! node) { + public void add_node (CodeNode node) { nodes.add (node); } - public void remove_node (CodeNode! node) { + public void remove_node (CodeNode node) { nodes.remove (node); } @@ -139,11 +139,11 @@ public class Vala.SourceFile : Object { return new ReadOnlyCollection (nodes); } - public void accept (CodeVisitor! visitor) { + public void accept (CodeVisitor visitor) { visitor.visit_source_file (this); } - public void accept_children (CodeVisitor! visitor) { + public void accept_children (CodeVisitor visitor) { foreach (NamespaceReference ns_ref in using_directives) { ns_ref.accept (visitor); } @@ -153,7 +153,7 @@ public class Vala.SourceFile : Object { } } - private string! get_subdir () { + private string get_subdir () { if (context.basedir == null) { return ""; } @@ -170,7 +170,7 @@ public class Vala.SourceFile : Object { return ""; } - private string! get_destination_directory () { + private string get_destination_directory () { if (context.directory == null) { return get_subdir (); } @@ -182,7 +182,7 @@ public class Vala.SourceFile : Object { * * @return generated C header filename */ - public string! get_cheader_filename () { + public string get_cheader_filename () { if (cheader_filename == null) { var basename = filename.ndup ((uint) (filename.len () - ".vala".len ())); basename = Path.get_basename (basename); @@ -196,7 +196,7 @@ public class Vala.SourceFile : Object { * * @return generated C source filename */ - public string! get_csource_filename () { + public string get_csource_filename () { if (csource_filename == null) { var basename = filename.ndup ((uint) (filename.len () - ".vala".len ())); basename = Path.get_basename (basename); @@ -211,7 +211,7 @@ public class Vala.SourceFile : Object { * * @return C header filename to include */ - public string! get_cinclude_filename () { + public string get_cinclude_filename () { if (cinclude_filename == null) { var basename = filename.ndup ((uint) (filename.len () - ".vala".len ())); basename = Path.get_basename (basename); @@ -227,7 +227,7 @@ public class Vala.SourceFile : Object { * @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; } @@ -289,7 +289,7 @@ public class Vala.SourceFile : Object { * @param type a data type * @param dep_type type of dependency */ - public void add_type_dependency (DataType! type, SourceFileDependencyType dep_type) { + public void add_type_dependency (DataType type, SourceFileDependencyType dep_type) { foreach (Symbol type_symbol in type.get_symbols ()) { add_symbol_dependency (type_symbol, dep_type); } @@ -311,7 +311,7 @@ public class Vala.SourceFile : Object { * * @param include internal include for C header file */ - public void add_header_internal_include (string! include) { + public void add_header_internal_include (string include) { /* skip includes to self */ if (include != get_cinclude_filename ()) { header_internal_includes.add (include); diff --git a/vala/valasourcereference.vala b/vala/valasourcereference.vala index 8daa11f..17d5a8e 100644 --- a/vala/valasourcereference.vala +++ b/vala/valasourcereference.vala @@ -99,7 +99,7 @@ public class Vala.SourceReference : Object { * * @return human-readable string */ - public string! to_string () { + public string to_string () { return ("%s:%d.%d-%d.%d".printf (file.filename, first_line, first_column, last_line, last_column)); } } diff --git a/vala/valastringliteral.vala b/vala/valastringliteral.vala index 494053a..f3fe9ea 100644 --- a/vala/valastringliteral.vala +++ b/vala/valastringliteral.vala @@ -59,7 +59,7 @@ public class Vala.StringLiteral : Literal { return noquotes.compress (); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_string_literal (this); } diff --git a/vala/valastruct.vala b/vala/valastruct.vala index c5643a7..eeb873c 100644 --- a/vala/valastruct.vala +++ b/vala/valastruct.vala @@ -62,7 +62,7 @@ public class Vala.Struct : Typesymbol { * @param source_reference reference to source code * @return newly created struct */ - public Struct (construct string! name, construct SourceReference source_reference = null) { + public Struct (construct string name, construct SourceReference source_reference = null) { } /** @@ -70,7 +70,7 @@ public class Vala.Struct : Typesymbol { * * @param p a type parameter */ - public void add_type_parameter (TypeParameter! p) { + public void add_type_parameter (TypeParameter p) { type_parameters.add (p); p.type = this; scope.add (p.name, p); @@ -81,7 +81,7 @@ public class Vala.Struct : Typesymbol { * * @param c a constant */ - public void add_constant (Constant! c) { + public void add_constant (Constant c) { constants.add (c); scope.add (c.name, c); } @@ -91,7 +91,7 @@ public class Vala.Struct : Typesymbol { * * @param f a field */ - public void add_field (Field! f) { + public void add_field (Field f) { fields.add (f); scope.add (f.name, f); } @@ -110,7 +110,7 @@ public class Vala.Struct : Typesymbol { * * @param m a method */ - public void add_method (Method! m) { + public void add_method (Method m) { return_if_fail (m != null); if (m.instance) { @@ -152,11 +152,11 @@ public class Vala.Struct : Typesymbol { return new ReadOnlyCollection (methods); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_struct (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { foreach (DataType type in base_types) { type.accept (visitor); } @@ -189,15 +189,15 @@ public class Vala.Struct : Typesymbol { return cname; } - private void set_cname (string! cname) { + private void set_cname (string cname) { this.cname = cname; } - private void set_const_cname (string! cname) { + private void set_const_cname (string cname) { this.const_cname = cname; } - public override string! get_lower_case_cprefix () { + public override string get_lower_case_cprefix () { if (lower_case_cprefix == null) { lower_case_cprefix = "%s_".printf (get_lower_case_cname (null)); } @@ -249,7 +249,7 @@ public class Vala.Struct : Typesymbol { return rank; } - private void process_ccode_attribute (Attribute! a) { + private void process_ccode_attribute (Attribute a) { if (a.has_argument ("cname")) { set_cname (a.get_string ("cname")); } @@ -282,14 +282,14 @@ public class Vala.Struct : Typesymbol { } } - private void process_integer_type_attribute (Attribute! a) { + private void process_integer_type_attribute (Attribute a) { integer_type = true; if (a.has_argument ("rank")) { rank = a.get_integer ("rank"); } } - private void process_floating_type_attribute (Attribute! a) { + private void process_floating_type_attribute (Attribute a) { floating_type = true; if (a.has_argument ("rank")) { rank = a.get_integer ("rank"); @@ -324,7 +324,7 @@ public class Vala.Struct : Typesymbol { return type_id; } - public void set_type_id (string! name) { + public void set_type_id (string name) { this.type_id = name; } @@ -339,7 +339,7 @@ public class Vala.Struct : Typesymbol { return marshaller_type_name; } - private void set_marshaller_type_name (string! name) { + private void set_marshaller_type_name (string name) { this.marshaller_type_name = name; } @@ -369,11 +369,11 @@ public class Vala.Struct : Typesymbol { } } - private void set_get_value_function (string! function) { + private void set_get_value_function (string function) { get_value_function = function; } - private void set_set_value_function (string! function) { + private void set_set_value_function (string function) { set_value_function = function; } @@ -392,7 +392,7 @@ public class Vala.Struct : Typesymbol { return null; } - private void set_default_value (string! value) { + private void set_default_value (string value) { default_value = value; } @@ -401,7 +401,7 @@ public class Vala.Struct : Typesymbol { * * @param type a class or interface reference */ - public void add_base_type (DataType! type) { + public void add_base_type (DataType type) { base_types.add (type); type.parent_node = this; } @@ -415,7 +415,7 @@ public class Vala.Struct : Typesymbol { return new ReadOnlyCollection (base_types); } - public override int get_type_parameter_index (string! name) { + public override int get_type_parameter_index (string name) { int i = 0; foreach (TypeParameter p in type_parameters) { @@ -450,7 +450,7 @@ public class Vala.Struct : Typesymbol { this.simple_type = simple_type; } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { for (int i = 0; i < base_types.size; i++) { if (base_types[i] == old_type) { base_types[i] = new_type; diff --git a/vala/valaswitchlabel.vala b/vala/valaswitchlabel.vala index 81bcc4d..e8fc654 100644 --- a/vala/valaswitchlabel.vala +++ b/vala/valaswitchlabel.vala @@ -53,7 +53,7 @@ public class Vala.SwitchLabel : CodeNode { source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { if (expression != null) { expression.accept (visitor); diff --git a/vala/valaswitchsection.vala b/vala/valaswitchsection.vala index 08f1314..42c0afb 100644 --- a/vala/valaswitchsection.vala +++ b/vala/valaswitchsection.vala @@ -44,7 +44,7 @@ public class Vala.SwitchSection : Block { * * @param label a switch label */ - public void add_label (SwitchLabel! label) { + public void add_label (SwitchLabel label) { labels.add (label); } @@ -72,7 +72,7 @@ public class Vala.SwitchSection : Block { * * @param stmt a statement */ - public void add_statement (Statement! stmt) { + public void add_statement (Statement stmt) { statement_list.add (stmt); } @@ -85,11 +85,11 @@ public class Vala.SwitchSection : Block { return new ReadOnlyCollection (statement_list); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_switch_section (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { foreach (SwitchLabel label in labels) { label.accept (visitor); } diff --git a/vala/valaswitchstatement.vala b/vala/valaswitchstatement.vala index 201567f..486f16e 100644 --- a/vala/valaswitchstatement.vala +++ b/vala/valaswitchstatement.vala @@ -30,7 +30,7 @@ public class Vala.SwitchStatement : CodeNode, Statement { /** * Specifies the switch expression. */ - public Expression! expression { + public Expression expression { get { return _expression; } @@ -40,7 +40,7 @@ public class Vala.SwitchStatement : CodeNode, Statement { } } - private Expression! _expression; + private Expression _expression; private Gee.List sections = new ArrayList (); /** @@ -50,7 +50,7 @@ public class Vala.SwitchStatement : CodeNode, Statement { * @param source_reference reference to source code * @return newly created switch statement */ - public SwitchStatement (construct Expression! expression, construct SourceReference source_reference) { + public SwitchStatement (construct Expression expression, construct SourceReference source_reference) { } /** @@ -58,7 +58,7 @@ public class Vala.SwitchStatement : CodeNode, Statement { * * @param section a switch section */ - public void add_section (SwitchSection! section) { + public void add_section (SwitchSection section) { section.parent_node = this; sections.add (section); } @@ -72,7 +72,7 @@ public class Vala.SwitchStatement : CodeNode, Statement { return new ReadOnlyCollection (sections); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { expression.accept (visitor); visitor.visit_end_full_expression (expression); @@ -84,7 +84,7 @@ public class Vala.SwitchStatement : CodeNode, Statement { visitor.visit_switch_statement (this); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (expression == old_node) { expression = new_node; } diff --git a/vala/valasymbol.vala b/vala/valasymbol.vala index a63b96d..743b373 100644 --- a/vala/valasymbol.vala +++ b/vala/valasymbol.vala @@ -137,7 +137,7 @@ public abstract class Vala.Symbol : CodeNode { * * @return the camel case prefix to be used in C code */ - public virtual string! get_cprefix () { + public virtual string get_cprefix () { if (name == null) { return ""; } else { @@ -164,7 +164,7 @@ public abstract class Vala.Symbol : CodeNode { * * @return the lower case prefix to be used in C code */ - public virtual string! get_lower_case_cprefix () { + public virtual string get_lower_case_cprefix () { return ""; } @@ -184,8 +184,8 @@ public abstract class Vala.Symbol : CodeNode { * @param camel_case a string in camel case * @return the specified string converted to lower case */ - public static string! camel_case_to_lower_case (string! camel_case) { - String result = new String (""); + public static string camel_case_to_lower_case (string camel_case) { + var result = new StringBuilder (""); weak string i = camel_case; diff --git a/vala/valasymbolresolver.vala b/vala/valasymbolresolver.vala index ea02f66..6749dc0 100644 --- a/vala/valasymbolresolver.vala +++ b/vala/valasymbolresolver.vala @@ -37,14 +37,14 @@ public class Vala.SymbolResolver : CodeVisitor { * * @param context a code context */ - public void resolve (CodeContext! context) { + public void resolve (CodeContext context) { root_symbol = context.root; current_scope = root_symbol.scope; context.accept (this); } - public override void visit_source_file (SourceFile! file) { + public override void visit_source_file (SourceFile file) { current_using_directives = file.get_using_directives (); current_scope = root_symbol.scope; @@ -53,7 +53,7 @@ public class Vala.SymbolResolver : CodeVisitor { current_using_directives = null; } - public override void visit_class (Class! cl) { + public override void visit_class (Class cl) { current_scope = cl.scope; cl.accept_children (this); @@ -77,7 +77,7 @@ public class Vala.SymbolResolver : CodeVisitor { current_scope = current_scope.parent_scope; } - public override void visit_struct (Struct! st) { + public override void visit_struct (Struct st) { current_scope = st.scope; st.accept_children (this); @@ -85,7 +85,7 @@ public class Vala.SymbolResolver : CodeVisitor { current_scope = current_scope.parent_scope; } - public override void visit_interface (Interface! iface) { + public override void visit_interface (Interface iface) { current_scope = iface.scope; iface.accept_children (this); @@ -101,7 +101,7 @@ public class Vala.SymbolResolver : CodeVisitor { current_scope = current_scope.parent_scope; } - public override void visit_enum (Enum! en) { + public override void visit_enum (Enum en) { current_scope = en.scope; en.accept_children (this); @@ -109,7 +109,7 @@ public class Vala.SymbolResolver : CodeVisitor { current_scope = current_scope.parent_scope; } - public override void visit_delegate (Delegate! cb) { + public override void visit_delegate (Delegate cb) { current_scope = cb.scope; cb.accept_children (this); @@ -117,13 +117,13 @@ public class Vala.SymbolResolver : CodeVisitor { current_scope = current_scope.parent_scope; } - public override void visit_constant (Constant! c) { + public override void visit_constant (Constant c) { current_scope = c.scope; c.accept_children (this); } - public override void visit_field (Field! f) { + public override void visit_field (Field f) { current_scope = f.scope; f.accept_children (this); @@ -131,7 +131,7 @@ public class Vala.SymbolResolver : CodeVisitor { current_scope = current_scope.parent_scope; } - public override void visit_method (Method! m) { + public override void visit_method (Method m) { current_scope = m.scope; m.accept_children (this); @@ -139,39 +139,39 @@ public class Vala.SymbolResolver : CodeVisitor { current_scope = current_scope.parent_scope; } - public override void visit_creation_method (CreationMethod! m) { + public override void visit_creation_method (CreationMethod m) { m.accept_children (this); } - public override void visit_formal_parameter (FormalParameter! p) { + public override void visit_formal_parameter (FormalParameter p) { p.accept_children (this); } - public override void visit_property (Property! prop) { + public override void visit_property (Property prop) { prop.accept_children (this); } - public override void visit_property_accessor (PropertyAccessor! acc) { + public override void visit_property_accessor (PropertyAccessor acc) { acc.accept_children (this); } - public override void visit_signal (Signal! sig) { + public override void visit_signal (Signal sig) { sig.accept_children (this); } - public override void visit_constructor (Constructor! c) { + public override void visit_constructor (Constructor c) { c.accept_children (this); } - public override void visit_destructor (Destructor! d) { + public override void visit_destructor (Destructor d) { d.accept_children (this); } - public override void visit_block (Block! b) { + public override void visit_block (Block b) { b.accept_children (this); } - public override void visit_namespace_reference (NamespaceReference! ns) { + public override void visit_namespace_reference (NamespaceReference ns) { ns.namespace_symbol = current_scope.lookup (ns.name); if (ns.namespace_symbol == null) { ns.error = true; @@ -218,7 +218,7 @@ public class Vala.SymbolResolver : CodeVisitor { } } - private DataType! resolve_type (UnresolvedType! unresolved_type) { + private DataType resolve_type (UnresolvedType unresolved_type) { DataType type = null; // still required for vapigen @@ -320,7 +320,7 @@ public class Vala.SymbolResolver : CodeVisitor { return type; } - public override void visit_data_type (DataType! data_type) { + public override void visit_data_type (DataType data_type) { if (!(data_type is UnresolvedType)) { return; } @@ -330,75 +330,75 @@ public class Vala.SymbolResolver : CodeVisitor { unresolved_type.parent_node.replace_type (unresolved_type, resolve_type (unresolved_type)); } - public override void visit_variable_declarator (VariableDeclarator! decl) { + public override void visit_variable_declarator (VariableDeclarator decl) { decl.accept_children (this); } - public override void visit_initializer_list (InitializerList! list) { + public override void visit_initializer_list (InitializerList list) { list.accept_children (this); } - public override void visit_if_statement (IfStatement! stmt) { + public override void visit_if_statement (IfStatement stmt) { stmt.accept_children (this); } - public override void visit_switch_section (SwitchSection! section) { + public override void visit_switch_section (SwitchSection section) { section.accept_children (this); } - public override void visit_while_statement (WhileStatement! stmt) { + public override void visit_while_statement (WhileStatement stmt) { stmt.accept_children (this); } - public override void visit_do_statement (DoStatement! stmt) { + public override void visit_do_statement (DoStatement stmt) { stmt.accept_children (this); } - public override void visit_for_statement (ForStatement! stmt) { + public override void visit_for_statement (ForStatement stmt) { stmt.accept_children (this); } - public override void visit_foreach_statement (ForeachStatement! stmt) { + public override void visit_foreach_statement (ForeachStatement stmt) { stmt.accept_children (this); } - public override void visit_return_statement (ReturnStatement! stmt) { + public override void visit_return_statement (ReturnStatement stmt) { stmt.accept_children (this); } - public override void visit_throw_statement (ThrowStatement! stmt) { + public override void visit_throw_statement (ThrowStatement stmt) { stmt.accept_children (this); } - public override void visit_try_statement (TryStatement! stmt) { + public override void visit_try_statement (TryStatement stmt) { stmt.accept_children (this); } - public override void visit_catch_clause (CatchClause! clause) { + public override void visit_catch_clause (CatchClause clause) { clause.accept_children (this); } - public override void visit_array_creation_expression (ArrayCreationExpression! e) { + public override void visit_array_creation_expression (ArrayCreationExpression e) { e.accept_children (this); } - public override void visit_parenthesized_expression (ParenthesizedExpression! expr) { + public override void visit_parenthesized_expression (ParenthesizedExpression expr) { expr.accept_children (this); } - public override void visit_invocation_expression (InvocationExpression! expr) { + public override void visit_invocation_expression (InvocationExpression expr) { expr.accept_children (this); } - public override void visit_object_creation_expression (ObjectCreationExpression! expr) { + public override void visit_object_creation_expression (ObjectCreationExpression expr) { expr.accept_children (this); } - public override void visit_lambda_expression (LambdaExpression! l) { + public override void visit_lambda_expression (LambdaExpression l) { l.accept_children (this); } - public override void visit_assignment (Assignment! a) { + public override void visit_assignment (Assignment a) { a.accept_children (this); } } diff --git a/vala/valathrowstatement.vala b/vala/valathrowstatement.vala index 39e9320..a2dc37d 100644 --- a/vala/valathrowstatement.vala +++ b/vala/valathrowstatement.vala @@ -41,7 +41,7 @@ public class Vala.ThrowStatement : CodeNode, Statement { } } - private Expression! _error_expression; + private Expression _error_expression; /** * Creates a new throw statement. @@ -50,20 +50,20 @@ public class Vala.ThrowStatement : CodeNode, Statement { * @param source_reference reference to source code * @return newly created throw statement */ - public ThrowStatement (construct Expression! error_expression, construct SourceReference source_reference = null) { + public ThrowStatement (construct Expression error_expression, construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_throw_statement (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { if (error_expression != null) { error_expression.accept (visitor); } } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (error_expression == old_node) { error_expression = new_node; } diff --git a/vala/valatrystatement.vala b/vala/valatrystatement.vala index 59841d6..f6a7fa3 100644 --- a/vala/valatrystatement.vala +++ b/vala/valatrystatement.vala @@ -30,7 +30,7 @@ public class Vala.TryStatement : CodeNode, Statement { /** * Specifies the body of the try statement. */ - public Block! body { get; set; } + public Block body { get; set; } /** * Specifies the body of the optional finally clause. @@ -47,7 +47,7 @@ public class Vala.TryStatement : CodeNode, Statement { * @param source_reference reference to source code * @return newly created try statement */ - public TryStatement (construct Block! body, construct Block finally_body, construct SourceReference source_reference = null) { + public TryStatement (construct Block body, construct Block finally_body, construct SourceReference source_reference = null) { } /** @@ -55,7 +55,7 @@ public class Vala.TryStatement : CodeNode, Statement { * * @param clause a catch clause */ - public void add_catch_clause (CatchClause! clause) { + public void add_catch_clause (CatchClause clause) { catch_clauses.add (clause); } @@ -68,11 +68,11 @@ public class Vala.TryStatement : CodeNode, Statement { return new ReadOnlyList (catch_clauses); } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_try_statement (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { body.accept (visitor); foreach (CatchClause clause in catch_clauses) { diff --git a/vala/valatypecheck.vala b/vala/valatypecheck.vala index d276f82..b66da04 100644 --- a/vala/valatypecheck.vala +++ b/vala/valatypecheck.vala @@ -29,12 +29,12 @@ public class Vala.TypeCheck : Expression { /** * The expression to be checked. */ - public Expression! expression { get; set construct; } + public Expression expression { get; set construct; } /** * The type to be matched against. */ - public DataType! type_reference { + public DataType type_reference { get { return _data_type; } set { _data_type = value; @@ -52,13 +52,13 @@ public class Vala.TypeCheck : Expression { * @param source reference to source code * @return newly created type check expression */ - public TypeCheck (Expression! expr, DataType! type, SourceReference source) { + public TypeCheck (Expression expr, DataType type, SourceReference source) { expression = expr; type_reference = type; source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { expression.accept (visitor); type_reference.accept (visitor); @@ -70,7 +70,7 @@ public class Vala.TypeCheck : Expression { return expression.is_pure (); } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (type_reference == old_type) { type_reference = new_type; } diff --git a/vala/valatypeofexpression.vala b/vala/valatypeofexpression.vala index 83ee16d..cdefc34 100644 --- a/vala/valatypeofexpression.vala +++ b/vala/valatypeofexpression.vala @@ -29,7 +29,7 @@ public class Vala.TypeofExpression : Expression { /** * The type to be retrieved. */ - public DataType! type_reference { + public DataType type_reference { get { return _data_type; } set { _data_type = value; @@ -46,12 +46,12 @@ public class Vala.TypeofExpression : Expression { * @param source reference to source code * @return newly created typeof expression */ - public TypeofExpression (DataType! type, SourceReference source) { + public TypeofExpression (DataType type, SourceReference source) { type_reference = type; source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { type_reference.accept (visitor); visitor.visit_typeof_expression (this); @@ -61,7 +61,7 @@ public class Vala.TypeofExpression : Expression { return true; } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (type_reference == old_type) { type_reference = new_type; } diff --git a/vala/valatypeparameter.vala b/vala/valatypeparameter.vala index c9d04ab..f6da8b5 100644 --- a/vala/valatypeparameter.vala +++ b/vala/valatypeparameter.vala @@ -42,12 +42,12 @@ public class Vala.TypeParameter : Symbol { * @param source reference to source code * @return newly created generic type parameter */ - public TypeParameter (string! _name, SourceReference source) { + public TypeParameter (string _name, SourceReference source) { name = _name; source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_type_parameter (this); } @@ -58,7 +58,7 @@ public class Vala.TypeParameter : Symbol { * @return true if this type parameter is equal to param2, false * otherwise */ - public bool equals (TypeParameter! param2) { + public bool equals (TypeParameter param2) { // FIXME check whether the corresponding data type of one of the // parameters is a base type of the corresponding data // type of the other parameter and check along the path diff --git a/vala/valatypesymbol.vala b/vala/valatypesymbol.vala index 0b7b24d..71d3019 100644 --- a/vala/valatypesymbol.vala +++ b/vala/valatypesymbol.vala @@ -190,7 +190,7 @@ public abstract class Vala.Typesymbol : Symbol { * * @param filename a C header filename */ - public void add_cheader_filename (string! filename) { + public void add_cheader_filename (string filename) { cheader_filenames.add (filename); } @@ -201,14 +201,14 @@ public abstract class Vala.Typesymbol : Symbol { * @param t a data type * @return true if t is a supertype of this data type, false otherwise */ - public virtual bool is_subtype_of (Typesymbol! t) { + public virtual bool is_subtype_of (Typesymbol t) { return (this == t); } /** * Return the index of the specified type parameter name. */ - public virtual int get_type_parameter_index (string! name) { + public virtual int get_type_parameter_index (string name) { return -1; } } diff --git a/vala/valaunaryexpression.vala b/vala/valaunaryexpression.vala index cc6c964..efa7657 100644 --- a/vala/valaunaryexpression.vala +++ b/vala/valaunaryexpression.vala @@ -36,7 +36,7 @@ public class Vala.UnaryExpression : Expression { /** * The operand. */ - public Expression! inner { + public Expression inner { get { return _inner; } @@ -46,7 +46,7 @@ public class Vala.UnaryExpression : Expression { } } - private Expression! _inner; + private Expression _inner; /** * Creates a new unary expression. @@ -56,25 +56,25 @@ public class Vala.UnaryExpression : Expression { * @param source reference to source code * @return newly created binary expression */ - public UnaryExpression (UnaryOperator op, Expression! _inner, SourceReference source) { + public UnaryExpression (UnaryOperator op, Expression _inner, SourceReference source) { operator = op; inner = _inner; source_reference = source; } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { inner.accept (visitor); visitor.visit_unary_expression (this); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (inner == old_node) { inner = new_node; } } - private string! get_operator_string () { + private string get_operator_string () { switch (_operator) { case UnaryOperator.PLUS: return "+"; case UnaryOperator.MINUS: return "-"; @@ -89,7 +89,7 @@ public class Vala.UnaryExpression : Expression { assert_not_reached (); } - public override string! to_string () { + public override string to_string () { return get_operator_string () + _inner.to_string (); } diff --git a/vala/valaunresolvedtype.vala b/vala/valaunresolvedtype.vala index 5330051..ba97907 100644 --- a/vala/valaunresolvedtype.vala +++ b/vala/valaunresolvedtype.vala @@ -72,7 +72,7 @@ public class Vala.UnresolvedType : DataType { * @param source reference to source code * @return newly created type reference */ - public static UnresolvedType new_from_expression (Expression! expr) { + public static UnresolvedType new_from_expression (Expression expr) { string ns = null; string type_name = null; if (expr is MemberAccess) { @@ -102,7 +102,7 @@ public class Vala.UnresolvedType : DataType { return null; } - public override DataType! copy () { + public override DataType copy () { var result = new UnresolvedType (); result.source_reference = source_reference; result.transfers_ownership = transfers_ownership; diff --git a/vala/valavaluetype.vala b/vala/valavaluetype.vala index 6f73e36..64f5832 100644 --- a/vala/valavaluetype.vala +++ b/vala/valavaluetype.vala @@ -31,7 +31,7 @@ public class Vala.ValueType : DataType { */ public weak Typesymbol type_symbol { get; set; } - public ValueType (construct Typesymbol! type_symbol) { + public ValueType (construct Typesymbol type_symbol) { data_type = type_symbol; } diff --git a/vala/valavariabledeclarator.vala b/vala/valavariabledeclarator.vala index ca6d0c2..b856c22 100644 --- a/vala/valavariabledeclarator.vala +++ b/vala/valavariabledeclarator.vala @@ -45,7 +45,7 @@ public class Vala.VariableDeclarator : Symbol { /** * The variable type. */ - public DataType! type_reference { + public DataType type_reference { get { return _data_type; } set { _data_type = value; @@ -64,14 +64,14 @@ public class Vala.VariableDeclarator : Symbol { * @param source reference to source code * @return newly created variable declarator */ - public VariableDeclarator (construct string! name, construct Expression initializer = null, construct SourceReference source_reference = null) { + public VariableDeclarator (construct string name, construct Expression initializer = null, construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_variable_declarator (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { if (initializer != null) { initializer.accept (visitor); @@ -83,13 +83,13 @@ public class Vala.VariableDeclarator : Symbol { } } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (initializer == old_node) { initializer = new_node; } } - public override void replace_type (DataType! old_type, DataType! new_type) { + public override void replace_type (DataType old_type, DataType new_type) { if (type_reference == old_type) { type_reference = new_type; } diff --git a/vala/valavoidtype.vala b/vala/valavoidtype.vala index 613e993..b759166 100644 --- a/vala/valavoidtype.vala +++ b/vala/valavoidtype.vala @@ -29,11 +29,11 @@ public class Vala.VoidType : DataType { public VoidType () { } - public override bool stricter (DataType! type2) { + public override bool stricter (DataType type2) { return (type2 is VoidType); } - public override string! to_string () { + public override string to_string () { return "void"; } diff --git a/vala/valawhilestatement.vala b/vala/valawhilestatement.vala index 77d16e0..8b23519 100644 --- a/vala/valawhilestatement.vala +++ b/vala/valawhilestatement.vala @@ -29,7 +29,7 @@ public class Vala.WhileStatement : CodeNode, Statement { /** * Specifies the loop condition. */ - public Expression! condition { + public Expression condition { get { return _condition; } @@ -52,7 +52,7 @@ public class Vala.WhileStatement : CodeNode, Statement { } } - private Expression! _condition; + private Expression _condition; private Block _body; /** @@ -63,14 +63,14 @@ public class Vala.WhileStatement : CodeNode, Statement { * @param source reference to source code * @return newly created while statement */ - public WhileStatement (construct Expression! condition, construct Block! body, construct SourceReference source_reference = null) { + public WhileStatement (construct Expression condition, construct Block body, construct SourceReference source_reference = null) { } - public override void accept (CodeVisitor! visitor) { + public override void accept (CodeVisitor visitor) { visitor.visit_while_statement (this); } - public override void accept_children (CodeVisitor! visitor) { + public override void accept_children (CodeVisitor visitor) { condition.accept (visitor); visitor.visit_end_full_expression (condition); @@ -78,7 +78,7 @@ public class Vala.WhileStatement : CodeNode, Statement { body.accept (visitor); } - public override void replace_expression (Expression! old_node, Expression! new_node) { + public override void replace_expression (Expression old_node, Expression new_node) { if (condition == old_node) { condition = new_node; } diff --git a/vapi/cairo.vapi b/vapi/cairo.vapi index 560d520..8e2b1cd 100644 --- a/vapi/cairo.vapi +++ b/vapi/cairo.vapi @@ -116,7 +116,7 @@ namespace Cairo { public void rectangle (double x, double y, double width, double height); public void glyph_path (Glyph[] glyphs); - public void text_path (string! utf8); + public void text_path (string utf8); public void rel_curve_to (double dx1, double dy1, double dx2, double dy2, double dx3, double dy3); public void rel_line_to (double dx, double dy); @@ -133,21 +133,21 @@ namespace Cairo { public void device_to_user (ref double x, ref double y); public void device_to_user_distance (ref double dx, ref double dy); - public void select_font_face (string! family, FontSlant slant, FontWeight weight); + public void select_font_face (string family, FontSlant slant, FontWeight weight); public void set_font_size (double size); public void set_font_matrix (Matrix matrix); public void get_font_matrix (out Matrix matrix); - public void set_font_options (ref FontOptions! options); + public void set_font_options (ref FontOptions options); public void get_font_options (ref FontOptions options); - public void show_text (string! utf8); + public void show_text (string utf8); public void show_glyphs (Glyph[] glyphs); public weak FontFace get_font_face (); public void font_extents (ref FontExtents extents); public void set_font_face (FontFace font_face); - public void set_scaled_font (ScaledFont! font); - public void text_extents (string! utf8, ref TextExtents extents); + public void set_scaled_font (ScaledFont font); + public void text_extents (string utf8, ref TextExtents extents); public void glyph_extents (Glyph[] glyphs, ref TextExtents extents); } @@ -234,7 +234,7 @@ namespace Cairo { [CCode (cname = "cairo_pattern_create_rgba")] public Pattern.rgba (double red, double green, double blue, double alpha); [CCode (cname = "cairo_pattern_create_for_surface")] - public Pattern.for_surface (Surface! surface); + public Pattern.for_surface (Surface surface); [CCode (cname = "cairo_pattern_create_linear")] public Pattern.linear (double x0, double y0, double x1, double y1); [CCode (cname = "cairo_pattern_create_radial")] @@ -317,7 +317,7 @@ namespace Cairo { public ScaledFont (Matrix font_matrix, Matrix ctm, ref FontOptions options); public Status status (); public void extents (ref FontExtents extents); - public void text_extents (string! utf8, ref TextExtents extents); + public void text_extents (string utf8, ref TextExtents extents); public void glyph_extents (Glyph[] glyphs, ref TextExtents extents); public weak FontFace get_font_face (); public void get_font_options (ref FontOptions options); @@ -391,7 +391,7 @@ namespace Cairo { [CCode (ref_function = "cairo_surface_reference", unref_function = "cairo_surface_destroy", cname = "cairo_surface_t", cheader_filename = "cairo.h")] public class Surface { [CCode (cname = "cairo_surface_create_similar")] - public Surface.similar (Surface! other, Content content, int width, int height); + public Surface.similar (Surface other, Content content, int width, int height); public void finish (); public void flush (); public void get_font_options (ref FontOptions options); @@ -404,7 +404,7 @@ namespace Cairo { public Status status (); public SurfaceType get_type (); - public Status write_to_png (string! filename); + public Status write_to_png (string filename); public Status write_to_png_stream (WriteFunc write_func, pointer closure); } @@ -450,7 +450,7 @@ namespace Cairo { public int get_stride (); [CCode (cname = "cairo_image_surface_create_from_png")] - public ImageSurface.from_png (string! filename); + public ImageSurface.from_png (string filename); [CCode (cname = "cairo_image_surface_create_from_png_stream")] public ImageSurface.from_png_stream (ReadFunc read_func, pointer closure); } @@ -458,7 +458,7 @@ namespace Cairo { [CCode (cname = "cairo_surface_t", cheader_filename = "cairo-pdf.h")] public class PdfSurface : Surface { [CCode (cname = "cairo_pdf_surface_create")] - public PdfSurface (string! filename, double width_in_points, double height_in_points); + public PdfSurface (string filename, double width_in_points, double height_in_points); [CCode (cname = "cairo_pdf_surface_create_for_stream")] public PdfSurface.for_stream (WriteFunc write_func, pointer closure, double width_in_points, double height_in_points); public void set_size (double width_in_points, double height_in_points); @@ -470,19 +470,19 @@ namespace Cairo { [CCode (cname = "cairo_surface_t", cheader_filename = "cairo-ps.h")] public class PsSurface : Surface { [CCode (cname = "cairo_ps_surface_create")] - public PsSurface (string! filename, double width_in_points, double height_in_points); + public PsSurface (string filename, double width_in_points, double height_in_points); [CCode (cname = "cairo_ps_surface_create_for_stream")] public PsSurface.for_stream (WriteFunc write_func, pointer closure, double width_in_points, double height_in_points); public void set_size (double width_in_points, double height_in_points); public void dsc_begin_setup (); public void dsc_begin_page_setup (); - public void dsc_comment (string! comment); + public void dsc_comment (string comment); } [CCode (cname = "cairo_surface_t", cheader_filename = "cairo-svg.h")] public class SvgSurface : Surface { [CCode (cname = "cairo_svg_surface_create")] - public SvgSurface (string! filename, double width_in_points, double height_in_points); + public SvgSurface (string filename, double width_in_points, double height_in_points); [CCode (cname = "cairo_svg_surface_create_for_stream")] public SvgSurface.for_stream (WriteFunc write_func, pointer closure, double width_in_points, double height_in_points); public void restrict_to_version (SvgVersion version); @@ -559,5 +559,5 @@ namespace Cairo { } public int version (); - public weak string! version_string (); + public weak string version_string (); } diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 5d3d292..c7c5e71 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -51,7 +51,7 @@ public struct constpointer { public struct char { [InstanceLast ()] [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string! to_string (string! format = "%hhi"); + public string to_string (string format = "%hhi"); public bool isalnum (); public bool isalpha (); public bool iscntrl (); @@ -75,7 +75,7 @@ public struct char { public struct uchar { [InstanceLast ()] [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string! to_string (string! format = "%hhu"); + public string to_string (string format = "%hhu"); } [SimpleType] @@ -89,7 +89,7 @@ public struct int { [InstanceLast ()] [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string! to_string (string! format = "%i"); + public string to_string (string format = "%i"); [CCode (cname = "CLAMP")] public int clamp (int low, int high); @@ -109,7 +109,7 @@ public struct uint { [InstanceLast ()] [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string! to_string (string! format = "%u"); + public string to_string (string format = "%u"); [CCode (cname = "CLAMP")] public uint clamp (uint low, uint high); @@ -129,7 +129,7 @@ public struct short { [InstanceLast ()] [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string! to_string (string! format = "%hi"); + public string to_string (string format = "%hi"); } [SimpleType] @@ -143,7 +143,7 @@ public struct ushort { [InstanceLast ()] [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string! to_string (string! format = "%hu"); + public string to_string (string format = "%hu"); } [SimpleType] @@ -157,7 +157,7 @@ public struct long { [InstanceLast ()] [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string! to_string (string! format = "%li"); + public string to_string (string format = "%li"); } [SimpleType] @@ -171,7 +171,7 @@ public struct ulong { [InstanceLast ()] [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string! to_string (string! format = "%lu"); + public string to_string (string format = "%lu"); } [SimpleType] @@ -185,7 +185,7 @@ public struct size_t { [InstanceLast] [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string! to_string (string! format = "%zu"); + public string to_string (string format = "%zu"); [CCode (cname = "GSIZE_TO_POINTER")] public pointer to_pointer (); @@ -202,7 +202,7 @@ public struct ssize_t { [InstanceLast] [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string! to_string (string! format = "%zi"); + public string to_string (string format = "%zi"); } [SimpleType] @@ -215,7 +215,7 @@ public struct int8 { public static int8 MAX; [CCode (cname = "g_strdup_printf", instance_pos = -1), InstanceLast] - public string! to_string (string! format = "%hhi"); + public string to_string (string format = "%hhi"); } [SimpleType] @@ -228,7 +228,7 @@ public struct uint8 { public static uint8 MAX; [CCode (cname = "g_strdup_printf", instance_pos = -1), InstanceLast] - public string! to_string (string! format = "%hhu"); + public string to_string (string format = "%hhu"); } [SimpleType] @@ -241,7 +241,7 @@ public struct int16 { public static int16 MAX; [CCode (cname = "g_strdup_printf", instance_pos = -1), InstanceLast] - public string! to_string (string! format = "%hi"); + public string to_string (string format = "%hi"); } [SimpleType] @@ -254,7 +254,7 @@ public struct uint16 { public static uint16 MAX; [CCode (cname = "g_strdup_printf", instance_pos = -1), InstanceLast] - public string! to_string (string! format = "%hu"); + public string to_string (string format = "%hu"); } [SimpleType] @@ -267,7 +267,7 @@ public struct int32 { public static int32 MAX; [CCode (cname = "g_strdup_printf", instance_pos = -1), InstanceLast] - public string! to_string (string! format = "%i"); + public string to_string (string format = "%i"); } [SimpleType] @@ -281,7 +281,7 @@ public struct uint32 { [InstanceLast ()] [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string! to_string (string! format = "%u"); + public string to_string (string format = "%u"); } [SimpleType] @@ -295,7 +295,7 @@ public struct int64 { [InstanceLast ()] [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string! to_string (string! format = "%lli"); + public string to_string (string format = "%lli"); } [SimpleType] @@ -309,7 +309,7 @@ public struct uint64 { [InstanceLast ()] [CCode (cname = "g_strdup_printf", instance_pos = -1)] - public string! to_string (string! format = "%llu"); + public string to_string (string format = "%llu"); } [SimpleType] @@ -353,7 +353,7 @@ public struct float { public int is_infinity (); [CCode (cname = "g_strdup_printf", instance_pos = -1), InstanceLast] - public string! to_string (string! format = "%g"); + public string to_string (string format = "%g"); } [SimpleType] @@ -397,7 +397,7 @@ public struct double { public int is_infinity (); [CCode (cname = "g_strdup_printf", instance_pos = -1), InstanceLast] - public string! to_string (string! format = "%g"); + public string to_string (string format = "%g"); } [SimpleType] @@ -509,11 +509,11 @@ public enum UnicodeBreakType { [CCode (cname = "char", const_cname = "const char", copy_function = "g_strdup", free_function = "g_free", cheader_filename = "stdlib.h,string.h,glib.h", type_id = "G_TYPE_STRING", marshaller_type_name = "STRING", get_value_function = "g_value_get_string", set_value_function = "g_value_set_string")] public class string { [CCode (cname = "strstr")] - public weak string str (string! needle); + public weak string? str (string needle); [CCode (cname = "g_str_has_prefix")] - public bool has_prefix (string! prefix); + public bool has_prefix (string prefix); [CCode (cname = "g_str_has_suffix")] - public bool has_suffix (string! suffix); + public bool has_suffix (string suffix); [CCode (cname = "g_strdup_printf"), PrintfFormat] public string printf (...); [CCode (cname = "sscanf", cheader_filename = "stdio.h")] @@ -528,15 +528,15 @@ public class string { public string compress (); [CCode (cname = "g_strsplit")] [NoArrayLength] - public string[] split (string! delimiter, int max_tokens = 0); + public string[] split (string delimiter, int max_tokens = 0); [CCode (cname = "g_strsplit_set")] [NoArrayLength] - public string[] split_set (string! delimiters, int max_tokens = 0); + public string[] split_set (string delimiters, int max_tokens = 0); [CCode (cname = "g_strjoinv")] [NoArrayLength] - public static string joinv (string! separator, string[] str_array); + public static string joinv (string separator, string[] str_array); [CCode (cname = "g_strnfill")] - public static string! nfill (ulong length, char fill_char); + public static string nfill (ulong length, char fill_char); [CCode (cname = "g_utf8_next_char")] public weak string next_char (); @@ -558,7 +558,7 @@ public class string { [CCode (cname = "g_utf8_strrchr")] public weak string rchr (long len, unichar c); [CCode (cname = "g_utf8_strreverse")] - public string! reverse (int len = -1); + public string reverse (int len = -1); [CCode (cname = "g_utf8_validate")] public bool validate (long max_len = -1, out string end = null); @@ -572,7 +572,7 @@ public class string { public int collate (string str2); [CCode (cname = "g_locale_to_utf8")] - public string! locale_to_utf8 (long len, out ulong bytes_read, out ulong bytes_written, out GLib.Error error = null); + public string locale_to_utf8 (long len, out ulong bytes_read, out ulong bytes_written, out GLib.Error error = null); [CCode (cname = "g_strchomp")] public weak string chomp(); @@ -600,7 +600,7 @@ public class string { [CCode (cname = "g_utf8_skip")] public static char[] skip; - public string! substring (long offset, long len); + public string substring (long offset, long len); } [Import ()] @@ -631,10 +631,10 @@ namespace GLib { public Type[] children (); public uint depth (); - public static Type from_name (string! name); + public static Type from_name (string name); public Type[] interfaces (); public bool is_a (Type is_a_type); - public weak string! name (); + public weak string name (); public Quark qname (); public Type parent (); @@ -678,7 +678,7 @@ namespace GLib { public class TypeModule : TypePlugin { public bool use (); public void unuse (); - public void set_name (string! name); + public void set_name (string name); } [CCode (ref_function = "g_param_spec_ref", unref_function = "g_param_spec_unref")] @@ -704,7 +704,7 @@ namespace GLib { [CCode (lower_case_csuffix = "object_class")] public class ObjectClass : TypeClass { - public weak ParamSpec find_property (string! property_name); + public weak ParamSpec find_property (string property_name); public weak ParamSpec[] list_properties (); } @@ -725,11 +725,11 @@ namespace GLib { public Object ref_sink (); public void get (...); public void set (...); - public void get_property (string! property_name, Value value); - public pointer get_data (string! key); - public void set_data (string! key, pointer data); - public void set_data_full (string! key, pointer data, DestroyNotify destroy); - public pointer steal_data (string! key); + public void get_property (string property_name, Value value); + public pointer get_data (string key); + public void set_data (string key, pointer data); + public void set_data_full (string key, pointer data, DestroyNotify destroy); + public pointer steal_data (string key); public pointer get_qdata (Quark quark); public void set_qdata (Quark quark, pointer data); public void set_qdata_full (Quark quark, pointer data, DestroyNotify destroy); @@ -740,7 +740,7 @@ namespace GLib { public signal void notify (ParamSpec pspec); - public weak Object connect (string! signal_spec, ...); + public weak Object connect (string signal_spec, ...); } public struct Parameter { @@ -1292,7 +1292,7 @@ namespace GLib { public static bool supported (); public static string build_path (string directory, string module_name); public static Module open (string file_name, ModuleFlags @flags); - public bool symbol (string! symbol_name, out pointer symbol); + public bool symbol (string symbol_name, out pointer symbol); public weak string name (); public void make_resident (); public static weak string error (); @@ -1343,7 +1343,7 @@ namespace GLib { public IOStatus read_chars (char[] buf, out size_t bytes_read) throws ConvertError, IOChannelError; public IOStatus read_unichar (out unichar thechar) throws ConvertError, IOChannelError; public IOStatus read_line (out string str_return, out size_t length, out size_t terminator_pos) throws ConvertError, IOChannelError; - public IOStatus read_line_string (String buffer, out size_t terminator_pos) throws ConvertError, IOChannelError; + public IOStatus read_line_string (StringBuilder buffer, out size_t terminator_pos) throws ConvertError, IOChannelError; public IOStatus read_to_end (out string str_return, out size_t length) throws ConvertError, IOChannelError; public IOStatus write_chars (char[] buf, out size_t bytes_written) throws ConvertError, IOChannelError; public IOStatus write_unichar (unichar thechar) throws ConvertError, IOChannelError; @@ -1424,7 +1424,7 @@ namespace GLib { [ErrorBase] [CCode (copy_function = "g_error_copy", free_function = "g_error_free")] public class Error { - public Error (Quark domain, int code, string! format, ...); + public Error (Quark domain, int code, string format, ...); public Error copy (); public bool matches (Quark domain, int code); @@ -1488,7 +1488,7 @@ namespace GLib { /* Character Set Conversions */ - public static string convert (string! str, long len, string! to_codeset, string! from_codeset, out int bytes_read = null, out int bytes_written = null) throws ConvertError; + public static string convert (string str, long len, string to_codeset, string from_codeset, out int bytes_read = null, out int bytes_written = null) throws ConvertError; public struct IConv { [CCode (cname = "g_iconv_open")] @@ -1499,12 +1499,12 @@ namespace GLib { } public static class Filename { - public static string to_utf8 (string! opsysstring, out ulong bytes_read, out ulong bytes_written) throws ConvertError; - public static string from_utf8 (string! utf8string, long len, out ulong bytes_read, out ulong bytes_written) throws ConvertError; - public static string from_uri (string! uri, out string hostname = null) throws ConvertError; - public static string to_uri (string! filename, string hostname = null) throws ConvertError; - public static string display_name (string! filename); - public static string display_basename (string! filename); + public static string to_utf8 (string opsysstring, out ulong bytes_read, out ulong bytes_written) throws ConvertError; + public static string from_utf8 (string utf8string, long len, out ulong bytes_read, out ulong bytes_written) throws ConvertError; + public static string from_uri (string uri, out string hostname = null) throws ConvertError; + public static string to_uri (string filename, string hostname = null) throws ConvertError; + public static string display_name (string filename); + public static string display_basename (string filename); } public errordomain ConvertError { @@ -1564,7 +1564,7 @@ namespace GLib { [CCode (instance_pos = -1)] public bool from_iso8601 (string iso_date); [InstanceByReference] - public string! to_iso8601 (); + public string to_iso8601 (); } public struct DateDay : uchar { @@ -1638,17 +1638,17 @@ namespace GLib { public void set_dmy (DateDay day, DateMonth month, DateYear y); public void set_julian (uint julian_day); public void set_time_val (TimeVal timeval); - public void set_parse (string! str); + public void set_parse (string str); public void add_days (uint n_days); public void subtract_days (uint n_days); public void add_months (uint n_months); public void subtract_months (uint n_months); public void add_years (uint n_years); public void subtract_years (uint n_years); - public int days_between (Date! date2); - public int compare (Date! rhs); + public int days_between (Date date2); + public int compare (Date rhs); public void clamp (Date min_date, Date max_date); - public void order (Date! date2); + public void order (Date date2); public DateDay get_day (); public DateMonth get_month (); public DateYear get_year (); @@ -1704,7 +1704,7 @@ namespace GLib { public static class Environment { [CCode (cname = "g_get_application_name")] - public static weak string get_application_name (); + public static weak string? get_application_name (); [CCode (cname = "g_set_application_name")] public static void set_application_name (string application_name); [CCode (cname = "g_get_prgname")] @@ -1712,9 +1712,9 @@ namespace GLib { [CCode (cname = "g_set_prgname")] public static void set_prgname (string application_name); [CCode (cname = "g_getenv")] - public static weak string get_variable (string! variable); + public static weak string? get_variable (string variable); [CCode (cname = "g_setenv")] - public static bool set_variable (string! variable, string! value, bool overwrite); + public static bool set_variable (string variable, string value, bool overwrite); [CCode (cname = "g_listenv")] [NoArrayLength] public static string[] list_variables (); @@ -1733,7 +1733,7 @@ namespace GLib { [CCode (cname = "g_get_system_config_dirs"), NoArrayLength] public static weak string[] get_system_config_dirs (); [CCode (cname = "g_get_host_name")] - public static weak string! get_host_name (); + public static weak string get_host_name (); [CCode (cname = "g_get_home_dir")] public static weak string get_home_dir (); [CCode (cname = "g_get_current_dir")] @@ -1754,8 +1754,8 @@ namespace GLib { } public static class Path { - public static bool is_absolute (string! file_name); - public static weak string skip_root (string! file_name); + public static bool is_absolute (string file_name); + public static weak string skip_root (string file_name); public static string get_basename (string file_name); public static string get_dirname (string file_name); [CCode (cname = "g_build_filename")] @@ -1967,8 +1967,8 @@ namespace GLib { public static bool spawn_async (string working_directory, string[] argv, string[] envp, SpawnFlags _flags, SpawnChildSetupFunc child_setup, pointer user_data, out Pid child_pid) throws SpawnError; [NoArrayLength ()] public static bool spawn_sync (string working_directory, string[] argv, string[] envp, SpawnFlags _flags, SpawnChildSetupFunc child_setup, pointer user_data, out string standard_output = null, out string standard_error = null, out int exit_status = null) throws SpawnError; - public static bool spawn_command_line_async (string! command_line) throws SpawnError; - public static bool spawn_command_line_sync (string! command_line, out string standard_output = null, out string standard_error = null, out int exit_status = null) throws SpawnError; + public static bool spawn_command_line_async (string command_line) throws SpawnError; + public static bool spawn_command_line_sync (string command_line, out string standard_output = null, out string standard_error = null, out int exit_status = null) throws SpawnError; [CCode (cname = "g_spawn_close_pid")] public static void close_pid (Pid pid); @@ -2084,8 +2084,8 @@ namespace GLib { [CCode (cprefix = "g_file_", cheader_filename = "glib/gstdio.h")] public static class FileUtils { - public static bool get_contents (string! filename, out string contents, out ulong length = null) throws FileError; - public static bool set_contents (string! filename, string contents, long length = -1) throws FileError; + public static bool get_contents (string filename, out string contents, out ulong length = null) throws FileError; + public static bool set_contents (string filename, string contents, long length = -1) throws FileError; public static bool test (string filename, FileTest test); public static int open_tmp (string tmpl, out string name_used) throws FileError; public static string read_link (string filename) throws FileError; @@ -2100,7 +2100,7 @@ namespace GLib { public static int chmod (string filename, int mode); [CCode (cname = "symlink")] - public static int symlink (string! oldpath, string! newpath); + public static int symlink (string oldpath, string newpath); } [CCode (cname = "stat")] @@ -2164,9 +2164,9 @@ namespace GLib { } public static class Shell { - public static bool parse_argv (string! command_line, [CCode (array_length_pos = 1.9)] out string[] argvp) throws ShellError; - public static string! quote (string! unquoted_string); - public static string! unquote (string! quoted_string) throws ShellError; + public static bool parse_argv (string command_line, [CCode (array_length_pos = 1.9)] out string[] argvp) throws ShellError; + public static string quote (string unquoted_string); + public static string unquote (string quoted_string) throws ShellError; } /* Commandline option parser */ @@ -2293,30 +2293,30 @@ namespace GLib { [CCode (ref_function = "g_regex_ref", unref_function = "g_regex_unref")] public class Regex : Boxed { - public Regex (string! pattern, RegexCompileFlags compile_options = 0, RegexMatchFlags match_options = 0) throws RegexError; - public string! get_pattern (); + public Regex (string pattern, RegexCompileFlags compile_options = 0, RegexMatchFlags match_options = 0) throws RegexError; + public string get_pattern (); public int get_max_backref (); public int get_capture_count (); - public int get_string_number (string! name); - public static string! escape_string (string! str, int length = -1); - public static bool match_simple (string! pattern, string! str, RegexCompileFlags compile_options = 0, RegexMatchFlags match_options = 0); - public bool match (string! str, RegexMatchFlags match_options = 0, out MatchInfo match_info = null); - public bool match_full (string! str, long string_len = -1, int start_position = 0, RegexMatchFlags match_options = 0, out MatchInfo match_info = null) throws RegexError; - public bool match_all (string! str, RegexMatchFlags match_options = 0, out MatchInfo match_info = null); - public bool match_all_full (string! str, long string_len = -1, int start_position = 0, RegexMatchFlags match_options = 0, out MatchInfo match_info = null) throws RegexError; + public int get_string_number (string name); + public static string escape_string (string str, int length = -1); + public static bool match_simple (string pattern, string str, RegexCompileFlags compile_options = 0, RegexMatchFlags match_options = 0); + public bool match (string str, RegexMatchFlags match_options = 0, out MatchInfo match_info = null); + public bool match_full (string str, long string_len = -1, int start_position = 0, RegexMatchFlags match_options = 0, out MatchInfo match_info = null) throws RegexError; + public bool match_all (string str, RegexMatchFlags match_options = 0, out MatchInfo match_info = null); + public bool match_all_full (string str, long string_len = -1, int start_position = 0, RegexMatchFlags match_options = 0, out MatchInfo match_info = null) throws RegexError; [NoArrayLength] - public static string[] split_simple (string! pattern, string! str, RegexCompileFlags compile_options = 0, RegexMatchFlags match_options = 0); + public static string[] split_simple (string pattern, string str, RegexCompileFlags compile_options = 0, RegexMatchFlags match_options = 0); [NoArrayLength] - public string[] split (string! str, RegexMatchFlags match_options = 0); + public string[] split (string str, RegexMatchFlags match_options = 0); [NoArrayLength] - public bool split_full (string! str, long string_len = -1, int start_position = 0, RegexMatchFlags match_options = 0, int max_tokens = 0) throws RegexError; - public string replace (string! str, long string_len, int start_position, string! replacement, RegexMatchFlags match_options = 0) throws RegexError; - public string replace_literal (string! str, long string_len, int start_position, string! replacement, RegexMatchFlags match_options = 0) throws RegexError; - public string replace_eval (string! str, long string_len, int start_position, RegexMatchFlags match_options = 0, RegexEvalCallback eval, pointer user_data) throws RegexError; + public bool split_full (string str, long string_len = -1, int start_position = 0, RegexMatchFlags match_options = 0, int max_tokens = 0) throws RegexError; + public string replace (string str, long string_len, int start_position, string replacement, RegexMatchFlags match_options = 0) throws RegexError; + public string replace_literal (string str, long string_len, int start_position, string replacement, RegexMatchFlags match_options = 0) throws RegexError; + public string replace_eval (string str, long string_len, int start_position, RegexMatchFlags match_options = 0, RegexEvalCallback eval, pointer user_data) throws RegexError; public static bool check_replacement (out bool has_references = null) throws RegexError; } - public static delegate bool RegexEvalCallback (MatchInfo match_info, String result, pointer user_data); + public static delegate bool RegexEvalCallback (MatchInfo match_info, StringBuilder result, pointer user_data); [CCode (free_function = "g_match_info_free")] public class MatchInfo { @@ -2326,11 +2326,11 @@ namespace GLib { public bool next () throws RegexError; public int get_match_count (); public bool is_partial_match (); - public string! expand_references (string! string_to_expand) throws RegexError; + public string expand_references (string string_to_expand) throws RegexError; public string fetch (int match_num); public bool fetch_pos (int match_num, out int start_pos, out int end_pos); - public string fetch_named (string! name); - public bool fetch_named_pos (string! name, out int start_pos, out int end_pos); + public string fetch_named (string name); + public bool fetch_named_pos (string name, out int start_pos, out int end_pos); [NoArrayLength] public string[] fetch_all (); } @@ -2379,9 +2379,9 @@ namespace GLib { } public static class Markup { - public static string! escape_text (string! text, long length = -1); + public static string escape_text (string text, long length = -1); [PrintfFormat] - public static string! printf_escaped (string! format, ...); + public static string printf_escaped (string format, ...); } /* Key-value file parser */ @@ -2399,49 +2399,49 @@ namespace GLib { public class KeyFile { public KeyFile (); public void set_list_separator (char separator); - public bool load_from_file (string! file, KeyFileFlags @flags) throws KeyFileError; - public bool load_from_data (string! data, ulong length, KeyFileFlags @flags) throws KeyFileError; - public bool load_from_data_dirs (string! file, out string full_path, KeyFileFlags @flags) throws KeyFileError; + public bool load_from_file (string file, KeyFileFlags @flags) throws KeyFileError; + public bool load_from_data (string data, ulong length, KeyFileFlags @flags) throws KeyFileError; + public bool load_from_data_dirs (string file, out string full_path, KeyFileFlags @flags) throws KeyFileError; public string to_data (out ulong length) throws KeyFileError; public string get_start_group (); [CCode (array_length_type = "gsize")] public string[] get_groups (); [CCode (array_length_type = "gsize")] - public string[] get_keys (string! group_name) throws KeyFileError; - public bool has_group (string! group_name); - public bool has_key (string! group_name, string! key) throws KeyFileError; - public string get_value (string! group_name, string! key) throws KeyFileError; - public string get_string (string! group_name, string! key) throws KeyFileError; - public string get_locale_string (string! group_name, string! key, string! locale) throws KeyFileError; - public bool get_boolean (string! group_name, string! key) throws KeyFileError; - public int get_integer (string! group_name, string! key) throws KeyFileError; - public double get_double (string! group_name, string! key) throws KeyFileError; + public string[] get_keys (string group_name) throws KeyFileError; + public bool has_group (string group_name); + public bool has_key (string group_name, string key) throws KeyFileError; + public string get_value (string group_name, string key) throws KeyFileError; + public string get_string (string group_name, string key) throws KeyFileError; + public string get_locale_string (string group_name, string key, string locale) throws KeyFileError; + public bool get_boolean (string group_name, string key) throws KeyFileError; + public int get_integer (string group_name, string key) throws KeyFileError; + public double get_double (string group_name, string key) throws KeyFileError; [CCode (array_length_type = "gsize")] - public string[] get_string_list (string! group_name, string! key) throws KeyFileError; + public string[] get_string_list (string group_name, string key) throws KeyFileError; [CCode (array_length_type = "gsize")] - public string[] get_locale_string_list (string! group_name, string! key, string! locale) throws KeyFileError; + public string[] get_locale_string_list (string group_name, string key, string locale) throws KeyFileError; [CCode (array_length_type = "gsize")] - public bool[] get_boolean_list (string! group_name, string! key) throws KeyFileError; + public bool[] get_boolean_list (string group_name, string key) throws KeyFileError; [CCode (array_length_type = "gsize")] - public int[] get_integer_list (string! group_name, string! key) throws KeyFileError; + public int[] get_integer_list (string group_name, string key) throws KeyFileError; [CCode (array_length_type = "gsize")] - public double[] get_double_list (string! group_name, string! key) throws KeyFileError; - public string get_comment (string! group_name, string! key) throws KeyFileError; - public void set_value (string! group_name, string! key, string! value); - public void set_string (string! group_name, string! key, string! str); - public void set_locale_string (string! group_name, string! key, string! locale, string! str); - public void set_boolean (string! group_name, string! key, bool value); - public void set_integer (string! group_name, string! key, int value); - public void set_double (string! group_name, string! key, double value); - public void set_string_list (string! group_name, string! key, string[] list); - public void set_locale_string_list (string! group_name, string! key, string! locale, string[] list); - public void set_boolean_list (string! group_name, string! key, bool[] list); - public void set_integer_list (string! group_name, string! key, int[] list); - public void set_double_list (string! group_name, string! key, double[] list); - public void set_comment (string! group_name, string! key, string! comment); - public void remove_group (string! group_name) throws KeyFileError; - public void remove_key (string! group_name, string! key) throws KeyFileError; - public void remove_comment (string! group_name, string! key) throws KeyFileError; + public double[] get_double_list (string group_name, string key) throws KeyFileError; + public string get_comment (string group_name, string key) throws KeyFileError; + public void set_value (string group_name, string key, string value); + public void set_string (string group_name, string key, string str); + public void set_locale_string (string group_name, string key, string locale, string str); + public void set_boolean (string group_name, string key, bool value); + public void set_integer (string group_name, string key, int value); + public void set_double (string group_name, string key, double value); + public void set_string_list (string group_name, string key, string[] list); + public void set_locale_string_list (string group_name, string key, string locale, string[] list); + public void set_boolean_list (string group_name, string key, bool[] list); + public void set_integer_list (string group_name, string key, int[] list); + public void set_double_list (string group_name, string key, double[] list); + public void set_comment (string group_name, string key, string comment); + public void remove_group (string group_name) throws KeyFileError; + public void remove_key (string group_name, string key) throws KeyFileError; + public void remove_comment (string group_name, string key) throws KeyFileError; } [CCode (cprefix = "G_KEY_FILE_")] @@ -2456,43 +2456,43 @@ namespace GLib { [CCode (free_function = "g_bookmark_file_free")] public class BookmarkFile { public BookmarkFile (); - public bool load_from_file (string! file) throws BookmarkFileError; - public bool load_from_data (string! data, size_t length) throws BookmarkFileError; - public bool load_from_data_dirs (string! file, out string full_path) throws BookmarkFileError; + public bool load_from_file (string file) throws BookmarkFileError; + public bool load_from_data (string data, size_t length) throws BookmarkFileError; + public bool load_from_data_dirs (string file, out string full_path) throws BookmarkFileError; public string to_data (out size_t length) throws BookmarkFileError; - public bool to_file (string! filename) throws BookmarkFileError; - public bool has_item (string! uri); - public bool has_group (string! uri, string! group) throws BookmarkFileError; - public bool has_application (string! uri, string! name) throws BookmarkFileError; + public bool to_file (string filename) throws BookmarkFileError; + public bool has_item (string uri); + public bool has_group (string uri, string group) throws BookmarkFileError; + public bool has_application (string uri, string name) throws BookmarkFileError; public int get_size (); public string[] get_uris (); public string get_title (string uri) throws BookmarkFileError; public string get_description (string uri) throws BookmarkFileError; public string get_mime_type (string uri) throws BookmarkFileError; - public bool get_is_private (string! uri) throws BookmarkFileError; - public bool get_icon (string! uri, out string href, out string mime_type) throws BookmarkFileError; - public long get_added (string! uri) throws BookmarkFileError; - public long get_modified (string! uri) throws BookmarkFileError; - public long get_visited (string! uri) throws BookmarkFileError; - public string[] get_groups (string! uri) throws BookmarkFileError; - public string[] get_applications (string! uri) throws BookmarkFileError; - public bool get_app_info (string! uri, string! name, out string exec, out uint count, out long stamp) throws BookmarkFileError; + public bool get_is_private (string uri) throws BookmarkFileError; + public bool get_icon (string uri, out string href, out string mime_type) throws BookmarkFileError; + public long get_added (string uri) throws BookmarkFileError; + public long get_modified (string uri) throws BookmarkFileError; + public long get_visited (string uri) throws BookmarkFileError; + public string[] get_groups (string uri) throws BookmarkFileError; + public string[] get_applications (string uri) throws BookmarkFileError; + public bool get_app_info (string uri, string name, out string exec, out uint count, out long stamp) throws BookmarkFileError; public void set_title (string uri, string title); public void set_description (string uri, string description); public void set_mime_type (string uri, string mime_type); - public void set_is_private (string! uri, bool is_private); - public void set_icon (string! uri, string href, string mime_type); - public void set_added (string! uri, long time_); - public void set_groups (string! uri, string[] groups); - public void set_modified (string! uri, long time_); - public void set_visited (string! uri, long time_); - public bool set_app_info (string! uri, string! name, string! exec, int count, long time_) throws BookmarkFileError; - public void add_group (string! uri, string! group); - public void add_application (string! uri, string! name, string! exec); - public bool remove_group (string! uri, string! group) throws BookmarkFileError; - public bool remove_application (string! uri, string! name) throws BookmarkFileError; - public bool remove_item (string! uri) throws BookmarkFileError; - public bool move_item (string! old_uri, string! new_uri) throws BookmarkFileError; + public void set_is_private (string uri, bool is_private); + public void set_icon (string uri, string href, string mime_type); + public void set_added (string uri, long time_); + public void set_groups (string uri, string[] groups); + public void set_modified (string uri, long time_); + public void set_visited (string uri, long time_); + public bool set_app_info (string uri, string name, string exec, int count, long time_) throws BookmarkFileError; + public void add_group (string uri, string group); + public void add_application (string uri, string name, string exec); + public bool remove_group (string uri, string group) throws BookmarkFileError; + public bool remove_application (string uri, string name) throws BookmarkFileError; + public bool remove_item (string uri) throws BookmarkFileError; + public bool move_item (string old_uri, string new_uri) throws BookmarkFileError; } public errordomain BookmarkFileError { @@ -2793,56 +2793,32 @@ namespace GLib { public StringBuilder (string init = ""); [CCode (cname = "g_string_sized_new")] public StringBuilder.sized (ulong dfl_size); - public weak StringBuilder assign (string! rval); - public weak StringBuilder append (string! val); + public weak StringBuilder assign (string rval); + public weak StringBuilder append (string val); public weak StringBuilder append_c (char c); public weak StringBuilder append_unichar (unichar wc); - public weak StringBuilder append_len (string! val, long len); - public weak StringBuilder prepend (string! val); + public weak StringBuilder append_len (string val, long len); + public weak StringBuilder prepend (string val); public weak StringBuilder prepend_c (char c); public weak StringBuilder prepend_unichar (unichar wc); - public weak StringBuilder prepend_len (string! val, long len); - public weak StringBuilder insert (long pos, string! val); + public weak StringBuilder prepend_len (string val, long len); + public weak StringBuilder insert (long pos, string val); public weak StringBuilder erase (long pos, long len); [PrintfFormat] - public void printf (string! format, ...); + public void printf (string format, ...); [PrintfFormat] - public void append_printf (string! format, ...); + public void append_printf (string format, ...); public string str; public long len; public long allocated_len; } - // will be removed in Vala 0.1.8 - [CCode (free_function = "g_string_free", type_id = "G_TYPE_GSTRING")] - public class String : Boxed { - public String (string init = ""); - [CCode (cname = "g_string_sized_new")] - public String.sized (ulong dfl_size); - public weak String assign (string! rval); - public weak String append (string! val); - public weak String append_c (char c); - public weak String append_unichar (unichar wc); - public weak String append_len (string! val, long len); - public weak String prepend (string! val); - public weak String prepend_c (char c); - public weak String prepend_unichar (unichar wc); - public weak String prepend_len (string! val, long len); - public weak String insert (long pos, string! val); - public weak String erase (long pos, long len); - - [PrintfFormat] - public void printf (string! format, ...); - [PrintfFormat] - public void append_printf (string! format, ...); - - public string str; - public long len; - public long allocated_len; + // will be removed in Vala 0.3.2 + public class String { } - + /* Pointer Arrays */ [CCode (free_function = "g_ptr_array_free")] @@ -2969,27 +2945,27 @@ namespace GLib { public static class Signal { public static void query (uint signal_id, out SignalQuery query); - public static uint lookup (string! name, Type itype); + public static uint lookup (string name, Type itype); public static weak string name (uint signal_id); public static uint[] list_ids (Type itype); public static void emit (pointer instance, uint signal_id, Quark detail, ...); - public static void emit_by_name (pointer instance, string! detailed_signal, ...); - public static ulong connect (pointer instance, string! detailed_signal, Callback! handler, pointer data); - public static ulong connect_after (pointer instance, string! detailed_signal, Callback! handler, pointer data); - public static ulong connect_swapped (pointer instance, string! detailed_signal, Callback! handler, pointer data); - public static ulong connect_object (pointer instance, string! detailed_signal, Callback! handler, Object gobject, ConnectFlags flags); - public static ulong connect_data (pointer instance, string! detailed_signal, Callback! handler, pointer data, ClosureNotify destroy_data, ConnectFlags flags); - public static ulong connect_closure (pointer instance, string! detailed_signal, Closure! closure, bool after); - public static ulong connect_closure_by_id (pointer instance, uint signal_id, Quark detail, Closure! closure, bool after); + public static void emit_by_name (pointer instance, string detailed_signal, ...); + public static ulong connect (pointer instance, string detailed_signal, Callback handler, pointer data); + public static ulong connect_after (pointer instance, string detailed_signal, Callback handler, pointer data); + public static ulong connect_swapped (pointer instance, string detailed_signal, Callback handler, pointer data); + public static ulong connect_object (pointer instance, string detailed_signal, Callback handler, Object gobject, ConnectFlags flags); + public static ulong connect_data (pointer instance, string detailed_signal, Callback handler, pointer data, ClosureNotify destroy_data, ConnectFlags flags); + public static ulong connect_closure (pointer instance, string detailed_signal, Closure closure, bool after); + public static ulong connect_closure_by_id (pointer instance, uint signal_id, Quark detail, Closure closure, bool after); public static bool has_handler_pending (pointer instance, uint signal_id, Quark detail, bool may_be_blocked); public static void stop_emission (pointer instance, uint signal_id, Quark detail); - public static void stop_emission_by_name (pointer instance, string !detailed_signal); - public static void override_class_closure (uint signal_id, Type instance_type, Closure! class_closure); + public static void stop_emission_by_name (pointer instance, string detailed_signal); + public static void override_class_closure (uint signal_id, Type instance_type, Closure class_closure); [NoArrayLength] public static void chain_from_overridden (Value[] instance_and_params, out Value return_value); - public static ulong add_emission_hook (uint signal_id, Quark detail, SignalEmissionHook! hook_func, DestroyNotify data_destroy); + public static ulong add_emission_hook (uint signal_id, Quark detail, SignalEmissionHook hook_func, DestroyNotify data_destroy); public static void remove_emission_hook (uint signal_id, ulong hook_id); - public static bool parse_name (string !detailed_signal, Type itype, out uint signal_id, out Quark detail, bool force_detail_quark); + public static bool parse_name (string detailed_signal, Type itype, out uint signal_id, out Quark detail, bool force_detail_quark); } public static class SignalHandler { @@ -3035,14 +3011,14 @@ namespace GLib { } public class PatternSpec { - public PatternSpec (string! pattern); + public PatternSpec (string pattern); public void free (); - public bool equal (PatternSpec! pspec); + public bool equal (PatternSpec pspec); [CCode (cname = "g_pattern_match")] - public bool match (uint string_length, string! str, string! str_reversed); + public bool match (uint string_length, string str, string str_reversed); [CCode (cname = "g_pattern_match_string")] - public bool match_string (string! str); + public bool match_string (string str); [CCode (cname = "g_pattern_match_simple")] - public static bool match_simple (string! pattern, string! str); + public static bool match_simple (string pattern, string str); } } diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index 9a941a1..5fa4aeb 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -48,7 +48,7 @@ public class Vala.GIdlParser : CodeVisitor { * * @param context a code context */ - public void parse (CodeContext! context) { + public void parse (CodeContext context) { cname_type_map = new HashMap (str_hash, str_equal); this.context = context; @@ -57,43 +57,43 @@ public class Vala.GIdlParser : CodeVisitor { cname_type_map = null; } - public override void visit_namespace (Namespace! ns) { + public override void visit_namespace (Namespace ns) { ns.accept_children (this); } - public override void visit_class (Class! cl) { + public override void visit_class (Class cl) { visit_type (cl); } - public override void visit_struct (Struct! st) { + public override void visit_struct (Struct st) { visit_type (st); } - public override void visit_interface (Interface! iface) { + public override void visit_interface (Interface iface) { visit_type (iface); } - public override void visit_enum (Enum! en) { + public override void visit_enum (Enum en) { visit_type (en); } - public override void visit_delegate (Delegate! d) { + public override void visit_delegate (Delegate d) { visit_type (d); } - private void visit_type (Typesymbol! t) { + private void visit_type (Typesymbol t) { if (!cname_type_map.contains (t.get_cname ())) { cname_type_map[t.get_cname ()] = t; } } - public override void visit_source_file (SourceFile! source_file) { + public override void visit_source_file (SourceFile source_file) { if (source_file.filename.has_suffix (".gi")) { parse_file (source_file); } } - private void parse_file (SourceFile! source_file) { + private void parse_file (SourceFile source_file) { string metadata_filename = "%s.metadata".printf (source_file.filename.ndup (source_file.filename.size () - ".gi".size ())); current_source_file = source_file; @@ -147,7 +147,7 @@ public class Vala.GIdlParser : CodeVisitor { } } - private string! fix_type_name (string! type_name, Namespace! ns) { + private string fix_type_name (string type_name, Namespace ns) { var attributes = get_attributes (type_name); if (attributes != null) { foreach (string attr in attributes) { @@ -179,7 +179,7 @@ public class Vala.GIdlParser : CodeVisitor { return type_name; } - private string! fix_const_name (string! const_name, Namespace! ns) { + private string fix_const_name (string const_name, Namespace ns) { if (const_name.has_prefix (ns.name.up () + "_")) { return const_name.offset (ns.name.len () + 1); } else if (ns.name == "GLib" && const_name.has_prefix ("G_")) { @@ -188,7 +188,7 @@ public class Vala.GIdlParser : CodeVisitor { return const_name; } - private Namespace parse_module (IdlModule! module) { + private Namespace parse_module (IdlModule module) { Symbol sym = context.root.scope.lookup (module.name); Namespace ns; if (sym is Namespace) { @@ -280,7 +280,7 @@ public class Vala.GIdlParser : CodeVisitor { return ns; } - private Delegate parse_delegate (IdlNodeFunction! f_node) { + private Delegate parse_delegate (IdlNodeFunction f_node) { weak IdlNode node = (IdlNode) f_node; var cb = new Delegate (node.name, parse_param (f_node.result), current_source_reference); @@ -324,7 +324,7 @@ public class Vala.GIdlParser : CodeVisitor { return cb; } - private bool is_reference_type (string! cname) { + private bool is_reference_type (string cname) { var st_attributes = get_attributes (cname); if (st_attributes != null) { foreach (string attr in st_attributes) { @@ -337,7 +337,7 @@ public class Vala.GIdlParser : CodeVisitor { return true; } - private void parse_struct (IdlNodeStruct! st_node, Namespace! ns, IdlModule! module) { + private void parse_struct (IdlNodeStruct st_node, Namespace ns, IdlModule module) { weak IdlNode node = (IdlNode) st_node; if (st_node.deprecated) { @@ -473,7 +473,7 @@ public class Vala.GIdlParser : CodeVisitor { } } - private void parse_union (IdlNodeUnion! un_node, Namespace! ns, IdlModule! module) { + private void parse_union (IdlNodeUnion un_node, Namespace ns, IdlModule module) { weak IdlNode node = (IdlNode) un_node; if (un_node.deprecated) { @@ -595,7 +595,7 @@ public class Vala.GIdlParser : CodeVisitor { } } - private void parse_boxed (IdlNodeBoxed! boxed_node, Namespace! ns, IdlModule! module) { + private void parse_boxed (IdlNodeBoxed boxed_node, Namespace ns, IdlModule module) { weak IdlNode node = (IdlNode) boxed_node; string name = fix_type_name (node.name, ns); @@ -710,7 +710,7 @@ public class Vala.GIdlParser : CodeVisitor { } } - private Typesymbol parse_enum (IdlNodeEnum! en_node) { + private Typesymbol parse_enum (IdlNodeEnum en_node) { weak IdlNode node = (IdlNode) en_node; var en = new Enum (node.name, current_source_reference); @@ -784,7 +784,7 @@ public class Vala.GIdlParser : CodeVisitor { return en; } - private void parse_object (IdlNodeInterface! node, Namespace! ns, IdlModule! module) { + private void parse_object (IdlNodeInterface node, Namespace ns, IdlModule module) { string name = fix_type_name (((IdlNode) node).name, ns); string base_class = null; @@ -904,7 +904,7 @@ public class Vala.GIdlParser : CodeVisitor { current_type_symbol_set = null; } - private void parse_interface (IdlNodeInterface! node, Namespace! ns, IdlModule! module) { + private void parse_interface (IdlNodeInterface node, Namespace ns, IdlModule module) { string name = fix_type_name (node.gtype_name, ns); var iface = ns.scope.lookup (name) as Interface; @@ -978,7 +978,7 @@ public class Vala.GIdlParser : CodeVisitor { current_data_type = null; } - private UnresolvedType parse_type (IdlNodeType! type_node) { + private UnresolvedType parse_type (IdlNodeType type_node) { var type = new UnresolvedType (); if (type_node.tag == TypeTag.VOID) { if (type_node.is_pointer) { @@ -1111,7 +1111,7 @@ public class Vala.GIdlParser : CodeVisitor { return type; } - private bool is_simple_type (string! type_name) { + private bool is_simple_type (string type_name) { var st = cname_type_map[type_name] as Struct; if (st != null && st.is_simple_type ()) { return true; @@ -1120,7 +1120,7 @@ public class Vala.GIdlParser : CodeVisitor { return false; } - private void parse_type_string (UnresolvedType! type, string! n) { + private void parse_type_string (UnresolvedType type, string n) { var dt = cname_type_map[n]; if (dt != null) { UnresolvedSymbol parent_symbol = null; @@ -1175,7 +1175,7 @@ public class Vala.GIdlParser : CodeVisitor { } } - private UnresolvedType parse_param (IdlNodeParam! param) { + private UnresolvedType parse_param (IdlNodeParam param) { var type = parse_type (param.type); // disable for now as null_ok not yet correctly set @@ -1418,7 +1418,7 @@ public class Vala.GIdlParser : CodeVisitor { return false; } - private Method parse_function (IdlNodeFunction! f, bool is_interface = false) { + private Method parse_function (IdlNodeFunction f, bool is_interface = false) { weak IdlNode node = (IdlNode) f; if (f.deprecated) { @@ -1428,7 +1428,7 @@ public class Vala.GIdlParser : CodeVisitor { return create_method (node.name, f.symbol, f.result, f.parameters, f.is_constructor, is_interface); } - private Method parse_virtual (IdlNodeVFunc! v, IdlNodeFunction? func, bool is_interface = false) { + private Method parse_virtual (IdlNodeVFunc v, IdlNodeFunction? func, bool is_interface = false) { weak IdlNode node = (IdlNode) v; string symbol = "%s%s".printf (current_data_type.get_lower_case_cprefix(), node.name); @@ -1450,8 +1450,8 @@ public class Vala.GIdlParser : CodeVisitor { return m; } - private string! fix_prop_name (string name) { - var str = new String (); + private string fix_prop_name (string name) { + var str = new StringBuilder (); string i = name; @@ -1469,7 +1469,7 @@ public class Vala.GIdlParser : CodeVisitor { return str.str; } - private Property parse_property (IdlNodeProperty! prop_node) { + private Property parse_property (IdlNodeProperty prop_node) { weak IdlNode node = (IdlNode) prop_node; if (prop_node.deprecated) { @@ -1520,7 +1520,7 @@ public class Vala.GIdlParser : CodeVisitor { return prop; } - private Constant parse_constant (IdlNodeConstant! const_node) { + private Constant parse_constant (IdlNodeConstant const_node) { weak IdlNode node = (IdlNode) const_node; var type = parse_type (const_node.type); @@ -1534,7 +1534,7 @@ public class Vala.GIdlParser : CodeVisitor { return c; } - private Field parse_field (IdlNodeField! field_node) { + private Field parse_field (IdlNodeField field_node) { weak IdlNode node = (IdlNode) field_node; var type = parse_type (field_node.type); @@ -1587,7 +1587,7 @@ public class Vala.GIdlParser : CodeVisitor { } [NoArrayLength] - private string[] get_attributes (string! codenode) { + private string[] get_attributes (string codenode) { var attributes = codenode_attributes_map.get (codenode); if (attributes == null) { @@ -1616,11 +1616,11 @@ public class Vala.GIdlParser : CodeVisitor { return attributes.split (" "); } - private string eval (string! s) { + private string eval (string s) { return s.offset (1).ndup (s.size () - 2); } - private Signal parse_signal (IdlNodeSignal! sig_node) { + private Signal parse_signal (IdlNodeSignal sig_node) { weak IdlNode node = (IdlNode) sig_node; if (sig_node.deprecated || sig_node.result == null) { diff --git a/vapigen/valavapicheck.vala b/vapigen/valavapicheck.vala index e0f9023..282b465 100644 --- a/vapigen/valavapicheck.vala +++ b/vapigen/valavapicheck.vala @@ -23,14 +23,14 @@ using GLib; class Vala.VAPICheck : Object { - public VAPICheck (string! gidlname, construct CodeContext! context = new CodeContext ()) { + public VAPICheck (string gidlname, construct CodeContext context = new CodeContext ()) { gidl = new SourceFile (context, gidlname); metadata = new SourceFile (context, gidlname.substring (0, gidlname.len () - 5) + ".metadata"); } - public CodeContext! context { get; construct; } - public SourceFile! gidl { get; construct; } - public SourceFile! metadata { get; construct; } + public CodeContext context { get; construct; } + public SourceFile gidl { get; construct; } + public SourceFile metadata { get; construct; } private Gee.List _scope; private Gee.Set _symbols; @@ -48,7 +48,7 @@ class Vala.VAPICheck : Object { } } - private void add_symbol (string! name, string separator = null) { + private void add_symbol (string name, string separator = null) { if (null != separator) { string fullname = get_scope () + separator + name; @@ -58,11 +58,11 @@ class Vala.VAPICheck : Object { } } - private string! get_scope () { + private string get_scope () { return _scope[_scope.size - 1]; } - private void enter_scope (string! name) { + private void enter_scope (string name) { _scope.add (name); add_symbol (name); } @@ -71,7 +71,7 @@ class Vala.VAPICheck : Object { _scope.remove_at (_scope.size - 1); } - private void parse_members (string !name, List members) { + private void parse_members (string name, List members) { enter_scope (name); foreach (weak IdlNode node in members) { diff --git a/vapigen/valavapigen.vala b/vapigen/valavapigen.vala index f2c34c1..04502e0 100644 --- a/vapigen/valavapigen.vala +++ b/vapigen/valavapigen.vala @@ -60,7 +60,7 @@ class Vala.VAPIGen : Object { } } - private bool add_package (string! pkg) { + private bool add_package (string pkg) { if (context.has_package (pkg)) { // ignore multiple occurences of the same package return true; -- 2.7.4