]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Drop trailing spaces/tabs
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 27 Mar 2018 10:46:26 +0000 (12:46 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 27 Mar 2018 11:12:02 +0000 (13:12 +0200)
It was about time to do this.

196 files changed:
ccode/valaccodeassignment.vala
ccode/valaccodebinaryexpression.vala
ccode/valaccodeblock.vala
ccode/valaccodecasestatement.vala
ccode/valaccodecastexpression.vala
ccode/valaccodecommaexpression.vala
ccode/valaccodecomment.vala
ccode/valaccodeconditionalexpression.vala
ccode/valaccodedeclaration.vala
ccode/valaccodedostatement.vala
ccode/valaccodeelementaccess.vala
ccode/valaccodeenum.vala
ccode/valaccodeenumvalue.vala
ccode/valaccodeexpressionstatement.vala
ccode/valaccodeforstatement.vala
ccode/valaccodefragment.vala
ccode/valaccodefunction.vala
ccode/valaccodefunctioncall.vala
ccode/valaccodefunctiondeclarator.vala
ccode/valaccodegotostatement.vala
ccode/valaccodeidentifier.vala
ccode/valaccodeifstatement.vala
ccode/valaccodeincludedirective.vala
ccode/valaccodeinitializerlist.vala
ccode/valaccodelabel.vala
ccode/valaccodelinedirective.vala
ccode/valaccodememberaccess.vala
ccode/valaccodeoncesection.vala
ccode/valaccodeparameter.vala
ccode/valaccodeparenthesizedexpression.vala
ccode/valaccodereturnstatement.vala
ccode/valaccodestruct.vala
ccode/valaccodeswitchstatement.vala
ccode/valaccodetypedefinition.vala
ccode/valaccodeunaryexpression.vala
ccode/valaccodevariabledeclarator.vala
ccode/valaccodewhilestatement.vala
ccode/valaccodewriter.vala
codegen/valaccodearraymodule.vala
codegen/valaccodebasemodule.vala
codegen/valaccodecontrolflowmodule.vala
codegen/valaccodedelegatemodule.vala
codegen/valaccodememberaccessmodule.vala
codegen/valaccodemethodcallmodule.vala
codegen/valaccodemethodmodule.vala
codegen/valaclassregisterfunction.vala
codegen/valagirwriter.vala
codegen/valagobjectmodule.vala
codegen/valagsignalmodule.vala
codegen/valagtkmodule.vala
codegen/valagtypemodule.vala
codegen/valagvariantmodule.vala
codegen/valainterfaceregisterfunction.vala
codegen/valastructregisterfunction.vala
codegen/valatyperegisterfunction.vala
gee/timsort.vala
libvaladoc/api/attribute.vala
libvaladoc/api/signaturebuilder.vala
libvaladoc/api/sourcecomment.vala
libvaladoc/api/tree.vala
libvaladoc/api/typeparameter.vala
libvaladoc/api/typereference.vala
libvaladoc/content/link.vala
libvaladoc/content/run.vala
libvaladoc/documentation/documentationparser.vala
libvaladoc/documentation/gtkdoccommentparser.vala
libvaladoc/documentation/gtkdoccommentscanner.vala
libvaladoc/documentation/gtkdocmarkdownparser.vala
libvaladoc/documentation/gtkdocmarkdownscanner.vala
libvaladoc/filehelper.vala
libvaladoc/gtkdocrenderer.vala
libvaladoc/highlighter/xmlscanner.vala
libvaladoc/importer/internalidregistrar.vala
libvaladoc/importer/valadocdocumentationimporter.vala
libvaladoc/markupwriter.vala
tests/basic-types/bug571486.vala
tests/basic-types/bug731017.vala
tests/control-flow/break.vala
tests/control-flow/bug691514.vala
tests/control-flow/switch.vala
tests/delegates/delegates.vala
tests/enums/enums.vala
tests/errors/errors.vala
tests/methods/bug652098.vala
tests/methods/generics.vala
tests/methods/iterator.vala
tests/methods/lambda.vala
tests/objects/bug631267.vala
tests/objects/bug751338.vala
tests/objects/bug779955.vala
tests/objects/fields.vala
tests/objects/interfaces.vala
tests/objects/methods.vala
tests/objects/properties.vala
tests/objects/signals.vala
tests/objects/test-025.vala
tests/objects/test-026.vala
tests/objects/test-029.vala
vala/valaaddressofexpression.vala
vala/valaarraycreationexpression.vala
vala/valaarraytype.vala
vala/valaassignment.vala
vala/valaattribute.vala
vala/valabaseaccess.vala
vala/valabinaryexpression.vala
vala/valablock.vala
vala/valabooleanliteral.vala
vala/valabreakstatement.vala
vala/valacastexpression.vala
vala/valacatchclause.vala
vala/valacharacterliteral.vala
vala/valaclass.vala
vala/valaclasstype.vala
vala/valacodecontext.vala
vala/valacodenode.vala
vala/valacodevisitor.vala
vala/valacodewriter.vala
vala/valaconditionalexpression.vala
vala/valaconstant.vala
vala/valacontinuestatement.vala
vala/valadatatype.vala
vala/valadelegate.vala
vala/valadostatement.vala
vala/valaelementaccess.vala
vala/valaemptystatement.vala
vala/valaenum.vala
vala/valaenumvalue.vala
vala/valaerrorcode.vala
vala/valaerrordomain.vala
vala/valaexpression.vala
vala/valafield.vala
vala/valaflowanalyzer.vala
vala/valaforeachstatement.vala
vala/valaforstatement.vala
vala/valagenieparser.vala
vala/valageniescanner.vala
vala/valagenietokentype.vala
vala/valagirparser.vala
vala/valaifstatement.vala
vala/valainitializerlist.vala
vala/valaintegerliteral.vala
vala/valainterface.vala
vala/valainterfacetype.vala
vala/valalambdaexpression.vala
vala/valalocalvariable.vala
vala/valalockable.vala
vala/valalockstatement.vala
vala/valamemberaccess.vala
vala/valamemberinitializer.vala
vala/valamethod.vala
vala/valamethodcall.vala
vala/valamethodtype.vala
vala/valanamespace.vala
vala/valanullliteral.vala
vala/valaobjectcreationexpression.vala
vala/valaobjecttype.vala
vala/valaobjecttypesymbol.vala
vala/valaparameter.vala
vala/valaparser.vala
vala/valapointerindirection.vala
vala/valapostfixexpression.vala
vala/valaproperty.vala
vala/valapropertyaccessor.vala
vala/valarealliteral.vala
vala/valareferencetransferexpression.vala
vala/valareport.vala
vala/valareturnstatement.vala
vala/valasemanticanalyzer.vala
vala/valasignal.vala
vala/valasizeofexpression.vala
vala/valasourcefile.vala
vala/valasourcereference.vala
vala/valastringliteral.vala
vala/valastruct.vala
vala/valaswitchlabel.vala
vala/valaswitchsection.vala
vala/valaswitchstatement.vala
vala/valasymbol.vala
vala/valasymbolresolver.vala
vala/valatypecheck.vala
vala/valatypeofexpression.vala
vala/valatypesymbol.vala
vala/valaunaryexpression.vala
vala/valaunresolvedtype.vala
vala/valausedattr.vala
vala/valausingdirective.vala
vala/valavariable.vala
vala/valawhilestatement.vala
valadoc/doclets/gtkdoc/commentconverter.vala
valadoc/doclets/gtkdoc/generator.vala
valadoc/doclets/gtkdoc/utils.vala
valadoc/symbolresolver.vala
valadoc/tests/drivers/generic-api-test.vala
valadoc/tests/libvaladoc/gtkdoc-scanner.vala
valadoc/tests/libvaladoc/markupreader.vala
valadoc/treebuilder.vala

index 57f525d1b30498f773f10d23b883050e645fd07f..247496df0f207dc7b507e010e82b97052fe5effa 100644 (file)
@@ -30,7 +30,7 @@ public class Vala.CCodeAssignment : CCodeExpression {
         * Left hand side of the assignment.
         */
        public CCodeExpression left { get; set; }
-       
+
        /**
         * Assignment operator.
         */
@@ -40,13 +40,13 @@ public class Vala.CCodeAssignment : CCodeExpression {
         * Right hand side of the assignment.
         */
        public CCodeExpression right { get; set; }
-       
+
        public CCodeAssignment (CCodeExpression l, CCodeExpression r, CCodeAssignmentOperator op = CCodeAssignmentOperator.SIMPLE) {
                left = l;
                operator = op;
                right = r;
        }
-       
+
        public override void write (CCodeWriter writer) {
                left.write (writer);
 
@@ -74,7 +74,7 @@ public class Vala.CCodeAssignment : CCodeExpression {
                writer.write_string (")");
        }
 }
-       
+
 public enum Vala.CCodeAssignmentOperator {
        SIMPLE,
        BITWISE_OR,
index 651e2cac3caaa9525ee8ce9fe27c6515c0617054..f001c0825057e14df5d7b94188b13677ed3519ce 100644 (file)
@@ -40,13 +40,13 @@ public class Vala.CCodeBinaryExpression : CCodeExpression {
         * The right operand.
         */
        public CCodeExpression right { get; set; }
-       
+
        public CCodeBinaryExpression (CCodeBinaryOperator op, CCodeExpression l, CCodeExpression r) {
                operator = op;
                left = l;
                right = r;
        }
-       
+
        public override void write (CCodeWriter writer) {
                left.write_inner (writer);
 
index 5c8f2c74d16625e6d26ffbab7ad13127415b79e4..6c9bbe4af27ac666c09acf58ebd335f50d15f8d0 100644 (file)
@@ -33,14 +33,14 @@ public class Vala.CCodeBlock : CCodeStatement {
        public bool suppress_newline { get; set; }
 
        private List<CCodeNode> statements = new ArrayList<CCodeNode> ();
-       
+
        /**
         * Prepend the specified statement to the list of statements.
         */
        public void prepend_statement (CCodeNode statement) {
                statements.insert (0, statement);
        }
-       
+
        /**
         * Append the specified statement to the list of statements.
         */
@@ -48,7 +48,7 @@ public class Vala.CCodeBlock : CCodeStatement {
                /* allow generic nodes to include comments */
                statements.add (statement);
        }
-       
+
        public override void write (CCodeWriter writer) {
                // the last reachable statement
                CCodeNode last_statement = null;
index 82b85f45a3892c4d256ba173872772dface62547..021d280780c589fb080d40aeaf772536b59af31b 100644 (file)
@@ -30,11 +30,11 @@ public class Vala.CCodeCaseStatement : CCodeStatement {
         * The case expression.
         */
        public CCodeExpression expression { get; set; }
-       
+
        public CCodeCaseStatement (CCodeExpression expression) {
                this.expression = expression;
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_indent (line);
                writer.write_string ("case ");
index e53e6c2b647fc07fe90d455298ea5ddc8e1ab2c3..a06b1fa3951f680612c74c138ca017feed464708 100644 (file)
@@ -30,17 +30,17 @@ public class Vala.CCodeCastExpression : CCodeExpression {
         * The expression to be cast.
         */
        public CCodeExpression inner { get; set; }
-       
+
        /**
         * The target type.
         */
        public string type_name { get; set; }
-       
+
        public CCodeCastExpression (CCodeExpression expr, string type) {
                inner = expr;
                type_name = type;
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_string ("(");
                writer.write_string (type_name);
index 6010428e07daadc32a9e3ebc85bbfc01d4fcfcbe..f72a9871348b152be7395a58662f7824b8033ba8 100644 (file)
@@ -27,7 +27,7 @@ using GLib;
  */
 public class Vala.CCodeCommaExpression : CCodeExpression {
        private List<CCodeExpression> inner = new ArrayList<CCodeExpression> ();
-       
+
        /**
         * Appends the specified expression to the expression list.
         *
@@ -47,7 +47,7 @@ public class Vala.CCodeCommaExpression : CCodeExpression {
 
        public override void write (CCodeWriter writer) {
                bool first = true;
-       
+
                writer.write_string ("(");
                foreach (CCodeExpression expr in inner) {
                        if (!first) {
index 3aacaa488f64f2303b6cba44a6be6d8baf0b4232..2902ebfd7d838ef1a0d363c4fe8a5b002e299232 100644 (file)
@@ -30,11 +30,11 @@ public class Vala.CCodeComment : CCodeNode {
         * The text content of the comment.
         */
        public string text { get; set; }
-       
+
        public CCodeComment (string _text) {
                text = _text;
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_comment (text);
        }
index b894928d7d97e053df56cd1bd497b098a4082b03..24e5f9e740f72f5eac5a6688b83bcf2f6850cf11 100644 (file)
@@ -30,23 +30,23 @@ public class Vala.CCodeConditionalExpression : CCodeExpression {
         * The condition.
         */
        public CCodeExpression condition { get; set; }
-       
+
        /**
         * The expression to be evaluated if the condition holds.
         */
        public CCodeExpression true_expression { get; set; }
-       
+
        /**
         * The expression to be evaluated if the condition doesn't hold.
         */
        public CCodeExpression false_expression { get; set; }
-       
+
        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) {
                condition.write_inner (writer);
                writer.write_string (" ? ");
index 4cbd86204423ade1ec88ee4097eb5130b2a2fe51..eb69c6a61660330eef2c54d1209faab6118b579f 100644 (file)
@@ -32,11 +32,11 @@ public class Vala.CCodeDeclaration : CCodeStatement {
        public string type_name { get; set; }
 
        private List<CCodeDeclarator> declarators = new ArrayList<CCodeDeclarator> ();
-       
+
        public CCodeDeclaration (string type_name) {
                this.type_name = type_name;
        }
-       
+
        /**
         * Adds the specified declarator to this declaration.
         *
@@ -45,7 +45,7 @@ public class Vala.CCodeDeclaration : CCodeStatement {
        public void add_declarator (CCodeDeclarator decl) {
                declarators.add (decl);
        }
-       
+
        public override void write (CCodeWriter writer) {
                if ((modifiers & (CCodeModifiers.STATIC | CCodeModifiers.INTERNAL | CCodeModifiers.EXTERN)) == 0) {
                        foreach (CCodeDeclarator decl in declarators) {
@@ -110,7 +110,7 @@ public class Vala.CCodeDeclaration : CCodeStatement {
                }
                writer.write_string (type_name);
                writer.write_string (" ");
-       
+
                bool first = true;
                foreach (CCodeDeclarator decl in declarators) {
                        if (!first) {
index 7101f8bdb205e5981662c0a10cb53411e82a2588..18c803e9466c8c498d7588188cb7604ae0e3914a 100644 (file)
@@ -35,12 +35,12 @@ public class Vala.CCodeDoStatement : CCodeStatement {
         * The loop condition.
         */
        public CCodeExpression condition { get; set; }
-       
+
        public CCodeDoStatement (CCodeStatement stmt, CCodeExpression cond) {
                body = stmt;
                condition = cond;
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_indent (line);
                writer.write_string ("do");
index dc62485ba56d35bacf20131ec6e775b58333a70c..3586aec1f0120925c4198e36d4f07a5bc3c50ff7 100644 (file)
@@ -32,18 +32,18 @@ public class Vala.CCodeElementAccess : CCodeExpression {
         * Expression representing the container on which we want to access.
         */
        public CCodeExpression container { get; set; }
-       
+
        /**
         * Expression representing the index we want to access inside the
         * container.
         */
        public CCodeExpression index { get; set; }
-       
+
        public CCodeElementAccess (CCodeExpression cont, CCodeExpression i) {
                container = cont;
                index = i;
        }
-       
+
        public override void write (CCodeWriter writer) {
                container.write_inner (writer);
                writer.write_string ("[");
index f2a378879374d846c2f33c2c51f4dfd7f860b27a..c94ad02aeb862dff8585af6d8438aec6ce7b8261 100644 (file)
@@ -32,11 +32,11 @@ public class Vala.CCodeEnum : CCodeNode {
        public string name { get; set; }
 
        private List<CCodeEnumValue> values = new ArrayList<CCodeEnumValue> ();
-       
+
        public CCodeEnum (string? name = null) {
                this.name = name;
        }
-       
+
        /**
         * Adds the specified value to this enum.
         *
@@ -45,7 +45,7 @@ public class Vala.CCodeEnum : CCodeNode {
        public void add_value (CCodeEnumValue value) {
                values.add (value);
        }
-       
+
        public override void write (CCodeWriter writer) {
                if (name != null) {
                        writer.write_string ("typedef ");
index 2fa4085873f2172d7d7b2411fc0257466eba7d77..f11326f56ce90d3148983d05cfd98a8ff8a9fa2f 100644 (file)
@@ -35,7 +35,7 @@ public class Vala.CCodeEnumValue : CCodeNode {
         * The numerical representation of this enum value.
         */
        public CCodeExpression? value { get; set; }
-       
+
        public CCodeEnumValue (string name, CCodeExpression? value = null) {
                this.name = name;
                this.value = value;
index 57b2b2da480239be9df70d02ab5346d2accb9dd3..ae721939aaba00b6f06817160d972e8761c36aff 100644 (file)
@@ -30,7 +30,7 @@ public class Vala.CCodeExpressionStatement : CCodeStatement {
         * The expression to evaluate.
         */
        public CCodeExpression expression { get; set; }
-       
+
        public CCodeExpressionStatement (CCodeExpression expr) {
                expression = expr;
        }
index c4d14be956375ce092c1fe1e40a95fe8ff6fcdef..f821e0d46be666062a674af0eae416a4ab71970d 100644 (file)
@@ -30,15 +30,15 @@ public class Vala.CCodeForStatement : CCodeStatement {
         * The loop condition.
         */
        public CCodeExpression? condition { get; set; }
-       
+
        /**
         * The loop body.
         */
        public CCodeStatement body { get; set; }
-       
+
        private List<CCodeExpression> initializer = new ArrayList<CCodeExpression> ();
        private List<CCodeExpression> iterator = new ArrayList<CCodeExpression> ();
-       
+
        public CCodeForStatement (CCodeExpression? condition, CCodeStatement? body = null) {
                this.condition = condition;
                this.body = body;
@@ -61,13 +61,13 @@ public class Vala.CCodeForStatement : CCodeStatement {
        public void add_iterator (CCodeExpression expr) {
                iterator.add (expr);
        }
-       
+
        public override void write (CCodeWriter writer) {
                bool first;
-               
+
                writer.write_indent (line);
                writer.write_string ("for (");
-               
+
                first = true;
                foreach (CCodeExpression init_expr in initializer) {
                        if (!first) {
@@ -85,7 +85,7 @@ public class Vala.CCodeForStatement : CCodeStatement {
                        condition.write (writer);
                }
                writer.write_string ("; ");
-               
+
                first = true;
                foreach (CCodeExpression it_expr in iterator) {
                        if (!first) {
index 0e229fffac6c15c06671cf04575036c70f1d0f0b..51538da6b91cc94cf5d67b768cdba173968ee01a 100644 (file)
@@ -27,7 +27,7 @@ using GLib;
  */
 public class Vala.CCodeFragment : CCodeNode {
        private List<CCodeNode> children = new ArrayList<CCodeNode> ();
-       
+
        /**
         * Appends the specified code node to this code fragment.
         *
@@ -36,7 +36,7 @@ public class Vala.CCodeFragment : CCodeNode {
        public void append (CCodeNode node) {
                children.add (node);
        }
-       
+
        /**
         * Returns a copy of the list of children.
         *
index 2458d9c3b89e6d11aa92f2d6ee13e0cf35b64912..688c6d1eb420103c9580f6b5af559e8692312d29 100644 (file)
@@ -30,7 +30,7 @@ public class Vala.CCodeFunction : CCodeNode {
         * The name of this function.
         */
        public string name { get; set; }
-       
+
        /**
         * The function return type.
         */
@@ -63,7 +63,7 @@ public class Vala.CCodeFunction : CCodeNode {
                this.block = new CCodeBlock ();
                current_block = block;
        }
-       
+
        /**
         * Appends the specified parameter to the list of function parameters.
         *
@@ -100,12 +100,12 @@ public class Vala.CCodeFunction : CCodeNode {
                foreach (CCodeParameter param in parameters) {
                        func.parameters.add (param);
                }
-               
+
                func.is_declaration = is_declaration;
                func.block = block;
                return func;
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_indent (line);
                if (CCodeModifiers.INTERNAL in modifiers) {
@@ -126,7 +126,7 @@ public class Vala.CCodeFunction : CCodeNode {
                writer.write_string (name);
                writer.write_string (" (");
                int param_pos_begin = (is_declaration ? return_type.char_count () + 1 : 0 ) + name.char_count () + 2;
-               
+
                bool has_args = (CCodeModifiers.PRINTF in modifiers || CCodeModifiers.SCANF in modifiers);
                int i = 0;
                int format_arg_index = -1;
@@ -151,7 +151,7 @@ public class Vala.CCodeFunction : CCodeNode {
                if (i == 0) {
                        writer.write_string ("void");
                }
-               
+
                writer.write_string (")");
 
                if (is_declaration) {
index e9e7d14c3d1f94db8179f32c95f6c3af0dac369f..e4a8ec16dc94bef3f5618616d52e3d3c889e7c75 100644 (file)
@@ -30,13 +30,13 @@ public class Vala.CCodeFunctionCall : CCodeExpression {
         * The function to be called.
         */
        public CCodeExpression? call { get; set; }
-       
+
        private List<CCodeExpression> arguments = new ArrayList<CCodeExpression> ();
-       
+
        public CCodeFunctionCall (CCodeExpression? call = null) {
                this.call = call;
        }
-       
+
        /**
         * Appends the specified expression to the list of arguments.
         *
@@ -70,7 +70,7 @@ public class Vala.CCodeFunctionCall : CCodeExpression {
                        } else {
                                first = false;
                        }
-                       
+
                        if (expr != null) {
                                expr.write (writer);
                        }
index 30f0c63b1dcdd8895fc91edeaab0e3e8022b7b28..529473d142146cb5b2a4a4fa9e0e936ea5ad12b5 100644 (file)
@@ -30,13 +30,13 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator {
         * The declarator name.
         */
        public string name { get; set; }
-       
+
        private List<CCodeParameter> parameters = new ArrayList<CCodeParameter> ();
-       
+
        public CCodeFunctionDeclarator (string name) {
                this.name = name;
        }
-       
+
        /**
         * Appends the specified parameter to the list of function parameters.
         *
@@ -45,16 +45,16 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator {
        public void add_parameter (CCodeParameter param) {
                parameters.add (param);
        }
-       
+
        public override void write (CCodeWriter writer) {
                write_declaration (writer);
        }
-       
+
        public override void write_declaration (CCodeWriter writer) {
                writer.write_string ("(*");
                writer.write_string (name);
                writer.write_string (") (");
-               
+
                bool has_args = (CCodeModifiers.PRINTF in modifiers || CCodeModifiers.SCANF in modifiers);
                int i = 0;
                int format_arg_index = -1;
@@ -74,7 +74,7 @@ public class Vala.CCodeFunctionDeclarator : CCodeDeclarator {
                        }
                        i++;
                }
-               
+
                writer.write_string (")");
 
                if (CCodeModifiers.DEPRECATED in modifiers) {
index 14e2c7d884589289502f47c77ba40a370df27bf1..b1e0d2980af0e39dfa8226ee116709160877f22c 100644 (file)
@@ -34,7 +34,7 @@ public class Vala.CCodeGotoStatement : CCodeStatement {
        public CCodeGotoStatement (string name) {
                this.name = name;
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_indent ();
                writer.write_string ("goto ");
index 0954e0a502fa108b3db310d8fd028bbd68fbd808..f0b1f01069e1f651341974c2338c95f7227c2cd8 100644 (file)
@@ -30,11 +30,11 @@ public class Vala.CCodeIdentifier : CCodeExpression {
         * The name of this identifier.
         */
        public string name { get; set; }
-       
+
        public CCodeIdentifier (string _name) {
                name = _name;
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_string (name);
        }
index 31a7da996efa5aa6e140358f6168edd346b99664..c4522302ef896ec80bdcbef1988443de78c6c67c 100644 (file)
@@ -30,29 +30,29 @@ public class Vala.CCodeIfStatement : CCodeStatement {
         * The boolean condition to evaluate.
         */
        public CCodeExpression condition { get; set; }
-       
+
        /**
         * The statement to be evaluated if the condition holds.
         */
        public CCodeStatement true_statement { get; set; }
-       
+
        /**
         * The optional statement to be evaluated if the condition doesn't hold.
         */
        public CCodeStatement? false_statement { get; set; }
-       
+
        public CCodeIfStatement (CCodeExpression cond, CCodeStatement true_stmt, CCodeStatement? false_stmt = null) {
                condition = cond;
                true_statement = true_stmt;
                false_statement = false_stmt;
        }
-       
+
        /**
         * Specifies whether this if statement is part of an else if statement.
         * This only affects the output formatting.
         */
        public bool else_if { get; set; }
-       
+
        public override void write (CCodeWriter writer) {
                if (!else_if) {
                        writer.write_indent (line);
@@ -64,13 +64,13 @@ public class Vala.CCodeIfStatement : CCodeStatement {
                        condition.write (writer);
                }
                writer.write_string (")");
-               
+
                /* else shouldn't be on a separate line */
                if (false_statement != null && true_statement is CCodeBlock) {
                        var cblock = (CCodeBlock) true_statement;
                        cblock.suppress_newline = true;
                }
-               
+
                true_statement.write (writer);
                if (false_statement != null) {
                        if (writer.bol) {
@@ -79,13 +79,13 @@ public class Vala.CCodeIfStatement : CCodeStatement {
                        } else {
                                writer.write_string (" else");
                        }
-                       
+
                        /* else if should be on one line */
                        if (false_statement is CCodeIfStatement) {
                                var cif = (CCodeIfStatement) false_statement;
                                cif.else_if = true;
                        }
-                       
+
                        false_statement.write (writer);
                }
        }
index 549e3f75130affae9f83609ab408bd0cbe04674c..184185d957330384044d8b2ad220bb9142902d15 100644 (file)
@@ -30,18 +30,18 @@ public class Vala.CCodeIncludeDirective : CCodeNode {
         * The file to be included.
         */
        public string filename { get; set; }
-       
+
        /**
         * Specifies whether the specified file should be searched in the local
         * directory.
         */
        public bool local { get; set; }
-       
+
        public CCodeIncludeDirective (string _filename, bool _local = false) {
                filename = _filename;
                local = _local;
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_indent ();
                writer.write_string ("#include ");
index 26cb56e1db12865cc62f4f8bfeee02c517a6159b..2be3a846a586023f47f23494a4935ab127123229 100644 (file)
@@ -27,7 +27,7 @@ using GLib;
  */
 public class Vala.CCodeInitializerList : CCodeExpression {
        private List<CCodeExpression> initializers = new ArrayList<CCodeExpression> ();
-       
+
        /**
         * Appends the specified expression to this initializer list.
         *
@@ -36,7 +36,7 @@ public class Vala.CCodeInitializerList : CCodeExpression {
        public void append (CCodeExpression expr) {
                initializers.add (expr);
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_string ("{");
 
@@ -47,7 +47,7 @@ public class Vala.CCodeInitializerList : CCodeExpression {
                        } else {
                                first = false;
                        }
-                       
+
                        if (expr != null) {
                                expr.write (writer);
                        }
index efb186693c43243acdb1d87ae189365d3c584ac7..c0a85788f20fab0d4597af44acad1fe6a7629fff 100644 (file)
@@ -34,7 +34,7 @@ public class Vala.CCodeLabel : CCodeStatement {
        public CCodeLabel (string name) {
                this.name = name;
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_indent ();
                writer.write_string (name);
index 96b0e017b9e8fa1c8d1b229ec82d78cf167a42eb..c5e61114bdb83f5b6568518af02223fafefcf230 100644 (file)
@@ -30,12 +30,12 @@ public class Vala.CCodeLineDirective : CCodeNode {
         * The name of the source file to be presumed.
         */
        public string filename { get; set; }
-       
+
        /**
         * The line number in the source file to be presumed.
         */
        public int line_number { get; set; }
-       
+
        public CCodeLineDirective (string _filename, int _line) {
                filename = _filename;
                line_number = _line;
index 2935fc15bb17618649e65b568e3e9260401633b7..2ed1fe9f97a8cbaeb7c15e060361e3905b940292 100644 (file)
@@ -30,29 +30,29 @@ public class Vala.CCodeMemberAccess : CCodeExpression {
         * The parent of the member.
         */
        public CCodeExpression inner { get; set; }
-       
+
        /**
         * The name of the member.
         */
        public string member_name { get; set; }
-       
+
        /**
         * Specifies whether the member access happens by pointer dereferencing.
         */
        public bool is_pointer { get; set; }
-       
+
        public CCodeMemberAccess (CCodeExpression container, string member, bool pointer = false) {
                inner = container;
                member_name = member;
                is_pointer = pointer;
        }
-       
+
        public CCodeMemberAccess.pointer (CCodeExpression container, string member) {
                inner = container;
                member_name = member;
                is_pointer = true;
        }
-       
+
        public override void write (CCodeWriter writer) {
                inner.write_inner (writer);
                if (is_pointer) {
index 10aa861cc8fa81771db5f1bf7056abb7bfc505eb..30b9a369e02d46b6ed2499401d2b107033b0a9c0 100644 (file)
@@ -30,11 +30,11 @@ public class Vala.CCodeOnceSection : CCodeFragment {
         * The name of the guarding define.
         */
        public string define { get; set; }
-       
+
        public CCodeOnceSection (string def) {
                define = def;
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_indent ();
                writer.write_string ("#ifndef ");
@@ -50,7 +50,7 @@ public class Vala.CCodeOnceSection : CCodeFragment {
                writer.write_string ("#endif");
                writer.write_newline ();
        }
-       
+
        public override void write_declaration (CCodeWriter writer) {
        }
 }
index 9f1c2e1864cfd9e3f3a2ee58d701a4d41cd9a507..b4bc749635dae3b4cee81fc522477b5fd0bd5dc3 100644 (file)
@@ -30,7 +30,7 @@ public class Vala.CCodeParameter : CCodeNode {
         * The parameter name.
         */
        public string name { get; set; }
-       
+
        /**
         * The parameter type.
         */
index 1fe28702fe8e658872a47d387454694628678d71..08b0807b6ce46ac25cfab50e043538b13a76cc84 100644 (file)
@@ -30,14 +30,14 @@ public class Vala.CCodeParenthesizedExpression : CCodeExpression {
         * The expression in the parenthesis.
         */
        public CCodeExpression inner { get; set; }
-       
+
        public CCodeParenthesizedExpression (CCodeExpression expr) {
                inner = expr;
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_string ("(");
-               
+
                inner.write (writer);
 
                writer.write_string (")");
index 15d91b6509b78e42a72d3edef2c0a3ef78ff0021..50be0ac7ffbd459732e09ad6b3af4c00b7104101 100644 (file)
@@ -30,15 +30,15 @@ public class Vala.CCodeReturnStatement : CCodeStatement {
         * The optional expression to return.
         */
        public CCodeExpression? return_expression { get; set; }
-       
+
        public CCodeReturnStatement (CCodeExpression? expr = null) {
                return_expression = expr;
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_indent (line);
                writer.write_string ("return");
-       
+
                if (return_expression != null) {
                        writer.write_string (" ");
                        return_expression.write (writer);
index fce7fcba8cad68e9b79abc9b1352ef9616967373..50af6a2bf0e479b9355dd4a06b0ad646445766e8 100644 (file)
@@ -34,11 +34,11 @@ public class Vala.CCodeStruct : CCodeNode {
        public bool is_empty { get { return declarations.size == 0; } }
 
        private List<CCodeDeclaration> declarations = new ArrayList<CCodeDeclaration> ();
-       
+
        public CCodeStruct (string name) {
                this.name = name;
        }
-       
+
        /**
         * Adds the specified declaration as member to this struct.
         *
@@ -47,7 +47,7 @@ public class Vala.CCodeStruct : CCodeNode {
        public void add_declaration (CCodeDeclaration decl) {
                declarations.add (decl);
        }
-       
+
        /**
         * Adds a variable with the specified type and name to this struct.
         *
@@ -60,7 +60,7 @@ public class Vala.CCodeStruct : CCodeNode {
                decl.modifiers = modifiers;
                add_declaration (decl);
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_string ("struct ");
                writer.write_string (name);
index 04edaf5f7c01e68ea23c300c167b0649165a547e..ba65342117c5799d14c444c13dc400b6f4a08ce5 100644 (file)
@@ -30,11 +30,11 @@ public class Vala.CCodeSwitchStatement : CCodeBlock {
         * The switch expression.
         */
        public CCodeExpression expression { get; set; }
-       
+
        public CCodeSwitchStatement (CCodeExpression expression) {
                this.expression = expression;
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_indent (line);
                writer.write_string ("switch (");
index 797c3baf056c361745f4c9498618a03cfb5c7cf4..f476ad12b1076e6c6c2c5e9199c445332e5985db 100644 (file)
@@ -30,7 +30,7 @@ public class Vala.CCodeTypeDefinition : CCodeNode {
         * The type name.
         */
        public string type_name { get; set; }
-       
+
        /**
         * The type declarator.
         */
@@ -40,18 +40,18 @@ public class Vala.CCodeTypeDefinition : CCodeNode {
                type_name = type;
                declarator = decl;
        }
-       
+
        public override void write (CCodeWriter writer) {
        }
-       
+
        public override void write_declaration (CCodeWriter writer) {
                writer.write_indent ();
                writer.write_string ("typedef ");
-               
+
                writer.write_string (type_name);
-               
+
                writer.write_string (" ");
-               
+
                declarator.write_declaration (writer);
 
                if (CCodeModifiers.DEPRECATED in modifiers) {
index afcb8c49405364cda0e170b19c87e5dccca1a25c..548e42181e8dc7cc3ec2472c83474f91210ccdb8 100644 (file)
@@ -30,17 +30,17 @@ public class Vala.CCodeUnaryExpression : CCodeExpression {
         * The unary operator.
         */
        public CCodeUnaryOperator operator { get; set; }
-       
+
        /**
         * The operand.
         */
        public CCodeExpression inner { get; set; }
-       
+
        public CCodeUnaryExpression (CCodeUnaryOperator op, CCodeExpression expr) {
                operator = op;
                inner = expr;
        }
-       
+
        public override void write (CCodeWriter writer) {
                switch (operator) {
                case CCodeUnaryOperator.PLUS: writer.write_string ("+"); inner.write_inner (writer); break;
index 43372bf6d8615032f32ccaaa2b21057bbc2d3572..17fa478a3d0ae8f3b59baec5fbae8bd5b33bce0e 100644 (file)
@@ -30,7 +30,7 @@ public class Vala.CCodeVariableDeclarator : CCodeDeclarator {
         * The variable name.
         */
        public string name { get; set; }
-       
+
        /**
         * The optional initializer expression.
         */
index c47a890716ad7c7c305e45f60c9dd0e581a13287..836806e010b7b49373ef110020498da2de94b19e 100644 (file)
@@ -30,17 +30,17 @@ public class Vala.CCodeWhileStatement : CCodeStatement {
         * The loop condition.
         */
        public CCodeExpression condition { get; set; }
-       
+
        /**
         * The loop body.
         */
        public CCodeStatement body { get; set; }
-       
+
        public CCodeWhileStatement (CCodeExpression cond, CCodeStatement? stmt = null) {
                condition = cond;
                body = stmt;
        }
-       
+
        public override void write (CCodeWriter writer) {
                writer.write_indent (line);
                writer.write_string ("while (");
index 0215e759019dfc746d94abdc5838dae5cb6a580b..26b284c4c9f9a5561f518dedaa318f904626c04c 100644 (file)
@@ -54,14 +54,14 @@ public class Vala.CCodeWriter {
        private bool file_exists;
 
        private FileStream? stream;
-       
+
        private int indent;
        private int current_line_number = 1;
        private bool using_line_directive;
 
        /* at begin of line */
        private bool _bol = true;
-       
+
        public CCodeWriter (string filename, string? source_filename = null) {
                this.filename = filename;
                this.source_filename = source_filename;
@@ -115,7 +115,7 @@ public class Vala.CCodeWriter {
         */
        public void close () {
                stream = null;
-               
+
                if (file_exists) {
                        var changed = true;
 
@@ -133,7 +133,7 @@ public class Vala.CCodeWriter {
                        } catch (FileError e) {
                                // assume changed if mmap comparison doesn't work
                        }
-                       
+
                        if (changed) {
                                FileUtils.rename (temp_filename, filename);
                        } else {
@@ -149,7 +149,7 @@ public class Vala.CCodeWriter {
                        }
                }
        }
-       
+
        /**
         * Writes tabs according to the current indent level.
         */
@@ -169,11 +169,11 @@ public class Vala.CCodeWriter {
                if (!_bol) {
                        write_newline ();
                }
-               
+
                stream.puts (string.nfill (indent, '\t'));
                _bol = false;
        }
-       
+
        /**
         * Writes n spaces.
         */
@@ -190,7 +190,7 @@ public class Vala.CCodeWriter {
                stream.puts (s);
                _bol = false;
        }
-       
+
        /**
         * Writes a newline.
         */
@@ -199,7 +199,7 @@ public class Vala.CCodeWriter {
                current_line_number++;
                _bol = true;
        }
-       
+
        /**
         * Opens a new block, increasing the indent level.
         */
@@ -213,18 +213,18 @@ public class Vala.CCodeWriter {
                write_newline ();
                indent++;
        }
-       
+
        /**
         * Closes the current block, decreasing the indent level.
         */
        public void write_end_block () {
                assert (indent > 0);
-               
+
                indent--;
                write_indent ();
                stream.putc ('}');
        }
-       
+
        /**
         * Writes the specified text as comment.
         *
index 13be80c3aa3428242a62fc80e85aca5428d231e4..39a98e45f703cafa2b892c3a0ee50a20e8b0c8e0 100644 (file)
@@ -75,12 +75,12 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
                                cexpr = new CCodeBinaryExpression (CCodeBinaryOperator.MUL, cexpr, csize);
                        }
                }
-               
+
                // add extra item to have array NULL-terminated for all reference types
                if (expr.element_type.data_type != null && expr.element_type.data_type.is_reference_type ()) {
                        cexpr = new CCodeBinaryExpression (CCodeBinaryOperator.PLUS, cexpr, new CCodeConstant ("1"));
                }
-               
+
                gnew.add_argument (cexpr);
 
                var temp_var = get_temp_variable (expr.value_type, true, expr);
@@ -732,7 +732,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
                        if (param.direction != ParameterDirection.IN) {
                                length_ctype = "%s*".printf (length_ctype);
                        }
-                       
+
                        for (int dim = 1; dim <= array_type.rank; dim++) {
                                var cparam = new CCodeParameter (get_parameter_array_length_cname (param, dim), length_ctype);
                                cparam_map.set (get_param_pos (get_ccode_array_length_pos (param) + 0.01 * dim), cparam);
index 5ff51e6f201b14525d033dd3c4c840101e3c1e0b..096426254806012b86ac64ab2ca0e3762a9d7d55 100644 (file)
@@ -235,7 +235,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
        public EmitContext base_finalize_context;
        public EmitContext instance_init_context;
        public EmitContext instance_finalize_context;
-       
+
        public CCodeStruct param_spec_struct;
        public CCodeStruct closure_struct;
        public CCodeEnum prop_enum;
@@ -251,7 +251,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
        public Set<string> predefined_marshal_set;
        /* (constant) hash table with all reserved identifiers in the generated code */
        Set<string> reserved_identifiers;
-       
+
        public int next_temp_var_id {
                get { return emit_context.next_temp_var_id; }
                set { emit_context.next_temp_var_id = value; }
@@ -325,7 +325,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
        public bool in_plugin = false;
        public string module_init_param_name;
-       
+
        public bool gvaluecollector_h_needed;
        public bool requires_assert;
        public bool requires_array_free;
@@ -718,11 +718,11 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
        public override void visit_source_file (SourceFile source_file) {
                cfile = new CCodeFile ();
-               
+
                user_marshal_set = new HashSet<string> (str_hash, str_equal);
-               
+
                next_regex_id = 0;
-               
+
                gvaluecollector_h_needed = false;
                requires_assert = false;
                requires_array_free = false;
@@ -1127,13 +1127,13 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                var rhs = get_cvalue (f.initializer);
                                if (!is_simple_struct_creation (f, f.initializer)) {
                                        // otherwise handled in visit_object_creation_expression
-                                       
+
                                        ccode.add_assignment (lhs, rhs);
-                                       
+
                                        if (f.variable_type is ArrayType && get_ccode_array_length (f)) {
                                                var array_type = (ArrayType) f.variable_type;
                                                var field_value = get_field_cvalue (f, load_this_parameter ((TypeSymbol) f.parent_symbol));
-                                               
+
                                                var glib_value = (GLibValue) f.initializer.target_value;
                                                if (glib_value.array_length_cvalues != null) {
                                                        for (int dim = 1; dim <= array_type.rank; dim++) {
@@ -1144,14 +1144,14 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                                        requires_array_length = true;
                                                        var len_call = new CCodeFunctionCall (new CCodeIdentifier ("_vala_array_length"));
                                                        len_call.add_argument (get_cvalue_ (glib_value));
-                                                       
+
                                                        ccode.add_assignment (get_array_length_cvalue (field_value, 1), len_call);
                                                } else {
                                                        for (int dim = 1; dim <= array_type.rank; dim++) {
                                                                ccode.add_assignment (get_array_length_cvalue (field_value, dim), new CCodeConstant ("-1"));
                                                        }
                                                }
-                                               
+
                                                if (array_type.rank == 1 && f.is_internal_symbol ()) {
                                                        var lhs_array_size = get_array_size_cvalue (field_value);
                                                        var rhs_array_len = get_array_length_cvalue (field_value, 1);
@@ -1178,7 +1178,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
                                pop_context ();
                        }
-                       
+
                        if (requires_destroy (f.variable_type) && instance_finalize_context != null) {
                                push_context (instance_finalize_context);
                                ccode.add_expression (destroy_field (f, load_this_parameter ((TypeSymbol) f.parent_symbol)));
@@ -2094,7 +2094,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                        var unref_fun = new CCodeFunction ("block%d_data_unref".printf (block_id), "void");
                        unref_fun.add_parameter (new CCodeParameter ("_userdata_", "void *"));
                        unref_fun.modifiers = CCodeModifiers.STATIC;
-                       
+
                        push_function (unref_fun);
 
                        ccode.add_declaration (struct_name + "*", new CCodeVariableDeclarator ("_data%d_".printf (block_id), new CCodeCastExpression (new CCodeIdentifier ("_userdata_"), struct_name + "*")));
@@ -2604,7 +2604,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                }
 
                next_temp_var_id++;
-               
+
                return local;
        }
 
@@ -3140,7 +3140,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                        generic_elements = (type_arg is GenericType);
                                }
                        }
-                       
+
                        if (elements_require_free) {
                                CCodeExpression? cexpr = null;
                                if (element_destroy_func_expression is CCodeIdentifier || element_destroy_func_expression is CCodeMemberAccess) {
@@ -3448,7 +3448,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                }
 
                /* (foo == NULL ? NULL : foo = (unref (foo), NULL)) */
-               
+
                /* can be simplified to
                 * foo = (unref (foo), NULL)
                 * if foo is of static type non-null
@@ -3511,10 +3511,10 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                }
                        }
                }
-               
+
                ccomma.append_expression (ccall);
                ccomma.append_expression (new CCodeConstant ("NULL"));
-               
+
                var cassign = new CCodeAssignment (cvar, ccomma);
 
                // g_free (NULL) is allowed
@@ -3526,7 +3526,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
                return new CCodeConditionalExpression (cisnull, new CCodeConstant ("NULL"), cassign);
        }
-       
+
        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
@@ -3551,7 +3551,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
                temp_ref_values.clear ();
        }
-       
+
        public void emit_temp_var (LocalVariable local) {
                var init = (!local.name.has_prefix ("*") && local.init);
                if (is_in_coroutine ()) {
@@ -3857,7 +3857,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                var inner_node = ((MemberAccess)resource).inner;
                var member = resource.symbol_reference;
                var parent = (TypeSymbol)resource.symbol_reference.parent_symbol;
-               
+
                if (member.is_instance_member ()) {
                        if (inner_node  == null) {
                                l = new CCodeIdentifier ("self");
@@ -3888,7 +3888,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                }
                return l;
        }
-               
+
        public override void visit_lock_statement (LockStatement stmt) {
                var l = get_lock_expression (stmt, stmt.resource);
 
@@ -3897,13 +3897,13 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
                ccode.add_expression (fc);
        }
-               
+
        public override void visit_unlock_statement (UnlockStatement stmt) {
                var l = get_lock_expression (stmt, stmt.resource);
-               
+
                var fc = new CCodeFunctionCall (new CCodeIdentifier (get_ccode_name (mutex_type.scope.lookup ("unlock"))));
                fc.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, l));
-               
+
                ccode.add_expression (fc);
        }
 
@@ -4156,17 +4156,17 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                // return previous value
                expr.target_value = temp_value;
        }
-       
+
        private MemberAccess? find_property_access (Expression expr) {
                if (!(expr is MemberAccess)) {
                        return null;
                }
-               
+
                var ma = (MemberAccess) expr;
                if (ma.symbol_reference is Property) {
                        return ma;
                }
-               
+
                return null;
        }
 
@@ -4310,7 +4310,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                 * ref (expr)
                 * if static type of expr is non-null
                 */
-                
+
                var dupexpr = get_dup_func_expression (type, node.source_reference);
 
                if (dupexpr == null) {
@@ -4358,7 +4358,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                if (!(type is ArrayType) && get_non_null (value) && !is_ref_function_void (type)) {
                        // expression is non-null
                        ccall.add_argument (cexpr);
-                       
+
                        return store_temp_value (new GLibValue (type, ccall), node);
                } else {
                        var cnotnull = new CCodeBinaryExpression (CCodeBinaryOperator.INEQUALITY, cexpr, new CCodeConstant ("NULL"));
@@ -4775,14 +4775,14 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                        cexpr = handle_struct_argument (null, arg, cexpr);
                                        arg_pos = get_param_pos (i, ellipsis);
                                }
-                       
+
                                carg_map.set (arg_pos, cexpr);
 
                                i++;
                        }
                        if (params_it.next ()) {
                                var param = params_it.get ();
-                               
+
                                /* if there are more parameters than arguments,
                                 * the additional parameter is an ellipsis parameter
                                 * otherwise there is a bug in the semantic analyzer
@@ -5315,7 +5315,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                        }
                }
        }
-       
+
        public override void visit_named_argument (NamedArgument expr) {
                set_cvalue (expr, get_cvalue (expr.inner));
        }
@@ -5363,7 +5363,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                        }
                } else {
                        ccode.add_assignment (get_cvalue (expr.inner), new CCodeConstant ("NULL"));
-               }                       
+               }
        }
 
        public override void visit_binary_expression (BinaryExpression expr) {
@@ -5459,7 +5459,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                } else {
                        assert_not_reached ();
                }
-               
+
                if (expr.operator == BinaryOperator.EQUALITY ||
                    expr.operator == BinaryOperator.INEQUALITY) {
                        var left_type = expr.left.target_type;
@@ -5904,7 +5904,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                array_needs_copy = requires_copy (target_array.element_type);
                        }
                }
-               
+
                if (!gvalue_boxing && !gvariant_boxing && target_type.value_owned && (!type.value_owned || boxing || unboxing || array_needs_copy) && requires_copy (target_type) && !(type is NullType)) {
                        // need to copy value
                        var copy = (GLibValue) copy_value (result, node);
@@ -5964,7 +5964,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                var base_class = (Class) prop.base_property.parent_symbol;
                                var vcast = new CCodeFunctionCall (new CCodeIdentifier ("%s_CLASS".printf (get_ccode_upper_case_name (base_class, null))));
                                vcast.add_argument (new CCodeIdentifier ("%s_parent_class".printf (get_ccode_lower_case_name (current_class, null))));
-                               
+
                                var ccall = new CCodeFunctionCall (new CCodeMemberAccess.pointer (vcast, "set_%s".printf (prop.name)));
                                ccall.add_argument ((CCodeExpression) get_ccodenode (instance));
                                var cexpr = get_cvalue_ (value);
@@ -5992,7 +5992,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                }
 
                var set_func = "g_object_set";
-               
+
                var base_property = prop;
                if (!get_ccode_no_accessor_method (prop)) {
                        if (prop.base_property != null) {
@@ -6016,7 +6016,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                }
                        }
                }
-               
+
                var ccall = new CCodeFunctionCall (new CCodeIdentifier (set_func));
 
                if (prop.binding == MemberBinding.INSTANCE) {
@@ -6135,7 +6135,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                }
                return null;
        }
-       
+
        private void create_property_type_check_statement (Property prop, bool check_return_type, TypeSymbol t, bool non_null, string var_name) {
                if (check_return_type) {
                        create_type_check_statement (prop, prop.property_type, t, non_null, var_name);
index 91268e7d1112595b55fca5bd6efd32a77255a06e..6b5505b12b6f61d08796def8c523a408a0ed47d9 100644 (file)
@@ -145,7 +145,7 @@ public abstract class Vala.CCodeControlFlowModule : CCodeMethodModule {
 
                        n++;
                }
-       
+
                if (default_section != null) {
                        if (n > 0) {
                                ccode.add_else ();
@@ -228,7 +228,7 @@ public abstract class Vala.CCodeControlFlowModule : CCodeMethodModule {
 
                visit_local_variable (collection_backup);
                ccode.add_assignment (get_variable_cexpression (get_local_cname (collection_backup)), get_cvalue (stmt.collection));
-               
+
                if (stmt.tree_can_fail && stmt.collection.tree_can_fail) {
                        // exception handling
                        add_simple_check (stmt.collection);
@@ -245,7 +245,7 @@ public abstract class Vala.CCodeControlFlowModule : CCodeMethodModule {
                        var iterator_variable = new LocalVariable (int_type.copy (), stmt.variable_name + "_it");
                        visit_local_variable (iterator_variable);
                        var it_name = get_local_cname (iterator_variable);
-               
+
                        var ccond = new CCodeBinaryExpression (CCodeBinaryOperator.LESS_THAN, get_variable_cexpression (it_name), array_len);
 
                        ccode.open_for (new CCodeAssignment (get_variable_cexpression (it_name), new CCodeConstant ("0")),
@@ -278,7 +278,7 @@ public abstract class Vala.CCodeControlFlowModule : CCodeMethodModule {
                        var iterator_variable = new LocalVariable (collection_type.copy (), stmt.variable_name + "_it");
                        visit_local_variable (iterator_variable);
                        var it_name = get_local_cname (iterator_variable);
-                       
+
                        var ccond = new CCodeBinaryExpression (CCodeBinaryOperator.INEQUALITY, get_variable_cexpression (it_name), new CCodeConstant ("NULL"));
 
                        ccode.open_for (new CCodeAssignment (get_variable_cexpression (it_name), get_variable_cexpression (get_local_cname (collection_backup))),
index 13a40256826ede712a868f8eb458ba8f66256b46..82202c97a77713b020b4b1dac74ef89478dce36e 100644 (file)
@@ -60,12 +60,12 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule {
                        // handle array parameters
                        if (get_ccode_array_length (param) && param.variable_type is ArrayType) {
                                var array_type = (ArrayType) param.variable_type;
-                               
+
                                var length_ctype = "int";
                                if (param.direction != ParameterDirection.IN) {
                                        length_ctype = "int*";
                                }
-                               
+
                                for (int dim = 1; dim <= array_type.rank; dim++) {
                                        cparam = new CCodeParameter (get_parameter_array_length_cname (param, dim), length_ctype);
                                        cfundecl.add_parameter (cparam);
index f4eae3ceeb2ecf035ae3a1936132a90db40cbc52..71702a9c10ec11fc1adf17feff5fc02c9d24cdfa 100644 (file)
@@ -25,7 +25,7 @@
 public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
        public override void visit_member_access (MemberAccess expr) {
                CCodeExpression pub_inst = null;
-       
+
                if (expr.inner != null) {
                        pub_inst = get_cvalue (expr.inner);
                }
@@ -53,7 +53,7 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
                                        var base_class = (Class) m.base_method.parent_symbol;
                                        var vcast = new CCodeFunctionCall (new CCodeIdentifier ("%s_CLASS".printf (get_ccode_upper_case_name (base_class, null))));
                                        vcast.add_argument (new CCodeIdentifier ("%s_parent_class".printf (get_ccode_lower_case_name (current_class, null))));
-                                       
+
                                        set_cvalue (expr, new CCodeMemberAccess.pointer (vcast, get_ccode_vfunc_name (m)));
                                        return;
                                } else if (m.base_interface_method != null) {
@@ -181,7 +181,7 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
                                        var base_class = (Class) base_prop.parent_symbol;
                                        var vcast = new CCodeFunctionCall (new CCodeIdentifier ("%s_CLASS".printf (get_ccode_upper_case_name (base_class, null))));
                                        vcast.add_argument (new CCodeIdentifier ("%s_parent_class".printf (get_ccode_lower_case_name (current_class, null))));
-                                       
+
                                        var ccall = new CCodeFunctionCall (new CCodeMemberAccess.pointer (vcast, "get_%s".printf (prop.name)));
                                        ccall.add_argument (get_cvalue (expr.inner));
                                        if (prop.property_type.is_real_non_null_struct_type ()) {
index 6ab1597bb758485aedca5f89ec08f7967b9dbea4..65b455fa5d5e49d0766338d46d69c2a708371751 100644 (file)
@@ -35,12 +35,12 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
                Method m = null;
                Delegate deleg = null;
                List<Parameter> params;
-               
+
                var ma = expr.call as MemberAccess;
-               
+
                var itype = expr.call.value_type;
                params = itype.get_parameters ();
-               
+
                if (itype is MethodType) {
                        assert (ma != null);
                        m = ((MethodType) itype).method_symbol;
@@ -238,7 +238,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
                } else if (m != null && m.binding == MemberBinding.CLASS) {
                        var cl = (Class) m.parent_symbol;
                        var cast = new CCodeFunctionCall (new CCodeIdentifier (get_ccode_upper_case_name (cl, null) + "_CLASS"));
-                       
+
                        CCodeExpression klass;
                        if (ma.inner == null) {
                                if (get_this_type () == null) {
@@ -335,7 +335,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
                }
 
                bool ellipsis = false;
-               
+
                int i = 1;
                int arg_pos;
                Iterator<Parameter> params_it = params.iterator ();
@@ -675,7 +675,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
                }
 
                // append C arguments in the right order
-               
+
                int last_pos;
                int min_pos;
 
@@ -838,7 +838,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
                params_it = params.iterator ();
                foreach (Expression arg in expr.get_argument_list ()) {
                        Parameter param = null;
-                       
+
                        if (params_it.next ()) {
                                param = params_it.get ();
                                if (param.params_array || param.ellipsis) {
@@ -865,7 +865,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
                                requires_array_length = true;
                                var len_call = new CCodeFunctionCall (new CCodeIdentifier ("_vala_array_length"));
                                len_call.add_argument (get_cvalue_ (unary.inner.target_value));
-                               
+
                                ccode.add_assignment (get_array_length_cvalue (unary.inner.target_value, 1), len_call);
                        }
                }
index 1b9c677a38427dd0d55b94e22618ab46bc278115..8caaef34783e339f59be724a135058f7b61cdb02 100644 (file)
@@ -1103,7 +1103,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
                                vcast = new CCodeIdentifier ("self");
                        }
                }
-       
+
                cname = get_ccode_vfunc_name (m);
                if (suffix == "_finish" && cname.has_suffix ("_async")) {
                        cname = cname.substring (0, cname.length - "_async".length);
@@ -1202,7 +1202,7 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
                                return;
                        }
                }
-               
+
                ccode.add_expression (ccheck);
        }
 
index dcff2ed6323d3477e558599b52c1a724bcbc3bb1..b4906d5de7626ecfddef8247f691bb7fd5396fa0 100644 (file)
@@ -40,11 +40,11 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction {
        public ClassRegisterFunction (Class cl) {
                class_reference = cl;
        }
-       
+
        public override TypeSymbol get_type_declaration () {
                return class_reference;
        }
-       
+
        public override string get_type_struct_name () {
                return "%sClass".printf (get_ccode_name (class_reference));
        }
@@ -76,15 +76,15 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction {
        public override string get_class_init_func_name () {
                return "%s_class_init".printf (get_ccode_lower_case_name (class_reference, null));
        }
-       
+
        public override string get_instance_struct_size () {
                return "sizeof (%s)".printf (get_ccode_name (class_reference));
        }
-       
+
        public override string get_instance_init_func_name () {
                return "%s_instance_init".printf (get_ccode_lower_case_name (class_reference, null));
        }
-       
+
        public override string get_parent_type_name () {
                return get_ccode_type_id (class_reference.base_class);
        }
@@ -151,22 +151,22 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction {
 
        public override CCodeFragment get_type_interface_init_declaration () {
                var frag = new CCodeFragment ();
-               
+
                foreach (DataType base_type in class_reference.get_base_types ()) {
                        if (!(base_type.data_type is Interface)) {
                                continue;
                        }
-                       
+
                        var iface = (Interface) base_type.data_type;
-                       
+
                        var iface_info_name = "%s_info".printf (get_ccode_lower_case_name (iface, null));
-                       
+
                        var ctypedecl = new CCodeDeclaration ("const GInterfaceInfo");
                        ctypedecl.modifiers = CCodeModifiers.STATIC;
                        ctypedecl.add_declarator (new CCodeVariableDeclarator (iface_info_name, new CCodeConstant ("{ (GInterfaceInitFunc) %s_%s_interface_init, (GInterfaceFinalizeFunc) NULL, NULL}".printf (get_ccode_lower_case_name (class_reference), get_ccode_lower_case_name (iface)))));
                        frag.append (ctypedecl);
                }
-               
+
                return frag;
        }
 
@@ -175,9 +175,9 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction {
                        if (!(base_type.data_type is Interface)) {
                                continue;
                        }
-                       
+
                        var iface = (Interface) base_type.data_type;
-                       
+
                        var iface_info_name = "%s_info".printf (get_ccode_lower_case_name (iface, null));
                        if (!plugin) {
                                var reg_call = new CCodeFunctionCall (new CCodeIdentifier ("g_type_add_interface_static"));
@@ -194,7 +194,7 @@ public class Vala.ClassRegisterFunction : TypeRegisterFunction {
                                block.add_statement (new CCodeExpressionStatement (reg_call));
                        }
                }
-               
+
                ((CCodeBaseModule) context.codegen).register_dbus_info (block, class_reference);
        }
 }
index bd814f08e40b794d6e080c08416b976fe49915fb..d0de350524523c5ecb683dd2ac82dea6c69652a1 100644 (file)
@@ -1090,7 +1090,7 @@ public class Vala.GIRWriter : CodeVisitor {
                write_indent ();
                buffer.append_printf ("</%s>\n", tag_name);
        }
-       
+
        public override void visit_creation_method (CreationMethod m) {
                if (m.external_package) {
                        return;
@@ -1194,7 +1194,7 @@ public class Vala.GIRWriter : CodeVisitor {
                if (sig.emitter != null) {
                        sig.emitter.accept (this);
                }
-               
+
                write_indent ();
                buffer.append_printf ("<glib:signal name=\"%s\"", get_ccode_name (sig));
                write_symbol_attributes (sig);
@@ -1214,7 +1214,7 @@ public class Vala.GIRWriter : CodeVisitor {
 
        private void write_indent () {
                int i;
-               
+
                for (i = 0; i < indent; i++) {
                        buffer.append_c ('\t');
                }
index d039a867c358c0a998f72aa846e0faabf6d8eace..82eba077421bfc986e96ec643e69f1e0518ef40e 100644 (file)
@@ -58,7 +58,7 @@ public class Vala.GObjectModule : GTypeModule {
                if (class_has_writable_properties (cl) || cl.get_type_parameters ().size > 0) {
                        ccode.add_assignment (new CCodeMemberAccess.pointer (ccall, "set_property"), new CCodeIdentifier ("_vala_%s_set_property".printf (get_ccode_lower_case_name (cl, null))));
                }
-       
+
                /* set constructor */
                if (cl.constructor != null) {
                        var ccast = new CCodeFunctionCall (new CCodeIdentifier ("G_OBJECT_CLASS"));
@@ -192,7 +192,7 @@ public class Vala.GObjectModule : GTypeModule {
                get_prop.add_parameter (new CCodeParameter ("pspec", "GParamSpec *"));
 
                push_function (get_prop);
-               
+
                CCodeFunctionCall ccall = generate_instance_cast (new CCodeIdentifier ("object"), cl);
                ccode.add_declaration ("%s *".printf (get_ccode_name (cl)), new CCodeVariableDeclarator ("self", ccall));
 
@@ -290,7 +290,7 @@ public class Vala.GObjectModule : GTypeModule {
                cfile.add_function_declaration (get_prop);
                cfile.add_function (get_prop);
        }
-       
+
        private void add_set_property_function (Class cl) {
                var set_prop = new CCodeFunction ("_vala_%s_set_property".printf (get_ccode_lower_case_name (cl, null)), "void");
                set_prop.modifiers = CCodeModifiers.STATIC;
@@ -300,7 +300,7 @@ public class Vala.GObjectModule : GTypeModule {
                set_prop.add_parameter (new CCodeParameter ("pspec", "GParamSpec *"));
 
                push_function (set_prop);
-               
+
                CCodeFunctionCall ccall = generate_instance_cast (new CCodeIdentifier ("object"), cl);
                ccode.add_declaration ("%s *".printf (get_ccode_name (cl)), new CCodeVariableDeclarator ("self", ccall));
 
@@ -442,11 +442,11 @@ public class Vala.GObjectModule : GTypeModule {
 
                        var function = new CCodeFunction ("%s_constructor".printf (get_ccode_lower_case_name (cl, null)), "GObject *");
                        function.modifiers = CCodeModifiers.STATIC;
-               
+
                        function.add_parameter (new CCodeParameter ("type", "GType"));
                        function.add_parameter (new CCodeParameter ("n_construct_properties", "guint"));
                        function.add_parameter (new CCodeParameter ("construct_properties", "GObjectConstructParam *"));
-               
+
                        cfile.add_function_declaration (function);
 
                        push_function (function);
@@ -705,7 +705,7 @@ public class Vala.GObjectModule : GTypeModule {
                                        inst_ma.target_value = new GLibValue (get_data_type_for_symbol ((Class) prop.parent_symbol), new CCodeIdentifier ("self"), true);
                                        store_property (prop, inst_ma, prop.initializer.target_value);
 
-                                       temp_ref_values.clear ();                       
+                                       temp_ref_values.clear ();
                                        pop_context ();
                                }
                        }
index 4f99941d6f91031e36bebe89bd01981bcaa15620..7bf71f344bc5ad8963ffb00e145c355a89433d60 100644 (file)
@@ -35,9 +35,9 @@ public class Vala.GSignalModule : GObjectModule {
                                prefix = "g_cclosure_user_marshal";
                        }
                }
-               
+
                ret = "%s_%s_".printf (prefix, get_ccode_marshaller_type_name (return_type));
-               
+
                if (params == null || params.size == 0) {
                        ret = ret + "_VOID";
                } else {
@@ -45,10 +45,10 @@ public class Vala.GSignalModule : GObjectModule {
                                ret = "%s_%s".printf (ret, get_ccode_marshaller_type_name (p).replace (",", "_"));
                        }
                }
-               
+
                return ret;
        }
-       
+
        private string? get_value_type_name_from_type_reference (DataType t) {
                if (t is PointerType || t is GenericType) {
                        return "gpointer";
@@ -74,10 +74,10 @@ public class Vala.GSignalModule : GObjectModule {
                } else if (t is ErrorType) {
                        return "gpointer";
                }
-               
+
                return null;
        }
-       
+
        private string? get_value_type_name_from_parameter (Parameter p) {
                if (p.direction != ParameterDirection.IN) {
                        return "gpointer";
@@ -85,10 +85,10 @@ public class Vala.GSignalModule : GObjectModule {
                        return get_value_type_name_from_type_reference (p.variable_type);
                }
        }
-       
+
        private string get_marshaller_signature (List<Parameter> params, DataType return_type) {
                string signature;
-               
+
                signature = "%s:".printf (get_ccode_marshaller_type_name (return_type));
                if (params == null || params.size == 0) {
                        signature = signature + "VOID";
@@ -103,7 +103,7 @@ public class Vala.GSignalModule : GObjectModule {
                                }
                        }
                }
-               
+
                return signature;
        }
 
@@ -198,16 +198,16 @@ public class Vala.GSignalModule : GObjectModule {
        void generate_marshaller (List<Parameter> params, DataType return_type) {
                string signature;
                int n_params, i;
-               
+
                /* check whether a signal with the same signature already exists for this source file (or predefined) */
                signature = get_marshaller_signature (params, return_type);
                if (predefined_marshal_set.contains (signature) || user_marshal_set.contains (signature)) {
                        return;
                }
-               
+
                var signal_marshaller = new CCodeFunction (get_marshaller_function (params, return_type, null), "void");
                signal_marshaller.modifiers = CCodeModifiers.STATIC;
-               
+
                signal_marshaller.add_parameter (new CCodeParameter ("closure", "GClosure *"));
                signal_marshaller.add_parameter (new CCodeParameter ("return_value", "GValue *"));
                signal_marshaller.add_parameter (new CCodeParameter ("n_param_values", "guint"));
@@ -244,7 +244,7 @@ public class Vala.GSignalModule : GObjectModule {
 
                if (return_type.data_type != null || return_type.is_array ()) {
                        ccode.add_declaration (get_value_type_name_from_type_reference (return_type), new CCodeVariableDeclarator ("v_return"));
-                       
+
                        fc = new CCodeFunctionCall (new CCodeIdentifier ("g_return_if_fail"));
                        fc.add_argument (new CCodeBinaryExpression (CCodeBinaryOperator.INEQUALITY, new CCodeIdentifier ("return_value"), new CCodeConstant ("NULL")));
                        ccode.add_expression (fc);
@@ -268,7 +268,7 @@ public class Vala.GSignalModule : GObjectModule {
 
                var c_assign_rhs =  new CCodeCastExpression (new CCodeConditionalExpression (new CCodeIdentifier ("marshal_data"), new CCodeIdentifier ("marshal_data"), new CCodeMemberAccess (new CCodeIdentifier ("cc"), "callback", true)), get_marshaller_function (params, return_type, "GMarshalFunc"));
                ccode.add_assignment (new CCodeIdentifier ("callback"), c_assign_rhs);
-               
+
                fc = new CCodeFunctionCall (new CCodeIdentifier ("callback"));
                fc.add_argument (new CCodeIdentifier ("data1"));
                i = 1;
@@ -306,10 +306,10 @@ public class Vala.GSignalModule : GObjectModule {
                        }
                }
                fc.add_argument (new CCodeIdentifier ("data2"));
-               
+
                if (return_type.data_type != null || return_type.is_array ()) {
                        ccode.add_assignment (new CCodeIdentifier ("v_return"), fc);
-                       
+
                        CCodeFunctionCall set_fc;
                        if (return_type.is_array ()) {
                                if (((ArrayType) return_type).element_type.data_type == string_type.data_type) {
@@ -332,14 +332,14 @@ public class Vala.GSignalModule : GObjectModule {
                        }
                        set_fc.add_argument (new CCodeIdentifier ("return_value"));
                        set_fc.add_argument (new CCodeIdentifier ("v_return"));
-                       
+
                        ccode.add_expression (set_fc);
                } else {
                        ccode.add_expression (fc);
                }
-               
+
                pop_function ();
-               
+
                cfile.add_function_declaration (signal_marshaller);
                cfile.add_function (signal_marshaller);
                user_marshal_set.add (signature);
@@ -530,20 +530,20 @@ public class Vala.GSignalModule : GObjectModule {
        public override void visit_member_access (MemberAccess expr) {
                if (expr.symbol_reference is Signal) {
                        CCodeExpression pub_inst = null;
-       
+
                        if (expr.inner != null) {
                                pub_inst = get_cvalue (expr.inner);
                        }
 
                        var sig = (Signal) expr.symbol_reference;
                        var cl = (TypeSymbol) sig.parent_symbol;
-                       
+
                        if (expr.inner is BaseAccess && sig.is_virtual) {
                                var m = sig.default_handler;
                                var base_class = (Class) m.parent_symbol;
                                var vcast = new CCodeFunctionCall (new CCodeIdentifier ("%s_CLASS".printf (get_ccode_upper_case_name (base_class, null))));
                                vcast.add_argument (new CCodeIdentifier ("%s_parent_class".printf (get_ccode_lower_case_name (current_class))));
-                               
+
                                set_cvalue (expr, new CCodeMemberAccess.pointer (vcast, m.name));
                                return;
                        }
@@ -574,7 +574,7 @@ public class Vala.GSignalModule : GObjectModule {
                                ccall.add_argument (pub_inst);
 
                                ccall.add_argument (get_signal_canonical_constant (sig));
-                               
+
                                set_cvalue (expr, ccall);
                        }
                } else {
index 5d3299d5fc8cfc8a3bce8ac52ea5f0dbf2cceeb5..309d1378eb38676fe52284c84c7d4a941232e898 100644 (file)
@@ -193,7 +193,7 @@ public class Vala.GtkModule : GSignalModule {
                                                // detailed signal, we don't care about the detail
                                                signal_name = signal_name.substring (0, sep_idx);
                                        }
-                                       
+
                                        var sig = SemanticAnalyzer.symbol_lookup_inherited (current_class, signal_name.replace ("-", "_")) as Signal;
                                        if (sig != null) {
                                                current_handler_to_signal_map.set (handler_name, sig);
@@ -326,7 +326,7 @@ public class Vala.GtkModule : GSignalModule {
                ccode.add_expression (call);
 
                pop_context ();
-               
+
                if (!field_class.external && !field_class.external_package) {
                        current_required_app_classes.add (field_class);
                }
@@ -387,7 +387,7 @@ public class Vala.GtkModule : GSignalModule {
                        call.add_argument (get_type_id_expression (SemanticAnalyzer.get_data_type_for_symbol (req)));
                        ccode.add_expression (call);
                }
-               
+
                var call = new CCodeFunctionCall (new CCodeIdentifier ("gtk_widget_init_template"));
                call.add_argument (new CCodeIdentifier ("GTK_WIDGET (self)"));
                ccode.add_expression (call);
index 7a4dcabdf5b055f390679765e3e843e55a22dcb9..3e553ec7e5d44490ff9b900abf473d952396d069 100644 (file)
@@ -720,7 +720,7 @@ public class Vala.GTypeModule : GErrorModule {
                                        add_interface_init_function (cl, (Interface) base_type.data_type);
                                }
                        }
-                       
+
                        add_instance_init_function (cl);
 
                        if (!cl.is_compact && (cl.get_fields ().size > 0 || cl.destructor != null || cl.is_fundamental ())) {
@@ -830,7 +830,7 @@ public class Vala.GTypeModule : GErrorModule {
                function.modifiers = CCodeModifiers.STATIC;
 
                push_function (function);
-               
+
                var vpointer = new CCodeMemberAccess(new CCodeMemberAccess.pointer (new CCodeIdentifier ("value"), "data[0]"),"v_pointer");
                var ccall = new CCodeFunctionCall (new CCodeIdentifier ("%sunref".printf (get_ccode_lower_case_prefix (cl))));
                ccall.add_argument (vpointer);
@@ -1236,7 +1236,7 @@ public class Vala.GTypeModule : GErrorModule {
                func.modifiers = CCodeModifiers.STATIC;
 
                CCodeFunctionCall ccall;
-               
+
                /* save pointer to parent class */
                var parent_decl = new CCodeDeclaration ("gpointer");
                var parent_var_decl = new CCodeVariableDeclarator ("%s_parent_class".printf (get_ccode_lower_case_name (cl, null)));
@@ -1251,7 +1251,7 @@ public class Vala.GTypeModule : GErrorModule {
                ccall.add_argument (new CCodeIdentifier ("klass"));
                var parent_assignment = new CCodeAssignment (new CCodeIdentifier ("%s_parent_class".printf (get_ccode_lower_case_name (cl, null))), ccall);
                ccode.add_expression (parent_assignment);
-               
+
 
                if (!cl.is_compact && !cl.is_subtype_of (gobject_type) && (cl.get_fields ().size > 0 || cl.destructor != null || cl.is_fundamental ())) {
                        // set finalize function
@@ -1310,7 +1310,7 @@ public class Vala.GTypeModule : GErrorModule {
                                continue;
                        }
                        var base_type = prop.base_property.parent_symbol;
-                       
+
                        var ccast = new CCodeFunctionCall (new CCodeIdentifier ("%s_CLASS".printf (get_ccode_upper_case_name (base_type))));
                        ccast.add_argument (new CCodeIdentifier ("klass"));
 
@@ -1344,7 +1344,7 @@ public class Vala.GTypeModule : GErrorModule {
        private void add_class_init_function (Class cl) {
                cfile.add_function (class_init_context.ccode);
        }
-       
+
        private void add_generic_accessor_function (string base_name, string return_type, CCodeExpression? expression, TypeParameter p, Class cl, Interface iface) {
                string name = "%s_%s_%s".printf (get_ccode_lower_case_name (cl), get_ccode_lower_case_name (iface), base_name);
 
@@ -1372,9 +1372,9 @@ public class Vala.GTypeModule : GErrorModule {
                iface_init.modifiers = CCodeModifiers.STATIC;
 
                push_function (iface_init);
-               
+
                CCodeFunctionCall ccall;
-               
+
                /* save pointer to parent vtable */
                string parent_iface_var = "%s_%s_parent_iface".printf (get_ccode_lower_case_name (cl), get_ccode_lower_case_name (iface));
                var parent_decl = new CCodeDeclaration ("%s *".printf (get_ccode_type_name (iface)));
@@ -1396,7 +1396,7 @@ public class Vala.GTypeModule : GErrorModule {
                        if (base_type != iface) {
                                continue;
                        }
-                       
+
                        var ciface = new CCodeIdentifier ("iface");
                        CCodeExpression cfunc;
                        if (m.is_abstract || m.is_virtual) {
@@ -1478,7 +1478,7 @@ public class Vala.GTypeModule : GErrorModule {
                        if (base_type != iface) {
                                continue;
                        }
-                       
+
                        var ciface = new CCodeIdentifier ("iface");
 
                        if (!get_ccode_no_accessor_method (prop.base_interface_property) && !get_ccode_concrete_accessor (prop.base_interface_property)) {
@@ -1683,7 +1683,7 @@ public class Vala.GTypeModule : GErrorModule {
                push_context (instance_init_context);
                end_instance_init (cl);
                pop_context ();
-               
+
                cfile.add_function (instance_init_context.ccode);
        }
 
@@ -2001,7 +2001,7 @@ public class Vala.GTypeModule : GErrorModule {
                } else {
                        cspec.call = new CCodeIdentifier ("g_param_spec_pointer");
                }
-               
+
                var pflags = "G_PARAM_STATIC_STRINGS";
                if (prop.get_accessor != null && prop.get_accessor.access != SymbolAccessibility.PRIVATE) {
                        pflags = "%s%s".printf (pflags, " | G_PARAM_READABLE");
@@ -2044,7 +2044,7 @@ public class Vala.GTypeModule : GErrorModule {
                }
 
                var type_struct = new CCodeStruct ("_%s".printf (get_ccode_type_name (iface)));
-               
+
                decl_space.add_type_declaration (new CCodeNewline ());
                var macro = "(%s_get_type ())".printf (get_ccode_lower_case_name (iface, null));
                decl_space.add_type_declaration (new CCodeMacroReplacement (get_ccode_type_id (iface), macro));
index bca03f12cb0ba2bc7b158fb9becca78dc53cc0a4..79c29fdb19e9d3f0a88bbcd30c1d82ab654541f3 100644 (file)
@@ -431,7 +431,7 @@ public class Vala.GVariantModule : GAsyncModule {
                        hash_table_new.add_argument (new CCodeIdentifier ("g_direct_hash"));
                        hash_table_new.add_argument (new CCodeIdentifier ("g_direct_equal"));
                }
-               
+
                if (key_type.data_type.is_subtype_of (string_type.data_type)) {
                        hash_table_new.add_argument (new CCodeIdentifier ("g_free"));
                } else if (key_type.data_type == gvariant_type) {
@@ -441,7 +441,7 @@ public class Vala.GVariantModule : GAsyncModule {
                } else {
                        hash_table_new.add_argument (new CCodeIdentifier ("NULL"));
                }
-               
+
                if (value_type.data_type.is_subtype_of (string_type.data_type)) {
                        hash_table_new.add_argument (new CCodeIdentifier ("g_free"));
                } else if (value_type.data_type == gvariant_type) {
index 505766900ced22546f5336b973b78dad9ee1d2e5..e2c673229a4c749a26f972ea969ddbba65eb4823 100644 (file)
@@ -32,15 +32,15 @@ public class Vala.InterfaceRegisterFunction : TypeRegisterFunction {
         * Specifies the interface to be registered.
         */
        public weak Interface interface_reference { get; set; }
-       
+
        public InterfaceRegisterFunction (Interface iface) {
                interface_reference = iface;
        }
-       
+
        public override TypeSymbol get_type_declaration () {
                return interface_reference;
        }
-       
+
        public override string get_type_struct_name () {
                return get_ccode_type_name (interface_reference);
        }
@@ -64,11 +64,11 @@ public class Vala.InterfaceRegisterFunction : TypeRegisterFunction {
        public override string get_instance_struct_size () {
                return "0";
        }
-       
+
        public override string get_instance_init_func_name () {
                return "NULL";
        }
-       
+
        public override string get_parent_type_name () {
                return "G_TYPE_INTERFACE";
        }
@@ -81,11 +81,11 @@ public class Vala.InterfaceRegisterFunction : TypeRegisterFunction {
                /* register all prerequisites */
                foreach (DataType prereq_ref in interface_reference.get_prerequisites ()) {
                        var prereq = prereq_ref.data_type;
-                       
+
                        var func = new CCodeFunctionCall (new CCodeIdentifier ("g_type_interface_add_prerequisite"));
                        func.add_argument (new CCodeIdentifier ("%s_type_id".printf (get_ccode_lower_case_name (interface_reference))));
                        func.add_argument (new CCodeIdentifier (get_ccode_type_id (prereq)));
-                       
+
                        block.add_statement (new CCodeExpressionStatement (func));
                }
 
index 90234bd1164ef939e01a614b08e10ef084753b43..c210f86315cd861880873f51bad841c17163c48e 100644 (file)
@@ -40,7 +40,7 @@ public class Vala.StructRegisterFunction : TypeRegisterFunction {
        public StructRegisterFunction (Struct st) {
                struct_reference = st;
        }
-       
+
        public override TypeSymbol get_type_declaration () {
                return struct_reference;
        }
index 1580c9e8c15893d92003bedb2053a9e6707bea70..51993f35813bbf02f109f5507465285d1906d1a4 100644 (file)
@@ -256,7 +256,7 @@ public abstract class Vala.TypeRegisterFunction {
 
                definition_fragment.append (fun);
        }
-       
+
        /**
         * Returns the data type to be registered.
         *
@@ -414,7 +414,7 @@ public abstract class Vala.TypeRegisterFunction {
         */
        public virtual void get_type_interface_init_statements (CodeContext context, CCodeBlock block, bool plugin) {
        }
-       
+
        public CCodeFragment get_source_declaration () {
                return source_declaration_fragment;
        }
@@ -427,7 +427,7 @@ public abstract class Vala.TypeRegisterFunction {
        public CCodeFragment get_declaration () {
                return declaration_fragment;
        }
-       
+
        /**
         * Returns the definition for this type register function in C code.
         *
index e8efa233018da003e1c6fe71757ffb9ba91f27d8..2db14fd3edeaeb73e6bdd2e7dafb8252c258b29f 100644 (file)
@@ -278,7 +278,7 @@ internal class Vala.TimSort<G> {
                #endif
                Slice<G> a = (owned) pending[index];
                Slice<G> b = (owned) pending[index + 1];
-               
+
                assert (a.length > 0);
                assert (b.length > 0);
                assert (a.index + a.length == b.index);
@@ -648,7 +648,7 @@ internal class Vala.TimSort<G> {
                        this.index = index;
                        this.length = length;
                }
-               
+
                ~Slice () {
                        if (new_list != null)
                                free (new_list);
index da6591992eaf25dc48ee867c75a9a7d52fdc87ca..e138389be82763d37d3eae73fd5ddb1b3ac7256b 100644 (file)
@@ -101,7 +101,7 @@ public class Valadoc.Api.Attribute : Item {
                }
 
                builder.append_attribute ("]");
-       
+
                return builder.get ();
        }
 }
index a897dae6bf68fb762c0ff670273f6886a96a7dfc..2ad71e9d80e1a97a041b4aed1a7d4e30bc319d7f 100644 (file)
@@ -46,7 +46,7 @@ public class Valadoc.Api.SignatureBuilder {
        }
 
        /**
-        * Adds text onto the end of the builder. 
+        * Adds text onto the end of the builder.
         *
         * @param text a string
         * @param spaced add a space at the front of the string if necessary
@@ -59,7 +59,7 @@ public class Valadoc.Api.SignatureBuilder {
        }
 
        /**
-        * Adds text onto the end of the builder. 
+        * Adds text onto the end of the builder.
         *
         * @param text a string
         * @param spaced add a space at the front of the string if necessary
@@ -72,7 +72,7 @@ public class Valadoc.Api.SignatureBuilder {
        }
 
        /**
-        * Adds highlighted text onto the end of the builder. 
+        * Adds highlighted text onto the end of the builder.
         *
         * @param text a string
         * @param spaced add a space at the front of the string if necessary
@@ -86,7 +86,7 @@ public class Valadoc.Api.SignatureBuilder {
        }
 
        /**
-        * Adds a Inline onto the end of the builder. 
+        * Adds a Inline onto the end of the builder.
         *
         * @param content a content
         * @param spaced add a space at the front of the inline if necessary
@@ -101,7 +101,7 @@ public class Valadoc.Api.SignatureBuilder {
        }
 
        /**
-        * Adds a keyword onto the end of the builder. 
+        * Adds a keyword onto the end of the builder.
         *
         * @param keyword a keyword
         * @param spaced add a space at the front of the keyword if necessary
@@ -114,7 +114,7 @@ public class Valadoc.Api.SignatureBuilder {
        }
 
        /**
-        * Adds a symbol onto the end of the builder. 
+        * Adds a symbol onto the end of the builder.
         *
         * @param node a node
         * @param spaced add a space at the front of the node if necessary
@@ -127,7 +127,7 @@ public class Valadoc.Api.SignatureBuilder {
        }
 
        /**
-        * Adds a type onto the end of the builder. 
+        * Adds a type onto the end of the builder.
         *
         * @param node a node
         * @param spaced add a space at the front of the node if necessary
@@ -145,7 +145,7 @@ public class Valadoc.Api.SignatureBuilder {
        }
 
        /**
-        * Adds a type name onto the end of the builder. 
+        * Adds a type name onto the end of the builder.
         *
         * @param name a type name
         * @param spaced add a space at the front of the type name if necessary
@@ -158,7 +158,7 @@ public class Valadoc.Api.SignatureBuilder {
        }
 
        /**
-        * Adds a literal onto the end of the builder. 
+        * Adds a literal onto the end of the builder.
         *
         * @param literal a literal
         * @param spaced add a space at the front of the literal if necessary
index 2d8eb1485bf9aa87d8f77d22f5461a9767079b01..710e411ed51b7896a1351353dfcf2abc5940faf5 100644 (file)
@@ -27,7 +27,7 @@
 public class Valadoc.Api.SourceComment {
        public SourceFile file {
                private set;
-               get;            
+               get;
        }
 
        /**
index b505fafcdea85292e1261eae3917c616ad77950c..833aea529a589656b3fd314c55014173f48faec1 100644 (file)
@@ -181,7 +181,7 @@ public class Valadoc.Api.Tree {
                        _cresolver = new CTypeResolver (this);
                }
 
-               return _cresolver.resolve_symbol_type (cname);          
+               return _cresolver.resolve_symbol_type (cname);
        }
 
        public Node? search_symbol_cstr (Node? element, string cname) {
index 9cfe86482ba733e58d3b9369f8083fb888091c53..e2821580405b77106668cca9d9c406e847af17d8 100644 (file)
@@ -34,7 +34,7 @@ public class Valadoc.Api.TypeParameter : Symbol {
 
        /**
         * {@inheritDoc}
-        */ 
+        */
        protected override Inline build_signature () {
                return new SignatureBuilder ()
                        .append_symbol (this)
@@ -43,12 +43,12 @@ public class Valadoc.Api.TypeParameter : Symbol {
 
        /**
         * {@inheritDoc}
-        */ 
+        */
        public override NodeType node_type { get { return NodeType.TYPE_PARAMETER; } }
 
        /**
         * {@inheritDoc}
-        */ 
+        */
        public override void accept (Visitor visitor) {
                visitor.visit_type_parameter (this);
        }
index 3fd975c4b0aadd636650a59fe73513550f1550e2..5f29f293f657e40efae82b43b4d9d3230c1aea74 100644 (file)
@@ -120,7 +120,7 @@ public class Valadoc.Api.TypeReference : Item {
 
        /**
         * {@inheritDoc}
-        */ 
+        */
        protected override Inline build_signature () {
                var signature = new SignatureBuilder ();
 
index 4e91aabe20e4e33f297c9afb023d56dda6bff783..c48429c411986a776384e000566f9fbd40cf0cf7 100644 (file)
@@ -47,7 +47,7 @@ public class Valadoc.Content.Link : InlineContent, Inline {
        public override void check (Api.Tree api_root, Api.Node container, string file_path,
                                                                ErrorReporter reporter, Settings settings)
        {
-       
+
                // Internal gktdoc-id? (gir-importer)
                if (id_registrar != null) {
                        Api.Node? node = id_registrar.map_symbol_id (url);
@@ -61,7 +61,7 @@ public class Valadoc.Content.Link : InlineContent, Inline {
                                replacement.check (api_root, container, file_path, reporter, settings);
                                _parent.replace_node (this, replacement);
                                return ;
-                       }               
+                       }
 
 
                        string _url = id_registrar.map_url_id (url);
index c2228b76a5ec9e78e87ea9cc97cfa2f14ac0da49..d2edd1650715015358aa0299609066b7e5213eb5 100644 (file)
@@ -37,7 +37,7 @@ public class Valadoc.Content.Run : InlineContent, Inline {
                LANG_PREPROCESSOR,
                LANG_COMMENT,
                LANG_ESCAPE,
-               
+
                XML_ESCAPE,
                XML_ELEMENT,
                XML_ATTRIBUTE,
@@ -60,7 +60,7 @@ public class Valadoc.Content.Run : InlineContent, Inline {
                                return Style.UNDERLINED;
 
                        case "monospaced":
-                               return Style.MONOSPACED;        
+                               return Style.MONOSPACED;
 
                        case "stroke":
                                return Style.STROKE;
index 4a9c0c9bdc9b8ac290269e042f82790621c66c57..b6c28d0755e55bf01adff80016e1bf5113c2a522 100644 (file)
@@ -71,7 +71,7 @@ public class Valadoc.DocumentationParser : Object, ResourceLocator {
        private CommentScanner _comment_scanner;
        private Parser _wiki_parser;
        private Parser _comment_parser;
-       
+
        private Parser _parser;
        private Scanner _scanner;
 
@@ -331,7 +331,7 @@ public class Valadoc.DocumentationParser : Object, ResourceLocator {
                                Rule.many ({ TokenType.SPACE })
                        });
 
-               Rule optional_spaces = 
+               Rule optional_spaces =
                        Rule.option ({
                                Rule.many ({
                                        TokenType.SPACE.action (add_content_space)
@@ -415,7 +415,7 @@ public class Valadoc.DocumentationParser : Object, ResourceLocator {
                //TODO: Find a nicer way to allow empty tags (''run?'' won't work)
                Rule bold =
                        Rule.seq ({
-                               TokenType.SINGLE_QUOTE_2, 
+                               TokenType.SINGLE_QUOTE_2,
                                Rule.one_of ({
                                        TokenType.SINGLE_QUOTE_2,
                                        Rule.seq ({ optional_spaces, run, TokenType.SINGLE_QUOTE_2 })
@@ -859,7 +859,7 @@ public class Valadoc.DocumentationParser : Object, ResourceLocator {
 
                                        Rule? taglet_rule;
                                        if (taglet is BlockContent) {
-                                               taglet_rule = taglet.get_parser_rule (multiline_block_run);                                     
+                                               taglet_rule = taglet.get_parser_rule (multiline_block_run);
                                        } else {
                                                taglet_rule = taglet.get_parser_rule (multiline_run);
                                        }
index ede991ce8769117f42baedd811801aad397235a6..20535b764e21981c7ed785dc1c9e1defcfb1a7fc 100644 (file)
@@ -515,7 +515,7 @@ public class Valadoc.Gtkdoc.Parser : Object, ResourceLocator {
                next ();
 
                ListItem item = factory.create_list_item ();
-       
+
                item.content.add_all (parse_mixed_content ());
 
                if (!check_xml_close_tag ("listitem")) {
@@ -1307,7 +1307,7 @@ public class Valadoc.Gtkdoc.Parser : Object, ResourceLocator {
                }
 
                parse_docbook_spaces ();
-               ListItem? desc = parse_docbook_listitem ();             
+               ListItem? desc = parse_docbook_listitem ();
                if (desc == null) {
                        return null;
                }
index d81bc9156e0ecb25ba6503c5f0889389133eb031..d9b638227ae1cddf7c8f7fbf98dfaf010b7709a2 100644 (file)
@@ -213,7 +213,7 @@ public class Valadoc.Gtkdoc.Scanner {
                                        builder.append_c ('>');
                                }
                        }
-               } 
+               }
 
                if (&txt == &start) {
                        return txt;
@@ -359,7 +359,7 @@ public class Valadoc.Gtkdoc.Scanner {
 
                unowned string start = this.pos;
                int column_start = this.column;
-               next_char ();           
+               next_char ();
 
                int id_len = 0;
 
@@ -387,12 +387,12 @@ public class Valadoc.Gtkdoc.Scanner {
                        }
                } else if (this.pos.has_prefix ("->") || this.pos.has_prefix (".")) {
                        unowned string sep_start = this.pos;
-                       int sep_column_start = this.column;                     
+                       int sep_column_start = this.column;
                        int separator_len = 1;
 
                        if (this.pos.has_prefix ("->")) {
                                separator_len = 2;
-                               next_char ();   
+                               next_char ();
                        }
 
                        next_char ();
@@ -425,11 +425,11 @@ public class Valadoc.Gtkdoc.Scanner {
        private inline Token? gtkdoc_property_prefix () {
                if (get () != ':') {
                        return null;
-               }               
+               }
 
                unowned string start = this.pos;
                int column_start = this.column;
-               next_char ();           
+               next_char ();
 
                int id_len = 0;
 
@@ -452,7 +452,7 @@ public class Valadoc.Gtkdoc.Scanner {
        private inline Token? gtkdoc_signal_prefix () {
                if (get () != ':') {
                        return null;
-               }               
+               }
 
                unowned string start = this.pos;
                int column_start = this.column;
@@ -464,7 +464,7 @@ public class Valadoc.Gtkdoc.Scanner {
 
 
                start = this.pos;
-               next_char ();           
+               next_char ();
 
                int id_len = 0;
 
index 206abb7f3cdf42e3e981c0b0761ed34d76bcf2fe..ee95c4ea089a5029999aa96ef9312a05b89b52af 100644 (file)
@@ -77,7 +77,7 @@ public class Valadoc.Gtkdoc.MarkdownParser : Object, ResourceLocator {
                        Valadoc.TokenType.MARKDOWN_PARAMETER.action ((token) => {
                                Run _run = null;
 
-                               if (token.value == gir_comment.instance_param_name) {                           
+                               if (token.value == gir_comment.instance_param_name) {
                                        _run = _factory.create_run (Run.Style.LANG_KEYWORD);
                                        _run.content.add (_factory.create_text ("this"));
                                } else if (is_error_parameter (token.value)) {
@@ -434,7 +434,7 @@ public class Valadoc.Gtkdoc.MarkdownParser : Object, ResourceLocator {
                .set_start (() => {
                        var siblings = ((BlockContent) peek ()).content;
                        if (siblings.size > 0 && siblings.last () is Content.List) {
-                               push (siblings.last ());                                
+                               push (siblings.last ());
                        } else {
                                Content.List list = _factory.create_list ();
                                list.bullet = Content.List.Bullet.UNORDERED;
@@ -463,7 +463,7 @@ public class Valadoc.Gtkdoc.MarkdownParser : Object, ResourceLocator {
                .set_start (() => {
                        var siblings = ((BlockContent) peek ()).content;
                        if (siblings.size > 0 && siblings.last () is Content.List) {
-                               push (siblings.last ());                                
+                               push (siblings.last ());
                        } else {
                                Content.List list = _factory.create_list ();
                                list.bullet = Content.List.Bullet.ORDERED_NUMBER;
@@ -529,7 +529,7 @@ public class Valadoc.Gtkdoc.MarkdownParser : Object, ResourceLocator {
                .set_start (() => { push (_factory.create_headline ()); })
                .set_reduce (() => {
                        Headline h = (Headline) pop ();
-                       ((BlockContent) peek ()).content.add (h);                       
+                       ((BlockContent) peek ()).content.add (h);
                })
                .set_name ("Headline");
 
index 6df58d07df252b27e0bd39dcbd9be1cc76f394a2..e7afe18b48875220b0ffc042b518674c2d544555 100644 (file)
@@ -90,7 +90,7 @@ public class Valadoc.Gtkdoc.MarkdownScanner : GLib.Object, Valadoc.Scanner {
                _skip = 0;
                _current_string.erase (0, -1);
                contains_at = false;
-               
+
                states.clear ();
                push_state (State.NORMAL);
        }
@@ -112,7 +112,7 @@ public class Valadoc.Gtkdoc.MarkdownScanner : GLib.Object, Valadoc.Scanner {
                while (!_stop && _index.get_char () != 0) {
                        unichar c = _index.get_char ();
                        accept (c);
-                       
+
                        _index = _index.next_char ();
                }
 
@@ -120,7 +120,7 @@ public class Valadoc.Gtkdoc.MarkdownScanner : GLib.Object, Valadoc.Scanner {
                // Close open blocks:
                while (peek_state () != State.NORMAL) {
                        if (peek_state () == State.BLOCK) {
-                               emit_token (Valadoc.TokenType.MARKDOWN_BLOCK_END);                      
+                               emit_token (Valadoc.TokenType.MARKDOWN_BLOCK_END);
                                pop_state ();
                        } else {
                                close_block ();
@@ -140,7 +140,7 @@ public class Valadoc.Gtkdoc.MarkdownScanner : GLib.Object, Valadoc.Scanner {
 
                // In headline:
                string? hash = null;
-               
+
                if (headline_end != null && is_headline_end (ref _index, headline_end, out hash)) {
                        if (hash != null) {
                                emit_token (Valadoc.TokenType.MARKDOWN_HEADLINE_HASH, hash);
@@ -275,7 +275,7 @@ public class Valadoc.Gtkdoc.MarkdownScanner : GLib.Object, Valadoc.Scanner {
                                        _iter = _iter.offset (1);
                                        _skip++;
                                }
-       
+
                                if (_iter[0].tolower () == 'f' || _iter[0].tolower () == 'l') {
                                        _iter = _iter.offset (1);
                                        _skip++;
@@ -540,7 +540,7 @@ public class Valadoc.Gtkdoc.MarkdownScanner : GLib.Object, Valadoc.Scanner {
                                headline_end = "#";
                        } else {
                                emit_token (Valadoc.TokenType.MARKDOWN_HEADLINE_2);
-                               _iter = _iter.offset (2);       
+                               _iter = _iter.offset (2);
                                headline_end = "##";
                        }
 
@@ -599,7 +599,7 @@ public class Valadoc.Gtkdoc.MarkdownScanner : GLib.Object, Valadoc.Scanner {
 
                unowned string id_start = _iter;
                int hash_len = 0;
-               
+
                while (_iter[0] != '}' && _iter[0] != '\n' && _iter[0] != '\0') {
                        _iter = _iter.offset (1);
                        hash_len++;
index c9ff9c137cf6c7fbe4ba4418e83e5fd5440e7fce..46823bb04c1f48b95fa56fc7e74f1a698f6c4cba 100644 (file)
@@ -26,7 +26,7 @@ namespace Valadoc {
        public extern const string icons_dir;
 
        /**
-        * Makes a copy of the file src to dest. 
+        * Makes a copy of the file src to dest.
         *
         * @param src the file to copy
         * @param dest the destination path
@@ -50,7 +50,7 @@ namespace Valadoc {
        }
 
        /**
-        * Makes a copy of the directory src to dest. 
+        * Makes a copy of the directory src to dest.
         *
         * @param src the directory to copy
         * @param dest the destination path
index 45211ff1d1356c494290771641447f1a04ca0ff4..6ffc801418b9379b97848905766676f6e62fea9d 100644 (file)
@@ -245,7 +245,7 @@ public class Valadoc.GtkdocRenderer : ContentRenderer {
                }
 
                element.accept_children (this);
-               
+
                writer.end_tag (tag);
        }
 
index 38b87c5ee9b4c734617d097bd2cda75216eb0da9..8c048b9b4a43d18fb0d9cce4716dbb578ee6ff9a 100644 (file)
@@ -270,7 +270,7 @@ public class Valadoc.Highlighter.XmlScanner : Object, Scanner {
                        pos = pos.offset (1);
                        skipped = true;
                }
-               
+
                return skipped;
        }
 
@@ -306,7 +306,7 @@ public class Valadoc.Highlighter.XmlScanner : Object, Scanner {
                        if (pos.has_prefix ("<!--")) {
                                return true;
                        }
-       
+
                        // CDATA:
                        if (pos.has_prefix ("<![CDATA[")) {
                                return true;
index fcc1e5a2ad0ee11c2ca47ff57ab96351be0ee44a..c82241fc5090d3495c2e172f052689735f234a4f 100644 (file)
@@ -33,7 +33,7 @@ public class Valadoc.Importer.InternalIdRegistrar {
                symbol_map = new Vala.HashMap<string, Api.Node> (str_hash, str_equal);
        }
 
-       
+
        public void register_symbol (string id, Api.Node symbol) {
                this.symbol_map.set (id, symbol);
        }
index 0663bab1eb8829afd468864ca25062b04c348f02..48f29185fd52cffbb094cd60d51ad9c01f38dcab 100644 (file)
@@ -56,7 +56,7 @@ public class Valadoc.Importer.ValadocDocumentationImporter : DocumentationImport
                _scanner.set_parser (_parser);
 
                _comment = new StringBuilder ();
-               
+
                // init parser rules:
                Rule unprinted_spaces = Rule.many ({
                        Rule.one_of ({
index 28a61ffe72ad61d8eb7f8fd1e74b0e582403a336..4bec5199e4f2f4866e5bbf5a4fce764ae4c32b57 100644 (file)
@@ -89,7 +89,7 @@ public class Valadoc.MarkupWriter {
 
        /**
         * Initializes a new instance of the MarkupWriter
-        * 
+        *
         * @param write stream a WriteFunc
         * @param xml_declaration specifies whether this file starts with an xml-declaration
         */
index 4ba922ec23cb79ed95b9179036f73ab7f5091191..1240bc515d924020da724c5af20d59b7e757eec0 100644 (file)
@@ -13,14 +13,14 @@ class Foo {
 void main () {
        Object o1 = new Object ();
        Object o2 = new Object ();
-       
+
        (unowned Object)[] test = new (unowned Object)[] { o1 };
        assert (o1.ref_count == 1);
        test[0] = o2;
        assert (o1.ref_count == 1);
        assert (o2.ref_count == 1);
-       
-       test = null;    
+
+       test = null;
        assert (o1.ref_count == 1);
        assert (o2.ref_count == 1);
 
index 4f25205a725abc06a50486a6a9fc415e41bcb179..2359b48079c3df57fdb1060d5e465e30accdf719 100644 (file)
@@ -8,10 +8,10 @@ string foo = null;
 
 void main() {
        foo = "foo";
-       
+
        string[] keys = bar();
        foo = null;
-       
+
        foreach (unowned string k in keys) {
                assert (k == "foo");
        }
index 9eb35d0a0bc4ea2942053ee6bed1a2530e62c916..8505959ad74dd1da6ffa78508e09732e6659ac41 100644 (file)
@@ -3,15 +3,15 @@ using GLib;
 class Maman.Bar : Object {
        public static int main () {
                stdout.printf ("Break Test: 1");
-               
+
                int i;
                for (i = 0; i < 10; i++) {
                        stdout.printf (" 2");
                        break;
                }
-               
+
                stdout.printf (" 3\n");
-               
+
                return 0;
        }
 }
index 661e73c04ea2311bfca71f6dcada9e1475c8903c..4f60c77028f76cbc4ac4b52a256c890175dcb82c 100644 (file)
@@ -5,19 +5,19 @@ public string[] test() throws Error {
 void main() {
        string t = (true ? "1" : "2") ?? "3";
        assert (t == "1");
-       
+
        t = (false ? "1" : "2") ?? "3";
        assert (t == "2");
-       
+
        t = (true ? null : "2") ?? "3";
        assert (t == "3");
-       
+
        t = (false ? "1" : null) ?? "3";
        assert (t == "3");
-       
+
        t = test()[0] ?? "2";
        assert (t == "2");
-       
+
        t = test()[1] ?? "2";
        assert (t == "1");
 }
index 9ea363fd1b586685ed42a43c8fdec20bba52687e..5a1bb24af14364dd4f9ef402fc47d350117f7f15 100644 (file)
@@ -18,7 +18,7 @@ class Maman.Bar : Object {
                for (i = 2; i < 7; i++) {
                        stdout.printf (" %d", i);
                }
-               
+
                stdout.printf (" 7\n");
 
                stdout.printf ("Switch statement: 1");
@@ -37,7 +37,7 @@ class Maman.Bar : Object {
 class Maman.Foo : Object {
        public void run () {
                stdout.printf (" 2");
-               
+
                switch (23) {
                case 23:
                        stdout.printf (" 3");
@@ -46,7 +46,7 @@ class Maman.Foo : Object {
                        stdout.printf (" BAD");
                        break;
                }
-               
+
                switch (inc ()) {
                case 0:
                        stdout.printf (" 4");
@@ -58,7 +58,7 @@ class Maman.Foo : Object {
                        stdout.printf (" BAD");
                        break;
                }
-               
+
                switch (42) {
                case 0:
                        stdout.printf (" BAD");
@@ -70,14 +70,14 @@ class Maman.Foo : Object {
                        stdout.printf (" BAD");
                        break;
                }
-               
+
                stdout.printf (" 6");
        }
-       
+
        public int inc () {
                return counter++;
        }
-       
+
        private int counter = 0;
 }
 
index 34bf1fcb77e9b301b96785f255ddfe12cbcd20d4..03fb9b17ff55af9687f7bcc27090461fa48b0e28 100644 (file)
@@ -80,7 +80,7 @@ class Maman.Bar : Object, Foo {
 
        public static int main () {
                stdout.printf ("Delegate Test: 1");
-               
+
                VoidCallback void_cb = do_void_action;
 
                void_cb ();
@@ -88,7 +88,7 @@ class Maman.Bar : Object, Foo {
                stdout.printf (" 3");
 
                ActionCallback cb = do_action;
-               
+
                stdout.printf (" %d", cb ());
 
                stdout.printf (" 5");
index c9f913f0746689097ba0d33a0f1115c35bc7ac9d..87bb127d03178600e6b1e80e615c8cfecb506fd1 100644 (file)
@@ -24,7 +24,7 @@ class Maman.Bar : Object {
                stdout.printf (" %d", Foo.VAL3);
 
                stdout.printf (" 4");
-               
+
                stdout.printf (" %d", Foo.VAL5);
        }
 
@@ -40,7 +40,7 @@ class Maman.Bar : Object {
 
        public static int main () {
                stdout.printf ("Enum Test: 1");
-               
+
                var bar = new Bar ();
                bar.run ();
 
index 264e6376dea583019b44cdd4d86c61b138b2d163..27f42f974eecce29c38fdb6cdb941c36a0ee5087 100644 (file)
@@ -75,7 +75,7 @@ class Maman.Bar : Object {
 
        public static int main () {
                stdout.printf ("Exception Test: 1");
-               
+
                var bar = new Bar ();
                bar.run ();
 
index d16f27f5d4111ed224fee94cf08cfffd533838fe..3cb19cab7c5ab5710a835ea333d80beeee82405b 100644 (file)
@@ -42,14 +42,14 @@ void main () {
        var obj1 = new Obj1 ();
        var iface1 = (Iface1) obj1;
        var iface2 = (Iface2) obj1;
-       
+
        assert (iface1.foo () == 1);
        assert (iface2.foo () == 2);
 
        var obj2 = new Obj2 ();
        iface1 = (Iface1) obj2;
        iface2 = (Iface2) obj2;
-       
+
        assert (iface1.foo () == 1);
        assert (iface2.foo () == 2);
 }
\ No newline at end of file
index 27e9cc16e216a9da95ddca801a3cb014d834f3bb..9b37aeeab31044f8c3f5910c09cb6287e8bcf20f 100644 (file)
@@ -27,7 +27,7 @@ void main () {
        var baz = new Baz ();
        baz.foo<Object> (bar);
        assert (baz.ref_count == 1);
-       
+
        assert (is_check<Bar> ());
        assert (!is_check<Baz> ());
 }
index 68d573e35d951b2597cd584e3701434c54eaf92b..d2ee2dcc69bf250850e6a73074d07f1e949a4109 100644 (file)
@@ -3,7 +3,7 @@ class Foo {
 
 class FooIterator {
        bool called = false;
-       
+
        public bool next () {
                return !called;
        }
@@ -23,7 +23,7 @@ class FooCollection {
 
 class FooIterator2 {
        bool called = false;
-       
+
        public Foo? next_value () {
                if (called)
                        return null;
index c659cb65b125666867e78b1a013d2e36ab2fb823..00afd9faa583298236edcc02d7761b168a44b9a3 100644 (file)
@@ -26,7 +26,7 @@ class Maman.Bar : Object {
                assert (do_action (i => { return i * 3; }) == 3);
                assert (do_out_action ((out i) => { i = 4; }) == 4);
                assert (do_ref_action ((ref i) => { i += 4; }) == 5);
-               
+
                return 0;
        }
 }
index c9576c2cc2f74298f23deff491684bed745296c5..296fca86c9d6493cc93a91dbdc34c5b20ea13b3c 100644 (file)
@@ -12,7 +12,7 @@ class Foo : Object {
        public FObject o { get; set; }
        public FStruct t { get; set; }
        public void* p { get; set; }
-       
+
        public int foo { get { return i; } }
        public int bar { set { i = value; } }
 
@@ -27,7 +27,7 @@ void main () {
        var o = new FObject ();
        FStruct t = {};
        void* p = &o;
-       
+
        var foo = new Foo ();
        foo.s = s;
        foo.a = a;
@@ -35,7 +35,7 @@ void main () {
        foo.o = o;
        foo.t = t;
        foo.p = p;
-       
+
        foo.notify["s"].connect (() => error ("string-type equality failed"));
        foo.notify["a"].connect (() => error ("array-type equality failed"));
        foo.notify["i"].connect (() => error ("simple-type equality failed"));
index 04bacac00616114e39f3c2463ce1e24aa24d27b9..353071e9dbb55f2f4f1bade2ee94b5d81a1d6c07 100644 (file)
@@ -10,16 +10,16 @@ public class Foo : Object {
 void main() {
        string[]? strings;
        var f = new Foo();
-       
+
        f.set("strings", new string[]{ "foo", "bar" });
        f.get("strings", out strings);
        assert (strings[0] == "foo");
        assert (strings[1] == "bar");
-       
+
        f.set("strings", null);
        f.get("strings", out strings);
        assert(strings == null);
-       
+
        f.set("strings", new string[]{ "foo", "bar" });
        f.get("strings", out strings);
        assert (strings[0] == "foo");
index e67ef0ca8d2f3ef052ed640423b6f22ad195e50c..d1ecc3f2d0302c4e81c3429a12bf117124f9ad37 100644 (file)
@@ -1,6 +1,6 @@
 public class Foo : Object {
        int i = 42;
-       
+
        public int bar {
                get {
                        return i;
index 96b66783e129d2aec509f037e39bf00750fcb320..8229e978ec8ecb5043a15bd8ceb876c1f38a4f38 100644 (file)
@@ -15,7 +15,7 @@ class Maman.Bar : Foo {
        private int private_field = 4;
        private static int private_static_field = 5;
        public static int public_static_field = 6;
-       private class int private_class_field; 
+       private class int private_class_field;
        public class int public_class_field;
 
        class construct {
@@ -24,10 +24,10 @@ class Maman.Bar : Foo {
        static construct {
                public_class_field = 8;
        }
-       
+
        void do_action () {
                stdout.printf (" %d %d %d %d %d %d %d", public_base_field, public_field,
-                              private_field, private_static_field, public_static_field, 
+                              private_field, private_static_field, public_static_field,
                                           private_class_field, public_class_field);
                public_base_field = 9;
                public_field = 10;
@@ -45,12 +45,12 @@ class Maman.Bar : Foo {
                        public_class_field = 15;
                }
                stdout.printf (" %d %d %d %d %d %d %d", public_base_field, public_field,
-                              private_field, private_static_field, public_static_field, 
+                              private_field, private_static_field, public_static_field,
                                           private_class_field, public_class_field);
        }
 
        class void do_action_class () {
-               stdout.printf (" %d %d %d %d", private_static_field, public_static_field, 
+               stdout.printf (" %d %d %d %d", private_static_field, public_static_field,
                                           private_class_field, public_class_field);
                lock (private_static_field) {
                        private_static_field = 12;
@@ -64,13 +64,13 @@ class Maman.Bar : Foo {
                lock (public_class_field) {
                        public_class_field = 15;
                }
-               stdout.printf (" %d %d %d %d", private_static_field, public_static_field, 
+               stdout.printf (" %d %d %d %d", private_static_field, public_static_field,
                                           private_class_field, public_class_field);
        }
 
        public static int main () {
                stdout.printf ("Field Test: 1");
-               
+
                var bar = new Bar ();
                bar.do_action ();
                bar.do_action_class ();
@@ -83,12 +83,12 @@ class Maman.Bar : Foo {
                bar.private_class_field = 21;
                ((Foo)bar).public_class_field = 22;
                stdout.printf (" %d %d %d %d %d %d %d", bar.public_base_field, bar.public_field,
-                              bar.private_field, bar.private_static_field, bar.public_static_field, 
+                              bar.private_field, bar.private_static_field, bar.public_static_field,
                                           bar.private_class_field, ((Foo)bar).public_class_field);
 
                var foo = new Foo ();
                stdout.printf (" %d", foo.public_class_field);
-               
+
                var compact = new CompactTest ();
                stdout.printf (" %d", compact.initialized_field);
 
index e6895d68be0f7adb698bdbb093bc12060cf017cf..be4119d51d38b4dc5072962b2335a4ed56e996c9 100644 (file)
@@ -47,7 +47,7 @@ class Maman.SubBaz : Baz {
                ibaz.do_action ();
                ibaz.public_mixin();
                (ibaz as Baz).do_mixin();
-       
+
                stdout.printf (" 3");
 
                ibaz.do_virtual_action ();
index 7217474ca0af69551b19d7a555cd4b17e80eb667..9a950c322cce070a91708f4ba48a46ba864e2e41 100644 (file)
@@ -32,7 +32,7 @@ class Maman.SubBar : Bar {
 
                var bar = new SubBar ();
                bar.do_action ();
-               
+
                stdout.printf (" 3\n");
 
                stdout.printf ("Static Inheritance Test: 1");
@@ -44,7 +44,7 @@ class Maman.SubBar : Bar {
                stdout.printf ("Virtual Method Test: 1");
 
                bar.do_virtual_action ();
-       
+
                stdout.printf (" 3\n");
 
                // test symbol resolving to check that methods of implemented
@@ -53,7 +53,7 @@ class Maman.SubBar : Bar {
 
                var foobar = new SubFooBar ();
                foobar.do_action ();
-       
+
                stdout.printf (" 3\n");
 
                test_classes_methods_ref_parameters ();
index 1a40e95e03211127069b1294c2fe2b3b94d9246f..3d86de106fb4a44ae31754869020b365d38c899a 100644 (file)
@@ -69,7 +69,7 @@ public class Sample : Object {
 
                Maman.Ibaz ibaz = new Maman.Baz ();
                ibaz.simple_method ();
-       
+
                stdout.printf (" 3\n");
 
                var nonpriv = new NonPrivAccess ();
@@ -114,10 +114,10 @@ class Maman.Bar : Foo {
 
        public static void run () {
                stdout.printf ("Property Test: 1");
-               
+
                var bar = new Bar ();
                bar.do_action ();
-               
+
                Foo foo = bar;
                foo.abstract_base_property = 6;
                stdout.printf (" %d", foo.abstract_base_property);
index 195f563c87cb7d2ef0fb62a5d90bcb23df49ab14..3e9764d9408106da9a39e4c3ffd3fea44123a8ad 100644 (file)
@@ -19,9 +19,9 @@ class Maman.Bar : Object {
 
        public void run () {
                stdout.printf (" 2");
-               
+
                var foo = new Foo ();
-               
+
                foo.activated.connect ((foo, b) => {
                        if (b) {
                                stdout.printf (" 8");
@@ -33,11 +33,11 @@ class Maman.Bar : Object {
                foo.activated.connect (activated);
 
                stdout.printf (" 3");
-               
+
                foo.do_action (false);
 
                stdout.printf (" 6");
-               
+
                foo.activated.disconnect (activated);
 
                stdout.printf (" 7");
@@ -59,15 +59,15 @@ class Maman.UserFoo : Object {
 class Maman.UserBar : Object {
        public void run () {
                stdout.printf (" 2");
-               
+
                var foo = new UserFoo ();
-               
+
                foo.activated.connect ((foo, i1, i2) => {
                        stdout.printf (" %d", i1 + i2);
                });
 
                stdout.printf (" 3");
-               
+
                foo.do_action ();
 
                stdout.printf (" 5");
index 8ffda92cf8d0811f658e5eb34c1798b4fd477502..af052e2775e633618d26a3fdb79cbb12d04116c9 100644 (file)
@@ -24,7 +24,7 @@ class Maman.SubBar : Bar {
 
                var bar = new SubBar ();
                bar.run ();
-       
+
                stdout.printf (" 5\n");
 
                return 0;
index 154efadb1d0b68d8965b410cc97eba3dffbf2a4c..7d41972121527a0ed146b0b66c091b92a3e96456 100644 (file)
@@ -24,7 +24,7 @@ class Maman.SubBar : Bar {
 
                var bar = new SubBar ();
                bar.run ();
-       
+
                stdout.printf (" 5\n");
 
                return 0;
index acc7ec1d719d006621972062ccadfbcec18f03c7..e923eafd4a98a55a7835c34321bca0d8335748eb 100644 (file)
@@ -3,23 +3,23 @@ using GLib;
 class Maman.Foo : Object {
        public int p1 { get; set; }
        public int p2 { get; set; }
-       
+
        public Foo (int i, int p2) {
                p1 = 2 * i;
                this.p2 = p2;
        }
-       
+
        public static int main () {
                stdout.printf ("Construct Formal Parameter Test: 1");
-               
+
                var foo = new Foo (2, 3);
-               
+
                stdout.printf (" 2");
                stdout.printf (" %d", foo.p2);
                stdout.printf (" %d", foo.p1);
-               
+
                stdout.printf (" 5\n");
-               
+
                return 0;
        }
 }
index b5371745d2f100f7c8cb8e7ed3ea60c7e1b2e8e7..029325264b3d98d83b970484d53f8e8cf350126b 100644 (file)
@@ -38,7 +38,7 @@ public class Vala.AddressofExpression : Expression {
                        _inner.parent_node = this;
                }
        }
-       
+
        private Expression _inner;
 
        /**
@@ -51,7 +51,7 @@ public class Vala.AddressofExpression : Expression {
                this.source_reference = source_reference;
                this.inner = inner;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_addressof_expression (this);
 
index 3c6fb2a93b7c0796762f16c5be5c1e7361b74501..2282d6f809f73f4a0e854d86278873bb38ecdad4 100644 (file)
@@ -38,17 +38,17 @@ public class Vala.ArrayCreationExpression : Expression {
                        _element_type.parent_node = this;
                }
        }
-       
+
        /**
         * The rank of the array.
         */
        public int rank { get; set; }
-       
+
        /**
         * The size for each dimension ascending from left to right.
         */
        private List<Expression> sizes = new ArrayList<Expression> ();
-       
+
        /**
         * The root array initializer list.
         */
@@ -74,14 +74,14 @@ public class Vala.ArrayCreationExpression : Expression {
                        size.parent_node = this;
                }
        }
-       
+
        /**
         * Get the sizes for all dimensions ascending from left to right.
         */
        public List<Expression> get_sizes () {
                return sizes;
        }
-       
+
        public ArrayCreationExpression (DataType element_type, int rank, InitializerList? initializer_list, SourceReference source_reference) {
                this.element_type = element_type;
                this.rank = rank;
index f1ecd7b6810b420959764b4189e2dea084c2edb5..10be086d847f4d53e5ab19c1ec87051462bc2cc0 100644 (file)
@@ -118,12 +118,12 @@ public class Vala.ArrayType : ReferenceType {
                        resize_method.access = SymbolAccessibility.PUBLIC;
 
                        resize_method.set_attribute_string ("CCode", "cname", "g_renew");
-                       
+
                        var root_symbol = source_reference.file.context.root;
                        var int_type = new IntegerType ((Struct) root_symbol.scope.lookup ("int"));
 
                        resize_method.add_parameter (new Parameter ("length", int_type));
-                       
+
                        resize_method.returns_modified_pointer = true;
                }
                return resize_method;
@@ -185,7 +185,7 @@ public class Vala.ArrayType : ReferenceType {
                if (element_type.is_weak () && !(parent_node is Constant)) {
                        elem_str = "(unowned %s)".printf (elem_str);
                }
-               
+
                if (!fixed_length) {
                        return "%s[%s]%s".printf (elem_str, string.nfill (rank - 1, ','), nullable ? "?" : "");
                } else {
index 1c62fcdc903e9a12817f21a7581ebf894cf6f6b7..b3e07b4666e8a82c584b34213c212a66abf0c2a0 100644 (file)
@@ -37,12 +37,12 @@ public class Vala.Assignment : Expression {
                        _left.parent_node = this;
                }
        }
-       
+
        /**
         * Assignment operator.
         */
        public AssignmentOperator operator { get; set; }
-       
+
        /**
         * Right hand side of the assignment.
         */
@@ -53,10 +53,10 @@ public class Vala.Assignment : Expression {
                        _right.parent_node = this;
                }
        }
-       
+
        private Expression _left;
        private Expression _right;
-       
+
        /**
         * Creates a new assignment.
         *
@@ -72,7 +72,7 @@ public class Vala.Assignment : Expression {
                this.source_reference = source_reference;
                this.left = left;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_assignment (this);
 
@@ -563,7 +563,7 @@ public class Vala.Assignment : Expression {
                right.get_used_variables (collection);
        }
 }
-       
+
 public enum Vala.AssignmentOperator {
        NONE,
        SIMPLE,
index ed80d66d79691b9450e22d6b0b4a7b221412bdde..ba4f8f185c5b60a0c8dc3b328da470b965486625 100644 (file)
@@ -66,7 +66,7 @@ public class Vala.Attribute : CodeNode {
        public void add_argument (string key, string value) {
                args.set (key, value);
        }
-       
+
        /**
         * Returns whether this attribute has the specified named argument.
         *
@@ -76,7 +76,7 @@ public class Vala.Attribute : CodeNode {
        public bool has_argument (string name) {
                return args.contains (name);
        }
-       
+
        /**
         * Returns the string value of the specified named argument.
         *
@@ -95,7 +95,7 @@ public class Vala.Attribute : CodeNode {
                /* unescape string */
                return noquotes.compress ();
        }
-       
+
        /**
         * Returns the integer value of the specified named argument.
         *
index 8058540689289087e6a47c65e70692c0b788a3ae..7631f9e79d040e1a9c7b47dfdf10a3f3fa0c565a 100644 (file)
@@ -34,7 +34,7 @@ public class Vala.BaseAccess : Expression {
        public BaseAccess (SourceReference? source = null) {
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_base_access (this);
 
index ecfdda5e330b8484c8a57fd4ef80d24d1fdf546e..6fac539fdb6c99a3be932db97006e203bb61bbe5 100644 (file)
@@ -31,7 +31,7 @@ public class Vala.BinaryExpression : Expression {
         * The binary operator.
         */
        public BinaryOperator operator { get; set; }
-       
+
        /**
         * The left operand.
         */
@@ -44,7 +44,7 @@ public class Vala.BinaryExpression : Expression {
                        _left.parent_node = this;
                }
        }
-       
+
        /**
         * The right operand.
         */
@@ -57,12 +57,12 @@ public class Vala.BinaryExpression : Expression {
                        _right.parent_node = this;
                }
        }
-       
+
        public bool is_chained { get; private set; }
 
        private Expression _left;
        private Expression _right;
-       
+
        /**
         * Creates a new binary expression.
         *
@@ -96,7 +96,7 @@ public class Vala.BinaryExpression : Expression {
 
        public override void accept_children (CodeVisitor visitor) {
                left.accept (visitor);
-               right.accept (visitor);                 
+               right.accept (visitor);
        }
 
        public override void replace_expression (Expression old_node, Expression new_node) {
@@ -247,7 +247,7 @@ public class Vala.BinaryExpression : Expression {
                        } else if (right.value_type != null) {
                                local_type = right.value_type.copy ();
                        }
-               
+
                        var local = new LocalVariable (local_type, get_temp_name (), left, source_reference);
                        var decl = new DeclarationStatement (local, source_reference);
 
@@ -539,9 +539,9 @@ public class Vala.BinaryExpression : Expression {
                                parent_node.replace_expression (this, contains_call);
                                return contains_call.check (context);
                        }
-                       
+
                        value_type = context.analyzer.bool_type;
-                       
+
                } else {
                        assert_not_reached ();
                }
index 4064b6e903386f0d5b8671bca8a1bb3d1c3f496b..372e70955307891f565aeee6a1fea4ef21b53275 100644 (file)
@@ -37,7 +37,7 @@ public class Vala.Block : Symbol, Statement {
        private List<Statement> statement_list = new ArrayList<Statement> ();
        private List<LocalVariable> local_variables = new ArrayList<LocalVariable> ();
        private List<Constant> local_constants = new ArrayList<Constant> ();
-       
+
        /**
         * Creates a new block.
         *
@@ -46,7 +46,7 @@ public class Vala.Block : Symbol, Statement {
        public Block (SourceReference? source_reference) {
                base (null, source_reference);
        }
-       
+
        /**
         * Append a statement to this block.
         *
@@ -81,7 +81,7 @@ public class Vala.Block : Symbol, Statement {
                }
                return list;
        }
-       
+
        /**
         * Add a local variable to this block.
         *
index 1a1aee86e3df87e51bf08baf2610a1b48566a00f..37ec154a74e9613ed395760b4c30e8e83976fc1f 100644 (file)
@@ -42,7 +42,7 @@ public class Vala.BooleanLiteral : Literal {
                value = b;
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_boolean_literal (this);
 
index 3f69c851f71764ce1e0dceb7f902ac95c6de1590..e8f2dd8bf17f8e6bece9a8b7b6ccbb460a383a65 100644 (file)
@@ -35,7 +35,7 @@ public class Vala.BreakStatement : CodeNode, Statement {
        public BreakStatement (SourceReference? source) {
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_break_statement (this);
        }
index ecf093dc571728c0e09405e43443a19a53e5a689..8d35e1e8603b46dd1b6a3d38e6f70f7633e07355 100644 (file)
@@ -37,7 +37,7 @@ public class Vala.CastExpression : Expression {
                        _inner.parent_node = this;
                }
        }
-       
+
        /**
         * The target type.
         */
index 84e4ba3402b3becc620c860c5b947876cd25c4e3..93996a910e96c3f52589dcbd21bf2a4364266733 100644 (file)
@@ -37,12 +37,12 @@ public class Vala.CatchClause : CodeNode {
                        }
                }
        }
-       
+
        /**
         * Specifies the error variable name.
         */
        public string? variable_name { get; set; }
-       
+
        /**
         * Specifies the error handler body.
         */
@@ -53,7 +53,7 @@ public class Vala.CatchClause : CodeNode {
                        _body.parent_node = this;
                }
        }
-       
+
        /**
         * Specifies the declarator for the generated error variable.
         */
index cecddbac4115e7a7f8d84dcb6d476b97710c645c..24b1faeea7d0c640dcc6eefd219f77d7e6171eec 100644 (file)
@@ -37,13 +37,13 @@ public class Vala.CharacterLiteral : Literal {
                }
                set {
                        _value = value;
-                       
+
                        if (!value.validate ()) {
                                error = true;
                        }
                }
        }
-       
+
        private string _value;
 
        /**
@@ -64,7 +64,7 @@ public class Vala.CharacterLiteral : Literal {
 
                visitor.visit_expression (this);
        }
-       
+
        /**
         * Returns the unicode character value this character literal
         * represents.
index f61bb350ef942e7ed49ede1ca971e5f458bde8cc..b0de0f5360a5f0374da155f32a4e23c5f13975e4 100644 (file)
@@ -30,7 +30,7 @@ public class Vala.Class : ObjectTypeSymbol {
         * Specifies the base class.
         */
        public Class base_class { get; set; }
-       
+
        /**
         * Specifies whether this class is abstract. Abstract classes may not be
         * instantiated.
@@ -89,7 +89,7 @@ public class Vala.Class : ObjectTypeSymbol {
         * Specifies whether this class has private fields.
         */
        public bool has_private_fields { get; set; }
-       
+
        /**
         * Specifies whether this class has class fields.
         */
@@ -104,7 +104,7 @@ public class Vala.Class : ObjectTypeSymbol {
         * Specifies the default construction method.
         */
        public CreationMethod default_construction_method { get; set; }
-       
+
        /**
         * Specifies the instance constructor.
         */
@@ -141,7 +141,7 @@ public class Vala.Class : ObjectTypeSymbol {
         * Specifies the class destructor.
         */
        public Destructor? static_destructor { get; set; }
-       
+
        /**
         * Specifies the class destructor.
         */
@@ -204,7 +204,7 @@ public class Vala.Class : ObjectTypeSymbol {
                        has_class_private_fields = true;
                }
        }
-       
+
        /**
         * Adds the specified method as a member to this class.
         *
@@ -263,7 +263,7 @@ public class Vala.Class : ObjectTypeSymbol {
                        add_field (prop.field);
                }
        }
-       
+
        public override void add_constructor (Constructor c) {
                if (c.binding == MemberBinding.INSTANCE) {
                        if (constructor != null) {
@@ -323,23 +323,23 @@ public class Vala.Class : ObjectTypeSymbol {
                foreach (Field f in get_fields ()) {
                        f.accept (visitor);
                }
-               
+
                foreach (Constant c in get_constants ()) {
                        c.accept (visitor);
                }
-               
+
                foreach (Method m in get_methods ()) {
                        m.accept (visitor);
                }
-               
+
                foreach (Property prop in get_properties ()) {
                        prop.accept (visitor);
                }
-               
+
                foreach (Signal sig in get_signals ()) {
                        sig.accept (visitor);
                }
-               
+
                if (constructor != null) {
                        constructor.accept (visitor);
                }
@@ -363,11 +363,11 @@ public class Vala.Class : ObjectTypeSymbol {
                if (class_destructor != null) {
                        class_destructor.accept (visitor);
                }
-               
+
                foreach (Class cl in get_classes ()) {
                        cl.accept (visitor);
                }
-               
+
                foreach (Struct st in get_structs ()) {
                        st.accept (visitor);
                }
@@ -398,7 +398,7 @@ public class Vala.Class : ObjectTypeSymbol {
                                return true;
                        }
                }
-               
+
                return false;
        }
 
@@ -509,15 +509,15 @@ public class Vala.Class : ObjectTypeSymbol {
                foreach (Field f in get_fields ()) {
                        f.check (context);
                }
-               
+
                foreach (Constant c in get_constants ()) {
                        c.check (context);
                }
-               
+
                foreach (Method m in get_methods ()) {
                        m.check (context);
                }
-               
+
                foreach (Property prop in get_properties ()) {
                        if (prop.get_attribute ("NoAccessorMethod") != null && !is_subtype_of (context.analyzer.object_type)) {
                                error = true;
@@ -526,11 +526,11 @@ public class Vala.Class : ObjectTypeSymbol {
                        }
                        prop.check (context);
                }
-               
+
                foreach (Signal sig in get_signals ()) {
                        sig.check (context);
                }
-               
+
                if (constructor != null) {
                        constructor.check (context);
                }
@@ -550,15 +550,15 @@ public class Vala.Class : ObjectTypeSymbol {
                if (static_destructor != null) {
                        static_destructor.check (context);
                }
-               
+
                if (class_destructor != null) {
                        class_destructor.check (context);
                }
-               
+
                foreach (Class cl in get_classes ()) {
                        cl.check (context);
                }
-               
+
                foreach (Struct st in get_structs ()) {
                        st.check (context);
                }
index a0430a12cd44c12f9db5f472b1295db826354026..20841cf135bc3afce569c248fc7c6da2f59b81a4 100644 (file)
@@ -42,11 +42,11 @@ public class Vala.ClassType : ReferenceType {
                result.nullable = nullable;
                result.is_dynamic = is_dynamic;
                result.floating_reference = floating_reference;
-               
+
                foreach (DataType arg in get_type_arguments ()) {
                        result.add_type_argument (arg.copy ());
                }
-               
+
                return result;
        }
 }
index d3955df70a6bdd35a6b5b44acb2328010ddb5772..17b35c9fdfa2e7bd6a92a47e7cc5b49b75dcdde5 100644 (file)
@@ -189,7 +189,7 @@ public class Vala.CodeContext {
        public bool vapi_comments { get; set; }
 
        /**
-        * Returns true if the target version of glib is greater than or 
+        * Returns true if the target version of glib is greater than or
         * equal to the specified version.
         */
        public bool require_glib_version (int major, int minor) {
@@ -300,7 +300,7 @@ public class Vala.CodeContext {
        public List<string> get_c_source_files () {
                return c_source_files;
        }
-       
+
        /**
         * Adds the specified file to the list of source files.
         *
index 5413ed434ad0a698a9d0168ad0b8d4b3076cc140..70bc77f0aa7ff98ba3b9a9bdf10266d5d19d1b50 100644 (file)
@@ -61,7 +61,7 @@ public abstract class Vala.CodeNode {
        /**
         * Specifies that this node or a child node may throw an exception.
         */
-       public bool tree_can_fail { 
+       public bool tree_can_fail {
                get { return _error_types != null && _error_types.size > 0; }
        }
 
@@ -75,7 +75,7 @@ public abstract class Vala.CodeNode {
        /**
         * Specifies the exceptions that can be thrown by this node or a child node
         */
-       public List<DataType> get_error_types () { 
+       public List<DataType> get_error_types () {
                if (_error_types != null) {
                        return _error_types;
                }
@@ -87,7 +87,7 @@ public abstract class Vala.CodeNode {
 
        /**
         * Adds an error type to the exceptions that can be thrown by this node
-        * or a child node 
+        * or a child node
         */
        public void add_error_type (DataType error_type) {
                if (_error_types == null) {
@@ -99,7 +99,7 @@ public abstract class Vala.CodeNode {
 
        /**
         * Adds a collection of error types to the exceptions that can be thrown by this node
-        * or a child node 
+        * or a child node
         */
        public void add_error_types (List<DataType> error_types) {
                foreach (DataType error_type in error_types) {
index c9b158694294d55cc61f5bc08f28faa02a95726d..d961f85e93730a4777490e2df77ff5a82a249c1f 100644 (file)
@@ -516,7 +516,7 @@ public abstract class Vala.CodeVisitor {
         */
        public virtual void visit_method_call (MethodCall expr) {
        }
-       
+
        /**
         * Visit operation called for element access expressions.
         *
index 2fed2d8f59ca085993bf4bf83ba900a444c451ca..b442bb239b9bed9ccabb5a32eac75a0bd46325b7 100644 (file)
@@ -31,9 +31,9 @@ public class Vala.CodeWriter : CodeVisitor {
        static GLib.Regex fix_indent_regex;
 
        private CodeContext context;
-       
+
        FileStream stream;
-       
+
        int indent;
        /* at begin of line */
        bool bol = true;
@@ -240,7 +240,7 @@ public class Vala.CodeWriter : CodeVisitor {
                }
 
                write_attributes (cl);
-               
+
                write_indent ();
                write_accessibility (cl);
                if (cl.is_abstract) {
@@ -254,7 +254,7 @@ public class Vala.CodeWriter : CodeVisitor {
                var base_types = cl.get_base_types ();
                if (base_types.size > 0) {
                        write_string (" : ");
-               
+
                        bool first = true;
                        foreach (DataType base_type in base_types) {
                                if (!first) {
@@ -392,7 +392,7 @@ public class Vala.CodeWriter : CodeVisitor {
                var prerequisites = iface.get_prerequisites ();
                if (prerequisites.size > 0) {
                        write_string (" : ");
-               
+
                        bool first = true;
                        foreach (DataType prerequisite in prerequisites) {
                                if (!first) {
@@ -565,7 +565,7 @@ public class Vala.CodeWriter : CodeVisitor {
                write_string ("const ");
 
                write_type (c.type_reference);
-                       
+
                write_string (" ");
                write_identifier (c.name);
                write_type_suffix (c.type_reference);
@@ -606,14 +606,14 @@ public class Vala.CodeWriter : CodeVisitor {
                }
 
                write_type (f.variable_type);
-                       
+
                write_string (" ");
                write_identifier (f.name);
                write_type_suffix (f.variable_type);
                write_string (";");
                write_newline ();
        }
-       
+
        private void write_error_domains (List<DataType> error_domains) {
                if (error_domains.size > 0) {
                        write_string (" throws ");
@@ -639,12 +639,12 @@ public class Vala.CodeWriter : CodeVisitor {
                        if (i > 1) {
                                write_string (", ");
                        }
-                       
+
                        if (param.ellipsis) {
                                write_string ("...");
                                continue;
                        }
-                       
+
                        write_attributes (param);
 
                        if (param.params_array) {
@@ -671,7 +671,7 @@ public class Vala.CodeWriter : CodeVisitor {
                        write_string (" ");
                        write_identifier (param.name);
                        write_type_suffix (param.variable_type);
-                       
+
                        if (param.initializer != null) {
                                write_string (" = ");
                                param.initializer.accept (this);
@@ -702,16 +702,16 @@ public class Vala.CodeWriter : CodeVisitor {
 
                write_accessibility (cb);
                write_string ("delegate ");
-               
+
                write_return_type (cb.return_type);
-               
+
                write_string (" ");
                write_identifier (cb.name);
 
                write_type_parameters (cb.get_type_parameters ());
 
                write_string (" ");
-               
+
                write_params (cb.get_parameters ());
 
                write_error_domains (cb.get_error_types ());
@@ -756,7 +756,7 @@ public class Vala.CodeWriter : CodeVisitor {
 
                write_indent ();
                write_accessibility (m);
-               
+
                if (m is CreationMethod) {
                        if (m.coroutine) {
                                write_string ("async ");
@@ -789,7 +789,7 @@ public class Vala.CodeWriter : CodeVisitor {
                        if (m.coroutine) {
                                write_string ("async ");
                        }
-               
+
                        write_return_type (m.return_type);
                        write_string (" ");
 
@@ -799,7 +799,7 @@ public class Vala.CodeWriter : CodeVisitor {
 
                        write_string (" ");
                }
-               
+
                write_params (m.get_parameters ());
 
                write_error_domains (m.get_error_types ());
@@ -879,13 +879,13 @@ public class Vala.CodeWriter : CodeVisitor {
                if (!check_accessibility (sig)) {
                        return;
                }
-               
+
                if (context.vapi_comments && sig.comment != null) {
                        write_comment (sig.comment);
                }
 
                write_attributes (sig);
-               
+
                write_indent ();
                write_accessibility (sig);
 
@@ -894,14 +894,14 @@ public class Vala.CodeWriter : CodeVisitor {
                }
 
                write_string ("signal ");
-               
+
                write_return_type (sig.return_type);
-               
+
                write_string (" ");
                write_identifier (sig.name);
-               
+
                write_string (" ");
-               
+
                write_params (sig.get_parameters ());
 
                write_string (";");
@@ -1235,7 +1235,7 @@ public class Vala.CodeWriter : CodeVisitor {
 
                write_string (")");
        }
-       
+
        public override void visit_element_access (ElementAccess expr) {
                expr.container.accept (this);
                write_string ("[");
@@ -1530,13 +1530,13 @@ public class Vala.CodeWriter : CodeVisitor {
                write_string (fixed_content);
                write_string ("*/");
        }
-       
+
        private void write_identifier (string s) {
                char* id = (char*)s;
                int id_length = (int)s.length;
                if (Vala.Scanner.get_identifier_or_keyword (id, id_length) != Vala.TokenType.IDENTIFIER ||
                    s.get_char ().isdigit ()) {
-                       stream.putc ('@'); 
+                       stream.putc ('@');
                }
                write_string (s);
        }
@@ -1566,12 +1566,12 @@ public class Vala.CodeWriter : CodeVisitor {
                stream.puts (s);
                bol = false;
        }
-       
+
        private void write_newline () {
                stream.putc ('\n');
                bol = true;
        }
-       
+
        void write_code_block (Block? block) {
                if (block == null || type != CodeWriterType.DUMP) {
                        write_string (";");
@@ -1591,7 +1591,7 @@ public class Vala.CodeWriter : CodeVisitor {
                write_newline ();
                indent++;
        }
-       
+
        private void write_end_block () {
                indent--;
                write_indent ();
index 74cba969bcfe1aa97c178bd0a0a4713f7d9e8453..d139caeb45cd50769d2a84f4c3c20f9664a83f0a 100644 (file)
@@ -83,7 +83,7 @@ public class Vala.ConditionalExpression : Expression {
                false_expression = false_expr;
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_conditional_expression (this);
 
index 230c63d5ee03c329b0febd142e78855a3b319b53..e50951b454e1e2c317dabfd92ae1f9dc9e21405c 100644 (file)
@@ -88,7 +88,7 @@ public class Vala.Constant : Symbol, Lockable {
        public bool get_lock_used () {
                return lock_used;
        }
-       
+
        public void set_lock_used (bool used) {
                lock_used = used;
        }
index 1de109dbf726a0a5ae42c718aaa567231c74771e..dc9c93950794281c49252fe7aaada8a617377ffb 100644 (file)
@@ -35,7 +35,7 @@ public class Vala.ContinueStatement : CodeNode, Statement {
        public ContinueStatement (SourceReference source) {
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_continue_statement (this);
        }
index 67f4185e82f94dfea18fbf41d50e6c8142493e39..1bbbc82b6dcbdefd3813d80f9a2b2fceb7ab2fed 100644 (file)
@@ -43,7 +43,7 @@ public abstract class Vala.DataType : CodeNode {
         * The referred data type.
         */
        public weak TypeSymbol data_type { get; set; }
-       
+
        /**
         * Specifies that the expression transfers a floating reference.
         */
@@ -69,7 +69,7 @@ public abstract class Vala.DataType : CodeNode {
                type_argument_list.add (arg);
                arg.parent_node = this;
        }
-       
+
        /**
         * Returns a copy of the list of generic type arguments.
         *
@@ -166,7 +166,7 @@ public abstract class Vala.DataType : CodeNode {
 
                return s;
        }
-       
+
        /**
         * Creates a shallow copy of this type reference.
         *
@@ -214,10 +214,10 @@ public abstract class Vala.DataType : CodeNode {
                        if (!type2_args[i].equals (type_args[i]))
                                return false;
                }
-       
+
                return true;
        }
-       
+
        /**
         * Checks whether this type reference is at least as strict as the
         * specified type reference type2.
@@ -229,7 +229,7 @@ public abstract class Vala.DataType : CodeNode {
                if (type2.is_disposable () != is_disposable ()) {
                        return false;
                }
-               
+
                if (!type2.nullable && nullable) {
                        return false;
                }
@@ -248,7 +248,7 @@ public abstract class Vala.DataType : CodeNode {
                if (type2.floating_reference != floating_reference) {
                        return false;
                }
-               
+
                return true;
        }
 
index 3e79527a8e4d23268bf495407d4c61c16982f8fb..258fe4d4ec4200ac10cc4855e1aeb35a0ac5d494 100644 (file)
@@ -124,7 +124,7 @@ public class Vala.Delegate : TypeSymbol, Callable {
        public List<Parameter> get_parameters () {
                return parameters;
        }
-       
+
        /**
         * Checks whether the arguments and return type of the specified method
         * matches this callback.
@@ -142,7 +142,7 @@ public class Vala.Delegate : TypeSymbol, Callable {
                if (!m.return_type.stricter (return_type.get_actual_type (dt, null, this))) {
                        return false;
                }
-               
+
                var method_params = m.get_parameters ();
                Iterator<Parameter> method_params_it = method_params.iterator ();
 
@@ -179,7 +179,7 @@ public class Vala.Delegate : TypeSymbol, Callable {
                                return false;
                        }
                }
-               
+
                /* method may not expect more arguments */
                if (method_params_it.next ()) {
                        return false;
@@ -219,9 +219,9 @@ public class Vala.Delegate : TypeSymbol, Callable {
                foreach (TypeParameter p in type_parameters) {
                        p.accept (visitor);
                }
-               
+
                return_type.accept (visitor);
-               
+
                foreach (Parameter param in parameters) {
                        param.accept (visitor);
                }
@@ -265,9 +265,9 @@ public class Vala.Delegate : TypeSymbol, Callable {
                foreach (TypeParameter p in type_parameters) {
                        p.check (context);
                }
-               
+
                return_type.check (context);
-               
+
                foreach (Parameter param in parameters) {
                        param.check (context);
                }
index c368b5b282f8121d0b28499202616c452b3ba3a7..b7fa036603a184463b50b658b03d85af7b7b4687 100644 (file)
@@ -77,7 +77,7 @@ public class Vala.DoStatement : CodeNode, Statement {
                body.accept (visitor);
 
                condition.accept (visitor);
-               
+
                visitor.visit_end_full_expression (condition);
        }
 
index 4fb44b8c4628d4c43219385ec657581c287d4a49..993f9c1f58e856ba38f20ce3e4c43c6dc6b670a0 100644 (file)
@@ -56,12 +56,12 @@ public class Vala.ElementAccess : Expression {
        public List<Expression> get_indices () {
                return indices;
        }
-       
+
        public ElementAccess (Expression container, SourceReference source_reference) {
                this.source_reference = source_reference;
                this.container = container;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_element_access (this);
 
@@ -79,7 +79,7 @@ public class Vala.ElementAccess : Expression {
                if (container == old_node) {
                        container = new_node;
                }
-               
+
                int index = indices.index_of (old_node);
                if (index >= 0 && new_node.parent_node == null) {
                        indices[index] = new_node;
index 1cc6ae0aa03540949263b8e2f68426b9f8aed2ad..259574ac4350d70ee21ec143993a14d8395db443 100644 (file)
@@ -35,7 +35,7 @@ public class Vala.EmptyStatement : CodeNode, Statement {
        public EmptyStatement (SourceReference source) {
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_empty_statement (this);
        }
index add510783a8449da2758ab2baa894cd4efcbfb50..ad0a6b6d85e7298c4acace06a9d6ae6a6fb452f0 100644 (file)
@@ -54,7 +54,7 @@ public class Vala.Enum : TypeSymbol {
        public Enum (string name, SourceReference? source_reference = null, Comment? comment = null) {
                base (name, source_reference, comment);
        }
-       
+
        /**
         * Appends the specified enum value to the list of values.
         *
@@ -75,7 +75,7 @@ public class Vala.Enum : TypeSymbol {
        public override void add_method (Method m) {
                if (m is CreationMethod) {
                        Report.error (m.source_reference, "construction methods may only be declared within classes and structs");
-               
+
                        m.error = true;
                        return;
                }
index b4d27bf06c1b75efaaa239f1980ce50bbf238702..6d2f35bb16cb3675c8c62f86f40d0b44a0eb00b8 100644 (file)
@@ -36,7 +36,7 @@ public class Vala.EnumValue : Constant {
        public EnumValue (string name, Expression? value, SourceReference? source_reference = null, Comment? comment = null) {
                base (name, null, value, source_reference, comment);
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_enum_value (this);
        }
index aa97641c51aef0af3d1bfc6cc653a3a4fe9c8611..93308aec24c9d7910f1e12a03155aa3dc5143a0e 100644 (file)
@@ -52,7 +52,7 @@ public class Vala.ErrorCode : TypeSymbol {
                this (name, source_reference);
                this.value = value;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_error_code (this);
        }
index a73dcf84ddad0d8c37a1708653813f9bd597b2bd..1c63e51f39befdff4266723cefd4f752198fa92f 100644 (file)
@@ -39,7 +39,7 @@ public class Vala.ErrorDomain : TypeSymbol {
        public ErrorDomain (string name, SourceReference? source_reference = null, Comment? comment = null) {
                base (name, source_reference, comment);
        }
-       
+
        /**
         * Appends the specified code to the list of error codes.
         *
@@ -58,7 +58,7 @@ public class Vala.ErrorDomain : TypeSymbol {
        public override void add_method (Method m) {
                if (m is CreationMethod) {
                        Report.error (m.source_reference, "construction methods may only be declared within classes and structs");
-               
+
                        m.error = true;
                        return;
                }
@@ -106,7 +106,7 @@ public class Vala.ErrorDomain : TypeSymbol {
        public override bool is_reference_type () {
                return false;
        }
-       
+
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;
index 5f7a02333935616f9f0d7a1f180c2bfce7525ed2..885d82b9d2a1f8d53dac7cec4a0aa8532019bbcd 100644 (file)
@@ -28,7 +28,7 @@ using GLib;
 public abstract class Vala.Expression : CodeNode {
        /**
         * The static type of the value of this expression.
-        * 
+        *
         * The semantic analyzer computes this value.
         */
        public DataType value_type { get; set; }
index 88f80905d750ae30ef3b2d586a7f9d07923475c8..f0605543c63f6458004719fc30a7bd18be475289 100644 (file)
@@ -59,7 +59,7 @@ public class Vala.Field : Variable, Lockable {
 
        public override void accept_children (CodeVisitor visitor) {
                variable_type.accept (visitor);
-               
+
                if (initializer != null) {
                        initializer.accept (visitor);
                }
@@ -68,7 +68,7 @@ public class Vala.Field : Variable, Lockable {
        public bool get_lock_used () {
                return lock_used;
        }
-       
+
        public void set_lock_used (bool used) {
                lock_used = used;
        }
index 853eae73dabb9641c68db689ec3bfde2fadb3b1d..1fd580a46366458a754554a8d49a50af7a25d8fd 100644 (file)
@@ -443,7 +443,7 @@ public class Vala.FlowAnalyzer : CodeVisitor {
                foreach (CodeNode node in block.get_nodes ()) {
                        var used_variables = new ArrayList<Variable> ();
                        node.get_used_variables (used_variables);
-                       
+
                        foreach (Variable var_symbol in used_variables) {
                                var variable_stack = var_map.get (var_symbol);
                                if (variable_stack == null || variable_stack.size == 0) {
index 4de3f52bded656989b7abda463a2893243ac6bfe..4d928429f69a24e98948854e76fd2954a39efc2d 100644 (file)
@@ -38,12 +38,12 @@ public class Vala.ForeachStatement : Block {
                        }
                }
        }
-       
+
        /**
         * Specifies the element variable name.
         */
        public string variable_name { get; set; }
-       
+
        /**
         * Specifies the container.
         */
@@ -56,7 +56,7 @@ public class Vala.ForeachStatement : Block {
                        _collection.parent_node = this;
                }
        }
-       
+
        /**
         * Specifies the loop body.
         */
@@ -109,7 +109,7 @@ public class Vala.ForeachStatement : Block {
                this.body = body;
                this.type_reference = type_reference;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                if (use_iterator) {
                        base.accept (visitor);
@@ -167,7 +167,7 @@ public class Vala.ForeachStatement : Block {
 
                var collection_type = collection.value_type.copy ();
                collection.target_type = collection_type.copy ();
-               
+
                if (collection_type.is_array ()) {
                        var array_type = (ArrayType) collection_type;
 
index ab80af520fc529ad0b7c241984b8cebc04dda03d..80ff8dbeb1fa803b28f026ef32c456e3e8279f98 100644 (file)
@@ -40,7 +40,7 @@ public class Vala.ForStatement : CodeNode, Statement {
                        }
                }
        }
-       
+
        /**
         * Specifies the loop body.
         */
@@ -73,7 +73,7 @@ public class Vala.ForStatement : CodeNode, Statement {
                this.body = body;
                this.source_reference = source_reference;
        }
-       
+
        /**
         * Appends the specified expression to the list of initializers.
         *
@@ -83,7 +83,7 @@ public class Vala.ForStatement : CodeNode, Statement {
                init.parent_node = this;
                initializer.add (init);
        }
-       
+
        /**
         * Returns a copy of the list of initializers.
         *
@@ -92,7 +92,7 @@ public class Vala.ForStatement : CodeNode, Statement {
        public List<Expression> get_initializer () {
                return initializer;
        }
-       
+
        /**
         * Appends the specified expression to the iterator.
         *
@@ -102,7 +102,7 @@ public class Vala.ForStatement : CodeNode, Statement {
                iter.parent_node = this;
                iterator.add (iter);
        }
-       
+
        /**
         * Returns a copy of the iterator.
         *
@@ -111,11 +111,11 @@ public class Vala.ForStatement : CodeNode, Statement {
        public List<Expression> get_iterator () {
                return iterator;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_for_statement (this);
        }
-       
+
        public override void accept_children (CodeVisitor visitor) {
                foreach (Expression init_expr in initializer) {
                        init_expr.accept (visitor);
@@ -132,7 +132,7 @@ public class Vala.ForStatement : CodeNode, Statement {
                        it_expr.accept (visitor);
                        visitor.visit_end_full_expression (it_expr);
                }
-               
+
                body.accept (visitor);
        }
 
index dfffa23a7a51220bac59e39ba679a36463375748..e563580aaa3328ad801e67f965ff15c6d7fc8585 100644 (file)
@@ -40,9 +40,9 @@ public class Vala.Genie.Parser : CodeVisitor {
        int size;
 
        Comment comment;
-       
+
        string class_name;
-       
+
        /* hack needed to know if any part of an expression is a lambda one */
        bool current_expr_is_lambda;
 
@@ -140,9 +140,9 @@ public class Vala.Genie.Parser : CodeVisitor {
                }
                return false;
        }
-       
+
        inline bool accept_block () {
-       
+
                bool has_term = accept_terminator ();
 
                if (accept (TokenType.INDENT)) {
@@ -197,7 +197,7 @@ public class Vala.Genie.Parser : CodeVisitor {
        inline SourceLocation get_location () {
                return tokens[index].begin;
        }
-       
+
        string get_current_string () {
                var token = tokens[index];
                return ((string) token.begin.pos).substring (0, (int) (token.end.pos - token.begin.pos));
@@ -378,7 +378,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                        SourceReference src_begin = get_src (begin);
                        expect (TokenType.CLOSE_REGEX_LITERAL);
                        string close_token = get_last_string ();
-                       return new RegexLiteral ("%s/%s".printf (close_token, match_part), src_begin);  
+                       return new RegexLiteral ("%s/%s".printf (close_token, match_part), src_begin);
                case TokenType.STRING_LITERAL:
                        next ();
                        return new StringLiteral (get_last_string (), get_src (begin));
@@ -389,7 +389,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                        next ();
                        string raw_string = get_last_string ();
                        string escaped_string = raw_string.substring (3, raw_string.length - 6).escape ("");
-                       return new StringLiteral ("\"%s\"".printf (escaped_string), get_src (begin));   
+                       return new StringLiteral ("\"%s\"".printf (escaped_string), get_src (begin));
                case TokenType.NULL:
                        next ();
                        return new NullLiteral (get_src (begin));
@@ -409,7 +409,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                scanner.indent_spaces = 0;
                index = -1;
                size = 0;
-               
+
                next ();
 
                try {
@@ -427,13 +427,13 @@ public class Vala.Genie.Parser : CodeVisitor {
                                        rollback (begin);
                                }
                        }
-                       
+
                        parse_using_directives (context.root);
                        parse_declarations (context.root, true);
                } catch (ParseError e) {
                        report_parse_error (e);
                }
-               
+
                scanner = null;
                if (!has_global_context) {
                        context = null;
@@ -457,24 +457,24 @@ public class Vala.Genie.Parser : CodeVisitor {
        }
 
        void skip_type () throws ParseError {
-               
+
                accept (TokenType.DYNAMIC);
                accept (TokenType.OWNED);
                accept (TokenType.UNOWNED);
                accept (TokenType.WEAK);
-               
+
 
                if (accept (TokenType.ARRAY) || accept (TokenType.LIST) || accept (TokenType.DICT)) {
                        accept (TokenType.OF);
                }
-               
+
                if (accept (TokenType.VOID)) {
                } else {
                        skip_symbol_name ();
                        skip_type_argument_list ();
                }
-               
-               while (accept (TokenType.OPEN_BRACKET)) {       
+
+               while (accept (TokenType.OPEN_BRACKET)) {
                        do {
                                if (current () != TokenType.COMMA && current () != TokenType.CLOSE_BRACKET) {
                                        parse_expression ();
@@ -486,8 +486,8 @@ public class Vala.Genie.Parser : CodeVisitor {
                accept (TokenType.INTERR);
                accept (TokenType.HASH);
        }
-       
-       
+
+
        Expression parse_regex_literal () throws ParseError {
                expect (TokenType.OPEN_REGEX_LITERAL);
 
@@ -501,10 +501,10 @@ public class Vala.Genie.Parser : CodeVisitor {
 
                List<DataType> type_arg_list = null;
                UnresolvedSymbol sym = null;
-               
+
                bool is_dynamic = accept (TokenType.DYNAMIC);
                bool value_owned = owned_by_default;
-               
+
                if (owned_by_default) {
                        if (accept (TokenType.UNOWNED)) {
                                value_owned = false;
@@ -520,36 +520,36 @@ public class Vala.Genie.Parser : CodeVisitor {
 
                /* handle arrays */
                bool is_array = false;
-               
+
                if (accept (TokenType.ARRAY)) {
                        expect (TokenType.OF);
                        is_array = true;
                }
-               
+
                /* handle lists */
                bool is_list = false;
-               
+
                if (accept (TokenType.LIST)) {
                        expect (TokenType.OF);
                        prev ();
                        is_list = true;
                }
-               
+
                /* handle dicts */
                bool is_dict = false;
-               
+
                if (accept (TokenType.DICT)) {
                        expect (TokenType.OF);
                        prev ();
                        is_dict = true;
                }
-               
+
                DataType type;
-               
+
                if (!is_dynamic && value_owned == owned_by_default && accept (TokenType.VOID)) {
                        type = new VoidType (get_src (begin));
                } else {
-                       
+
                        if (is_list) {
                                var sym_parent = new UnresolvedSymbol (null, "Gee", get_src (begin));
                                sym = new UnresolvedSymbol (sym_parent, "ArrayList", get_src (begin));
@@ -559,7 +559,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                        } else {
                                sym = parse_symbol_name ();
                        }
-                       
+
                        type_arg_list = parse_type_argument_list (false);
 
                        type = new UnresolvedType.from_symbol (sym, get_src (begin));
@@ -569,7 +569,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                                }
                        }
                }
-               
+
                while (accept (TokenType.STAR)) {
                         type = new PointerType (type, get_src (begin));
                }
@@ -579,16 +579,16 @@ public class Vala.Genie.Parser : CodeVisitor {
                }
 
                if (is_array) {
-                       
+
                        if (!accept (TokenType.OPEN_BRACKET)) {
                                type.value_owned = true;
                                type = new ArrayType (type, 1, get_src (begin));
                                type.nullable = accept (TokenType.INTERR);
-                       
+
                        } else {
                                prev ();
-                       
-                               while (accept (TokenType.OPEN_BRACKET)) {               
+
+                               while (accept (TokenType.OPEN_BRACKET)) {
                                        bool invalid_array = false;
                                        int array_rank = 0;
                                        do {
@@ -605,14 +605,14 @@ public class Vala.Genie.Parser : CodeVisitor {
                                        type.value_owned = true;
                                        var array_type = new ArrayType (type, array_rank, get_src (begin));
                                        array_type.nullable = accept (TokenType.INTERR);
-                                       
+
                                        array_type.invalid_syntax = invalid_array;
-                                       
+
                                        type = array_type;
                                }
                        }
                }
-               
+
                if (!owned_by_default) {
                        value_owned = accept (TokenType.HASH);
                }
@@ -620,7 +620,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                if (type is PointerType) {
                        value_owned = false;
                }
-               
+
                type.is_dynamic = is_dynamic;
                type.value_owned = value_owned;
                return type;
@@ -660,7 +660,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                }
                return list;
        }
-       
+
        Expression parse_argument () throws ParseError {
                var begin = get_location ();
 
@@ -703,7 +703,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                        expr = parse_literal ();
                        break;
                case TokenType.ASSERT:
-                       return parse_assert_expression ();      
+                       return parse_assert_expression ();
                case TokenType.OPEN_BRACE:
                        expr = parse_initializer ();
                        break;
@@ -735,7 +735,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                        break;
                case TokenType.YIELD:
                        expr = parse_yield_expression ();
-                       break;  
+                       break;
                default:
                        expr = parse_simple_name ();
                        break;
@@ -763,7 +763,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                        case TokenType.OP_DEC:
                                expr = parse_post_decrement_expression (begin, expr);
                                break;
-                       
+
                        default:
                                found = false;
                                break;
@@ -857,12 +857,12 @@ public class Vala.Genie.Parser : CodeVisitor {
                                var p_expr = parse_expression ();
                                if (i == 0) {
                                        i++;
-                                       
-                                       if (p_expr != null) { 
+
+                                       if (p_expr != null) {
                                                if (p_expr is StringLiteral) {
                                                        var s_exp = (StringLiteral) p_expr;
                                                        var len = s_exp.value.length;
-                                                       
+
                                                        if (len > 2) {
                                                                string s = "\\n\"";
                                                                var st =  s_exp.value.substring (0, len-1);
@@ -878,7 +878,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                                                        list.add (s_exp);
                                                }
                                        }
-                               } 
+                               }
                                list.add (p_expr);
 
                        } while (accept (TokenType.COMMA));
@@ -888,12 +888,12 @@ public class Vala.Genie.Parser : CodeVisitor {
 
        Expression parse_print_expression () throws ParseError {
                var begin = get_location ();
-       
+
                expect (TokenType.PRINT);
                bool parens = accept (TokenType.OPEN_PARENS);
 
                var expr = new MemberAccess (null, "print", get_src (begin));
-               
+
                var arg_list = parse_print_argument_list ();
 
                if (parens) {
@@ -901,23 +901,23 @@ public class Vala.Genie.Parser : CodeVisitor {
                }
 
                var print_expr = new MethodCall (expr, get_src (begin));
-               
+
                foreach (Expression arg in arg_list) {
                        print_expr.add_argument (arg);
                }
-               
+
                return print_expr;
-               
+
        }
-       
+
        Expression parse_assert_expression () throws ParseError {
                var begin = get_location ();
-       
+
                expect (TokenType.ASSERT);
                bool parens = accept (TokenType.OPEN_PARENS);
 
                var expr = new MemberAccess (null, "assert", get_src (begin));
-               
+
                var arg_list = parse_argument_list ();
 
                if (parens) {
@@ -925,20 +925,20 @@ public class Vala.Genie.Parser : CodeVisitor {
                }
 
                var assert_expr = new MethodCall (expr, get_src (begin));
-               
+
                foreach (Expression arg in arg_list) {
                        assert_expr.add_argument (arg);
                }
-               
+
                return assert_expr;
-               
+
        }
 
        Expression parse_method_call (SourceLocation begin, Expression inner) throws ParseError {
                expect (TokenType.OPEN_PARENS);
                var arg_list = parse_argument_list ();
                expect (TokenType.CLOSE_PARENS);
-               
+
                var init_list = parse_object_initializer ();
 
                if (init_list.size > 0 && inner is MemberAccess) {
@@ -1018,21 +1018,21 @@ public class Vala.Genie.Parser : CodeVisitor {
        Expression parse_object_or_array_creation_expression () throws ParseError {
                var begin = get_location ();
                expect (TokenType.NEW);
-               
+
                if (accept (TokenType.ARRAY)) {
                        expect (TokenType.OF);
                        var mtype = parse_type (true, false);
                        var expr = parse_array_creation_expression (begin, mtype);
                        return expr;
                }
-               
+
                if (accept (TokenType.LIST)) {
                        expect (TokenType.OF);
                        var mtype = parse_type (true, false);
                        var expr = parse_list_creation_expression (begin, mtype);
                        return expr;
                }
-               
+
                if (accept (TokenType.DICT)) {
                        expect (TokenType.OF);
                        var mtype1 = parse_type (true, false);
@@ -1041,12 +1041,12 @@ public class Vala.Genie.Parser : CodeVisitor {
                        var expr = parse_dict_creation_expression (begin, mtype1, mtype2);
                        return expr;
                }
-               
-               
+
+
                var member = parse_member_name ();
                var expr = parse_object_creation_expression (begin, member);
                return expr;
-               
+
        }
 
        Expression parse_object_creation_expression (SourceLocation begin, MemberAccess member) throws ParseError {
@@ -1058,7 +1058,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                } else {
                        arg_list = new ArrayList<Expression> ();
                }
-               
+
                var init_list = parse_object_initializer ();
 
                var expr = new ObjectCreationExpression (member, get_src (begin));
@@ -1076,17 +1076,17 @@ public class Vala.Genie.Parser : CodeVisitor {
                List<Expression> size_specifier_list = null;
                bool first = true;
                DataType etype = element_type.copy ();
-               
+
                var has_bracket = accept (TokenType.OPEN_BRACKET);
-               
+
                do {
                        if (!first) {
                                // array of arrays: new T[][42]
-                               
+
                                if (size_specified) {
                                        throw new ParseError.SYNTAX ("size of inner arrays must not be specified in array creation expression");
                                }
-                               
+
                                etype = new ArrayType (etype, size_specifier_list.size, etype.source_reference);
                        } else {
                                first = false;
@@ -1101,7 +1101,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                                }
                                size_specifier_list.add (size);
                        } while (accept (TokenType.COMMA));
-                       
+
                        if (has_bracket) {
                                expect (TokenType.CLOSE_BRACKET);
                        }
@@ -1111,7 +1111,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                if (accept (TokenType.ASSIGN)) {
                        initializer = parse_initializer ();
                }
-               
+
                var expr = new ArrayCreationExpression (etype, size_specifier_list.size, initializer, get_src (begin));
                if (size_specified) {
                        foreach (Expression size in size_specifier_list) {
@@ -1120,38 +1120,38 @@ public class Vala.Genie.Parser : CodeVisitor {
                }
                return expr;
        }
-       
-       
+
+
        Expression parse_list_creation_expression (SourceLocation begin, DataType element_type) throws ParseError {
-               
+
                MemberAccess list_member = null, parent_member = null;
-               
+
                parent_member = new MemberAccess (null, "Gee", get_src (begin));
                list_member = new MemberAccess (parent_member, "ArrayList", get_src (begin));
                list_member.add_type_argument (element_type);
-               
+
                list_member.creation_member = true;
-               
+
                var expr = new ObjectCreationExpression (list_member, get_src (begin));
                return expr;
        }
-       
+
        Expression parse_dict_creation_expression (SourceLocation begin, DataType key_type, DataType value_type) throws ParseError {
-       
+
                MemberAccess dict_member = null, parent_member = null;
-               
+
                parent_member = new MemberAccess (null, "Gee", get_src (begin));
                dict_member = new MemberAccess (parent_member, "HashMap", get_src (begin));
                dict_member.add_type_argument (key_type);
                dict_member.add_type_argument (value_type);
-       
+
                dict_member.creation_member = true;
-               
+
                var expr = new ObjectCreationExpression (dict_member, get_src (begin));
 
                return expr;
        }
-       
+
 
        List<MemberInitializer> parse_object_initializer () throws ParseError {
                var list = new ArrayList<MemberInitializer> ();
@@ -1238,7 +1238,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                case TokenType.HASH:
                        if (!context.deprecated) {
                                Report.warning (get_src (begin), "deprecated syntax, use `(owned)` cast");
-                       }               
+                       }
                        next ();
                        var op = parse_unary_expression ();
                        return new ReferenceTransferExpression (op, get_src (begin));
@@ -1299,7 +1299,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                                        return new CastExpression.non_null (inner, get_src (begin));
                                }
                                break;
-       
+
                        default:
                                break;
                        }
@@ -1334,7 +1334,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                case TokenType.OP_LE:   return BinaryOperator.LESS_THAN_OR_EQUAL;
                case TokenType.OP_GE:   return BinaryOperator.GREATER_THAN_OR_EQUAL;
                case TokenType.OP_EQ:   return BinaryOperator.EQUALITY;
-               case TokenType.IS:   
+               case TokenType.IS:
                        next();
                        if (current () == TokenType.OP_NEG) {
                                prev ();
@@ -1582,13 +1582,13 @@ public class Vala.Genie.Parser : CodeVisitor {
                param.direction = direction;
                return param;
        }
-       
+
        Expression parse_lambda_expression () throws ParseError {
                var begin = get_location ();
                List<Parameter> params = new ArrayList<Parameter> ();
-               
+
                expect (TokenType.DEF);
-               
+
                if (accept (TokenType.OPEN_PARENS)) {
                        if (current () != TokenType.CLOSE_PARENS) {
                                do {
@@ -1609,7 +1609,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                        var expr = parse_expression ();
                        lambda = new LambdaExpression (expr, get_src (begin));
                        expect_terminator ();
-                       
+
                }
 
 
@@ -1685,10 +1685,10 @@ public class Vala.Genie.Parser : CodeVisitor {
 
 
        Statement get_for_statement_type () throws ParseError {
-       
+
                var begin = get_location ();
                bool is_foreach = false;
-                                                                               
+
                while (current () != TokenType.EOL && current () != TokenType.DO) {
                        next ();
                        if (accept (TokenType.IN)) {
@@ -1696,9 +1696,9 @@ public class Vala.Genie.Parser : CodeVisitor {
                                break;
                        }
                }
-                                       
+
                rollback (begin);
-                                       
+
                if (is_foreach) {
                        return parse_foreach_statement ();
                } else {
@@ -1717,10 +1717,10 @@ public class Vala.Genie.Parser : CodeVisitor {
                                comment = scanner.pop_comment ();
                                switch (current ()) {
 
-                               /* skip over requires and ensures as we handled them in method declaration */   
+                               /* skip over requires and ensures as we handled them in method declaration */
                                case TokenType.REQUIRES:
                                case TokenType.ENSURES:
-                                       var begin = get_location ();    
+                                       var begin = get_location ();
                                        next ();
 
                                        if (accept (TokenType.EOL) && accept (TokenType.INDENT)) {
@@ -1736,9 +1736,9 @@ public class Vala.Genie.Parser : CodeVisitor {
 
                                                expect (TokenType.EOL);
                                        }
-               
+
                                        stmt =  new EmptyStatement (get_src (begin));
-                                       break;                          
+                                       break;
 
 
                                case TokenType.INDENT:
@@ -1750,7 +1750,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                                        break;
                                case TokenType.PRINT:
                                case TokenType.ASSERT:
-                                       stmt = parse_expression_statement ();   
+                                       stmt = parse_expression_statement ();
                                        break;
                                case TokenType.IF:
                                        stmt = parse_if_statement ();
@@ -1930,7 +1930,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                }
 
                block.source_reference.end = get_current_src ().end;
-               
+
                return block;
        }
 
@@ -2054,7 +2054,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                expect (TokenType.INDENT);
                while (current () != TokenType.DEDENT) {
                        var section = new SwitchSection (get_src (begin));
-                       
+
                        if (accept (TokenType.WHEN)) {
                                do {
                                        section.add_label (new SwitchLabel (parse_expression (), get_src (begin)));
@@ -2106,7 +2106,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                var condition = parse_expression ();
 
                expect_terminator ();
-               
+
                return new DoStatement (body, condition, get_src (begin));
        }
 
@@ -2127,7 +2127,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                        is_expr = false;
                        break;
                default:
-                       
+
                        bool local_is_expr = is_expression ();
                        is_expr = local_is_expr;
                        break;
@@ -2149,7 +2149,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                                expect (TokenType.COLON);
                                variable_type = parse_type (true, true);
                        }
-                       
+
                        DataType type_copy = null;
                        if (variable_type != null) {
                                type_copy = variable_type.copy ();
@@ -2158,18 +2158,18 @@ public class Vala.Genie.Parser : CodeVisitor {
 
                        block.add_statement (new DeclarationStatement (local, local.source_reference));
                }
-               
-               
-               
+
+
+
                if (accept (TokenType.TO)) {
-                       /* create expression for condition and incrementing iterator */         
+                       /* create expression for condition and incrementing iterator */
                        var to_begin = get_location ();
                        var to_src = get_src (to_begin);
                        var left = new MemberAccess (null, id, to_src);
                        var right = parse_primary_expression ();
 
                        condition = new BinaryExpression (BinaryOperator.LESS_THAN_OR_EQUAL, left, right, to_src);
-                       
+
                        iterator = new PostfixExpression (left, true, to_src);
                } else {
                        expect (TokenType.DOWNTO);
@@ -2254,7 +2254,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                } else {
                        expect_terminator ();
                }
-               return new ReturnStatement (expr, get_src (begin)); 
+               return new ReturnStatement (expr, get_src (begin));
        }
 
        Statement parse_yield_statement () throws ParseError {
@@ -2312,7 +2312,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                                expect (TokenType.COLON);
                                type = parse_type (true, true);
                                expect (TokenType.EOL);
-                               
+
                        }
                        var block = parse_block ();
                        catch_clauses.add (new CatchClause (type, id, block, get_src (begin)));
@@ -2394,7 +2394,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                        expect (TokenType.CLOSE_BRACKET);
                }
                if (!parameter)
-                       expect (TokenType.EOL);         
+                       expect (TokenType.EOL);
                return attrs;
        }
 
@@ -2413,10 +2413,10 @@ public class Vala.Genie.Parser : CodeVisitor {
                comment = scanner.pop_comment ();
                var attrs = parse_attributes (false);
                var begin = get_location ();
-               
+
                switch (current ()) {
                case TokenType.CONST:
-                       return parse_constant_declaration (attrs);      
+                       return parse_constant_declaration (attrs);
                case TokenType.CONSTRUCT:
                        return parse_creation_method_declaration (attrs);
                case TokenType.CLASS:
@@ -2427,8 +2427,8 @@ public class Vala.Genie.Parser : CodeVisitor {
                        }
                        rollback (begin);
                        return parse_constructor_declaration (attrs);
-               case TokenType.DELEGATE:        
-                       return parse_delegate_declaration (attrs);      
+               case TokenType.DELEGATE:
+                       return parse_delegate_declaration (attrs);
                case TokenType.DEF:
                        return parse_method_declaration (attrs);
                case TokenType.ENUM:
@@ -2437,18 +2437,18 @@ public class Vala.Genie.Parser : CodeVisitor {
                        return parse_errordomain_declaration (attrs);
                case TokenType.FINAL:
                        return parse_destructor_declaration (attrs);
-               case TokenType.INTERFACE:       
-                       return parse_interface_declaration (attrs);             
-               case TokenType.NAMESPACE:       
-                       return parse_namespace_declaration (attrs);     
-               case TokenType.PROP:    
+               case TokenType.INTERFACE:
+                       return parse_interface_declaration (attrs);
+               case TokenType.NAMESPACE:
+                       return parse_namespace_declaration (attrs);
+               case TokenType.PROP:
                        return parse_property_declaration (attrs);
-               case TokenType.EVENT:   
+               case TokenType.EVENT:
                        return parse_signal_declaration (attrs);
-               case TokenType.STRUCT:  
+               case TokenType.STRUCT:
                        return parse_struct_declaration (attrs);
-               default: 
-                       
+               default:
+
                        while (current () != TokenType.EOL && current () != TokenType.SEMICOLON && current () != TokenType.EOF) {
                                if (current () == TokenType.COLON) {
                                        rollback (begin);
@@ -2458,10 +2458,10 @@ public class Vala.Genie.Parser : CodeVisitor {
                                }
                        }
                        rollback (begin);
-                       
-                       break;  
+
+                       break;
                }
-               
+
                TokenType cur = current ();
                TokenType pre =  tokens[index-1].type;
 
@@ -2568,7 +2568,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                set_attributes (ns, attrs);
                expect (TokenType.EOL);
                parse_declarations (ns);
-               
+
                Namespace result = ns;
                while (sym.inner != null) {
                        sym = sym.inner;
@@ -2620,7 +2620,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                var begin = get_location ();
                var sym = parse_symbol_name ();
                var ns_ref = new UsingDirective (sym, get_src (begin));
-               
+
                scanner.source_file.add_using_directive (ns_ref);
                ns.add_using_directive (ns_ref);
        }
@@ -2632,19 +2632,19 @@ public class Vala.Genie.Parser : CodeVisitor {
 
                                while (current () != TokenType.DEDENT && current () != TokenType.EOF) {
                                        add_uses_clause (ns);
-                                       expect (TokenType.EOL); 
+                                       expect (TokenType.EOL);
                                }
 
                                expect (TokenType.DEDENT);
                        } else {
                                do {
-                                       add_uses_clause (ns);   
+                                       add_uses_clause (ns);
                                } while (accept (TokenType.COMMA));
 
                                expect_terminator ();
                        }
                }
-               
+
        }
 
        Symbol parse_class_declaration (List<Attribute>? attrs) throws ParseError {
@@ -2659,7 +2659,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                if (accept (TokenType.COLON)) {
                        var type1 = parse_type (true, false);
                        base_types.add (type1);
-                       
+
                        if (accept (TokenType.IMPLEMENTS)) {
                                do {
                                        var type2 = parse_type (true, true);
@@ -2792,7 +2792,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                var flags = parse_member_declaration_modifiers ();
 
                string id = parse_identifier ();
-       
+
                expect (TokenType.COLON);
                var type = parse_type (false, false);
                type = parse_inline_array_type (type);
@@ -2811,14 +2811,14 @@ public class Vala.Genie.Parser : CodeVisitor {
 
                var c = new Constant (id, type, initializer, get_src (begin), comment);
                c.access = get_access (id);
-               
+
                if (ModifierFlags.EXTERN in flags || scanner.source_file.file_type == SourceFileType.PACKAGE) {
                        c.external = true;
                }
                if (ModifierFlags.NEW in flags) {
                        c.hides = true;
                }
-               
+
                set_attributes (c, attrs);
 
                if (ModifierFlags.STATIC in flags) {
@@ -2836,10 +2836,10 @@ public class Vala.Genie.Parser : CodeVisitor {
                var flags = parse_member_declaration_modifiers ();
 
                var type = parse_type (true, true);
-               
+
                type = parse_inline_array_type (type);
 
-               var f = new Field (id, type, null, get_src (begin), comment); 
+               var f = new Field (id, type, null, get_src (begin), comment);
 
                if (ModifierFlags.ABSTRACT in flags || ModifierFlags.VIRTUAL in flags || ModifierFlags.OVERRIDE in flags) {
                        Report.error (f.source_reference, "abstract, virtual, and override modifiers are not applicable to fields");
@@ -2892,9 +2892,9 @@ public class Vala.Genie.Parser : CodeVisitor {
                }
                return initializer;
        }
-       
-       
-       
+
+
+
 
        Method parse_main_method_declaration (List<Attribute>? attrs) throws ParseError {
                var id = "main";
@@ -2904,27 +2904,27 @@ public class Vala.Genie.Parser : CodeVisitor {
 
                var method = new Method (id, type, get_src (begin), comment);
                method.access = SymbolAccessibility.PUBLIC;
-               
+
                set_attributes (method, attrs);
 
                method.binding = MemberBinding.STATIC;
-                               
+
                var sym = new UnresolvedSymbol (null, "string", get_src (begin));
                type = new UnresolvedType.from_symbol (sym, get_src (begin));
                type.value_owned = true;
                type = new ArrayType (type, 1, get_src (begin));
                type.nullable = false;
-                               
+
                var param = new Parameter ("args", type, get_src (begin));
                method.add_parameter (param);
-               
-               
+
+
                expect (TokenType.EOL);
 
                if (accept_block ()) {
                        method.body = parse_block ();
                }
-               
+
                return method;
        }
 
@@ -2953,10 +2953,10 @@ public class Vala.Genie.Parser : CodeVisitor {
                if (accept (TokenType.COLON)) {
                        type = parse_type (true, false);
                }
-               
+
                var type_param_list = parse_type_parameter_list ();
 
-               var method = new Method (id, type, get_src (begin), comment); 
+               var method = new Method (id, type, get_src (begin), comment);
                if (ModifierFlags.PRIVATE in flags) {
                        method.access = SymbolAccessibility.PRIVATE;
                } else {
@@ -2969,7 +2969,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                foreach (TypeParameter type_param in type_param_list) {
                        method.add_type_parameter (type_param);
                }
-               
+
 
                foreach (Parameter param in params) {
                        method.add_parameter (param);
@@ -2990,7 +2990,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                if (ModifierFlags.ASYNC in flags) {
                        method.coroutine = true;
                }
-               
+
                if (ModifierFlags.NEW in flags) {
                        method.hides = true;
                }
@@ -3031,24 +3031,24 @@ public class Vala.Genie.Parser : CodeVisitor {
 
 
                /* "requires" and "ensures" if present will be at  start of the method body */
-               if (accept (TokenType.INDENT)) {                
+               if (accept (TokenType.INDENT)) {
                        if (accept (TokenType.REQUIRES)) {
-                       
+
                                if (accept (TokenType.EOL) && accept (TokenType.INDENT)) {
                                        while (current() != TokenType.DEDENT) {
                                                method.add_precondition (parse_expression ());
                                                expect (TokenType.EOL);
                                        }
-                                       
+
                                        expect (TokenType.DEDENT);
                                        accept_terminator ();
                                } else {
-                               
+
                                        method.add_precondition (parse_expression ());
                                        expect_terminator ();
-                               
+
                                }
-                               
+
                        }
 
                        if (accept (TokenType.ENSURES)) {
@@ -3101,7 +3101,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                }
 
                set_attributes (prop, attrs);
-               
+
                if (ModifierFlags.STATIC in flags) {
                        prop.binding = MemberBinding.STATIC;
                } else if (ModifierFlags.CLASS in flags) {
@@ -3116,14 +3116,14 @@ public class Vala.Genie.Parser : CodeVisitor {
                if (ModifierFlags.OVERRIDE in flags) {
                        prop.overrides = true;
                }
-               
+
                if (ModifierFlags.NEW in flags) {
                        prop.hides = true;
                }
                if (ModifierFlags.EXTERN in flags || scanner.source_file.file_type == SourceFileType.PACKAGE) {
                        prop.external = true;
                }
-               
+
                if (ModifierFlags.ASYNC in flags) {
                        Report.error (prop.source_reference, "async properties are not supported yet");
                }
@@ -3196,7 +3196,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 
                                prop.set_accessor = new PropertyAccessor (false, true, false, value_type, null, get_src (begin));
                                prop.set_accessor.access = SymbolAccessibility.PUBLIC;
-                       
+
                        }
 
                        expect_terminator ();
@@ -3206,7 +3206,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                        var needs_var = (readonly && (prop.get_accessor != null && prop.get_accessor.body == null));
 
                        if (!needs_var) {
-                               needs_var = (prop.get_accessor != null && prop.get_accessor.body == null) || (prop.set_accessor != null && prop.set_accessor.body == null);     
+                               needs_var = (prop.get_accessor != null && prop.get_accessor.body == null) || (prop.set_accessor != null && prop.set_accessor.body == null);
                        }
 
                        if (needs_var) {
@@ -3260,7 +3260,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                if (ModifierFlags.NEW in flags) {
                        sig.hides = true;
                }
-               
+
                if (ModifierFlags.STATIC in flags) {
                        throw new ParseError.SYNTAX ("`static' modifier not allowed on signals");
                } else if (ModifierFlags.CLASS in flags) {
@@ -3359,7 +3359,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                } else if (sym is Constant) {
                        st.add_constant ((Constant) sym);
                } else if (sym is Property) {
-                       st.add_property ((Property) sym);       
+                       st.add_property ((Property) sym);
                } else {
                        Report.error (sym.source_reference, "unexpected declaration in struct");
                }
@@ -3399,9 +3399,9 @@ public class Vala.Genie.Parser : CodeVisitor {
 
 
                expect (TokenType.EOL);
-               
+
                parse_declarations (iface);
-               
+
 
                Symbol result = iface;
                while (sym.inner != null) {
@@ -3467,7 +3467,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                                break;
                        }
                        var value_attrs = parse_attributes (false);
-                       var value_begin = get_location (); 
+                       var value_begin = get_location ();
                        string id = parse_identifier ();
                        comment = scanner.pop_comment ();
 
@@ -3485,7 +3485,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                                accept (TokenType.EOL);
                        }
                } while (true);
-               
+
                expect (TokenType.DEDENT);
 
                Symbol result = en;
@@ -3537,15 +3537,15 @@ public class Vala.Genie.Parser : CodeVisitor {
                        ed.add_code (ec);
                        accept (TokenType.EOL);
                } while (true);
-               
-               
+
+
                expect (TokenType.DEDENT);
 
                Symbol result = ed;
                while (sym.inner != null) {
                        sym = sym.inner;
                        var ns = new Namespace (sym.name, ed.source_reference);
-                       
+
                        if (result is Namespace) {
                                ns.add_namespace ((Namespace) result);
                        } else {
@@ -3597,7 +3597,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                        case TokenType.ASYNC:
                                next ();
                                flags |= ModifierFlags.ASYNC;
-                               break;  
+                               break;
                        case TokenType.CLASS:
                                next ();
                                flags |= ModifierFlags.CLASS;
@@ -3613,7 +3613,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                        case TokenType.NEW:
                                next ();
                                flags |= ModifierFlags.NEW;
-                               break;  
+                               break;
                        case TokenType.OVERRIDE:
                                next ();
                                flags |= ModifierFlags.OVERRIDE;
@@ -3621,7 +3621,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                        case TokenType.SEALED:
                                next ();
                                flags |= ModifierFlags.SEALED;
-                               break;  
+                               break;
                        case TokenType.STATIC:
                                next ();
                                flags |= ModifierFlags.STATIC;
@@ -3693,7 +3693,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                } else {
                        var sym = parse_symbol_name ();
                        if (sym.inner == null) {
-                       
+
                                if (sym.name != class_name) {
                                        method = new CreationMethod (class_name, sym.name, get_src (begin), comment);
                                } else {
@@ -3726,7 +3726,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                } else if (scanner.source_file.file_type == SourceFileType.PACKAGE) {
                        method.external = true;
                }
-               
+
                return method;
        }
 
@@ -3741,7 +3741,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                var sym = parse_symbol_name ();
 
                var type_param_list = parse_type_parameter_list ();
-               
+
                if (ModifierFlags.NEW in flags) {
                        throw new ParseError.SYNTAX ("`new' modifier not allowed on delegates");
                }
@@ -3759,7 +3759,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 
                if (accept (TokenType.COLON)) {
                        type = parse_type (true, false);
-                       
+
                } else {
                        type = new VoidType ();
                }
@@ -3774,7 +3774,7 @@ public class Vala.Genie.Parser : CodeVisitor {
 
                expect_terminator ();
 
-               
+
                if (ModifierFlags.PRIVATE in flags) {
                        d.access = SymbolAccessibility.PRIVATE;
                } else {
@@ -3847,7 +3847,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                }
        }
 
-       
+
        // try to parse type argument list
        List<DataType>? parse_type_argument_list (bool maybe_expression) throws ParseError {
                var begin = get_location ();
@@ -3860,7 +3860,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                        if (accept (TokenType.OPEN_PARENS)) {
                                inParens = true;
                        }
-                                                       
+
                        do {
                                switch (current ()) {
                                case TokenType.VOID:
@@ -3877,7 +3877,7 @@ public class Vala.Genie.Parser : CodeVisitor {
                                        return null;
                                }
                        } while (accept (TokenType.COMMA));
-                       
+
                        if (inParens) {
                                expect (TokenType.CLOSE_PARENS);
                        }
index e232a77bc44e281e285cb4c8ff9d4ce65ff0f5f9..177f2b0277853b99582fdef072644d25ba0a665b 100644 (file)
@@ -34,14 +34,14 @@ public class Vala.Genie.Scanner {
        char* begin;
        char* current;
        char* end;
-       
+
        int line;
        int column;
 
        int current_indent_level;
        int indent_level;
        int pending_dedents;
-       
+
        /* track open parens and braces for automatic line continuations */
        int open_parens_count;
        int open_brace_count;
@@ -50,7 +50,7 @@ public class Vala.Genie.Scanner {
        bool parse_started;
 
        Comment _comment;
-       
+
        Conditional[] conditional_stack;
 
        struct Conditional {
@@ -69,7 +69,7 @@ public class Vala.Genie.Scanner {
                TEMPLATE,
                TEMPLATE_PART
        }
-       
+
        public Scanner (SourceFile source_file) {
                this.source_file = source_file;
 
@@ -84,13 +84,13 @@ public class Vala.Genie.Scanner {
                current_indent_level = 0;
                indent_level = 0;
                pending_dedents = 0;
-               
+
                open_parens_count = 0;
                open_brace_count = 0;
 
                parse_started = false;
                last_token = TokenType.NONE;
-               
+
        }
 
        bool in_template () {
@@ -104,7 +104,7 @@ public class Vala.Genie.Scanner {
        bool is_ident_char (char c) {
                return (c.isalnum () || c == '_');
        }
-       
+
        bool in_regex_literal () {
                return (state_stack.length > 0 && state_stack[state_stack.length - 1] == State.REGEX_LITERAL);
        }
@@ -273,7 +273,7 @@ public class Vala.Genie.Scanner {
                return type;
        }
 
-       
+
        public void seek (SourceLocation location) {
                current = location.pos;
                line = location.line;
@@ -305,7 +305,7 @@ public class Vala.Genie.Scanner {
                                break;
                        case 'o':
                                if (matches (begin, "of")) return TokenType.OF;
-                               
+
                                if (matches (begin, "or")) return TokenType.OP_OR;
                                break;
                        case 't':
@@ -388,7 +388,7 @@ public class Vala.Genie.Scanner {
                                        break;
                                }
                                break;
-                               
+
                        case 'n':
                                if (matches (begin, "null")) return TokenType.NULL;
                                break;
@@ -659,7 +659,7 @@ public class Vala.Genie.Scanner {
                return TokenType.IDENTIFIER;
        }
 
-       
+
        public TokenType read_template_token (out SourceLocation token_begin, out SourceLocation token_end) {
                TokenType type;
                char* begin = current;
@@ -816,22 +816,22 @@ public class Vala.Genie.Scanner {
                        /* scrub whitespace (excluding newlines) and comments */
                        space ();
                }
-               
-               
+
+
                /* handle explicit line continuation (lines ending with "\") */
                while (current < end && current[0] == '\\' && current[1] == '\n') {
                        current += 2;
                        line++;
                        skip_space_tabs ();
                }
-               
+
                /* handle automatic line continuations (when inside parens or braces) */
                while (current < end && current[0] == '\n' && (open_parens_count > 0 || open_brace_count > 0)) {
                        current++;
                        line++;
                        skip_space_tabs ();
                }
-               
+
 
                /* handle non-consecutive new line once parsing is underway - EOL */
                if (newline () && parse_started && last_token != TokenType.EOL && last_token != TokenType.SEMICOLON) {
@@ -1347,7 +1347,7 @@ public class Vala.Genie.Scanner {
 
        int count_tabs ()
        {
-               
+
                int tab_count = 0;
 
 
@@ -1364,9 +1364,9 @@ public class Vala.Genie.Scanner {
                                column++;
                                space_count++;
                        }
-                       
+
                        tab_count = space_count / _indent_spaces;
-               
+
                }
 
                /* ignore comments and whitspace and other lines that contain no code */
@@ -1392,17 +1392,17 @@ public class Vala.Genie.Scanner {
        bool whitespace () {
                bool found = false;
                while (current < end && current[0].isspace () && current[0] != '\n' ) {
-                       
+
                        found = true;
                        current++;
                        column++;
                }
-               
+
                if ((column == 1) && (current < end) && (current[0] == '#')) {
                        pp_directive ();
                        return true;
                }
-               
+
                return found;
        }
 
@@ -1441,12 +1441,12 @@ public class Vala.Genie.Scanner {
 
                if (current[1] == '/') {
                        // single-line comment
-                       
+
                        SourceReference source_reference = null;
                        if (file_comment) {
                                source_reference = get_source_reference (0);
                        }
-                       
+
                        current += 2;
 
                        // skip until end of line or end of file
@@ -1461,11 +1461,11 @@ public class Vala.Genie.Scanner {
                                column = 1;
                                current_indent_level = 0;
                        }
-                       
+
                        if (source_reference != null) {
                                push_comment (((string) begin).substring (0, (long) (current - begin)), source_reference, file_comment);
                        }
-                       
+
                } else {
                        // delimited comment
                        SourceReference source_reference = null;
@@ -1513,14 +1513,14 @@ public class Vala.Genie.Scanner {
                        column++;
                        found = true;
                }
-               
+
                return found;
        }
 
        void skip_space_tabs () {
                while (whitespace () || skip_tabs () || comment () ) {
                }
-       
+
        }
 
        void space () {
@@ -1531,7 +1531,7 @@ public class Vala.Genie.Scanner {
        public void parse_file_comments () {
                while (whitespace () || comment (true)) {
                }
-               
+
        }
 
        void push_comment (string comment_item, SourceReference source_reference, bool file_comment) {
index 2f4af90efb0d6f06c6c42ed8e64bf200877dd798..bc7bea24a1a27df5e8d36a8ee30446e3b32f4db8 100644 (file)
@@ -253,7 +253,7 @@ public enum Vala.Genie.TokenType {
                case NAMESPACE: return "`namespace'";
                case NEW: return "`new'";
                case NULL: return "`null'";
-               case OF: return "`of'";         
+               case OF: return "`of'";
                case OUT: return "`out'";
                case OP_AND: return "`and'";
                case OP_DEC: return "`--'";
index 65ab2d940c0acda0bf6d9ac73d4541401faec1e3..24d1ea50fe20465699e09afecbbb02f94a55b23f 100644 (file)
@@ -541,7 +541,7 @@ public class Vala.GirParser : CodeVisitor {
                public Node (string? name) {
                        this.name = name;
                }
-                       
+
                public void add_member (Node node) {
                        var nodes = scope[node.name];
                        if (nodes == null) {
@@ -852,7 +852,7 @@ public class Vala.GirParser : CodeVisitor {
                                        }
                                }
                        }
-                       
+
                        if (symbol is Class && girdata != null) {
                                var class_struct = girdata["glib:type-struct"];
                                if (class_struct != null) {
@@ -1015,7 +1015,7 @@ public class Vala.GirParser : CodeVisitor {
                                                                                }
                                                                        }
                                                                }
-                                                               
+
                                                                prop.get_accessor.value_type.value_owned = m.return_type.value_owned;
 
                                                                if (!m.is_abstract && !m.is_virtual && prop.is_abstract) {
@@ -1055,7 +1055,7 @@ public class Vala.GirParser : CodeVisitor {
                                                        var base_prop_node = parser.base_interface_property (this);
                                                        if (base_prop_node != null) {
                                                                base_prop_node.process (parser);
-                                                               
+
                                                                var base_property = (Property) base_prop_node.symbol;
                                                                if (base_property.get_attribute ("ConcreteAccessor") != null) {
                                                                        prop.set_attribute ("NoAccessorMethod", false);
@@ -1065,7 +1065,7 @@ public class Vala.GirParser : CodeVisitor {
                                                                        if (prop.set_accessor != null) {
                                                                                prop.set_accessor.value_type.value_owned = base_property.set_accessor.value_type.value_owned;
                                                                        }
-                                                                       
+
                                                                }
                                                        }
                                                }
@@ -1856,7 +1856,7 @@ public class Vala.GirParser : CodeVisitor {
                }
                return type_id;
        }
-       
+
        void set_array_ccode (Symbol sym, ParameterInfo info) {
                sym.set_attribute_double ("CCode", "array_length_pos", info.vala_idx);
                if (sym is Parameter) {
@@ -3673,24 +3673,24 @@ public class Vala.GirParser : CodeVisitor {
                                base_node.process (this);
                                orig = (Delegate) base_node.symbol;
                        }
-                       
+
                        var deleg = new Delegate (alias.name, orig.return_type.copy (), alias.source_reference);
                        deleg.access = orig.access;
-                       
+
                        foreach (var param in orig.get_parameters ()) {
                                deleg.add_parameter (param.copy ());
                        }
-                       
+
                        foreach (var error_type in orig.get_error_types ()) {
                                deleg.add_error_type (error_type.copy ());
                        }
-                       
+
                        foreach (var attribute in orig.attributes) {
                                deleg.attributes.append (attribute);
                        }
-                       
+
                        deleg.external = true;
-                       
+
                        alias.symbol = deleg;
                }
 
@@ -3709,7 +3709,7 @@ public class Vala.GirParser : CodeVisitor {
                        // processed in parse_alias
                        return;
                }
-               
+
                var s = node.symbol;
                List<ParameterInfo> parameters = node.parameters;
 
index 7655ffd15d641d095d9576742dd7303abc2dc60d..0f9476d36a4ec9805148499d31eca19213cb3499 100644 (file)
@@ -38,7 +38,7 @@ public class Vala.IfStatement : CodeNode, Statement {
                        _condition.parent_node = this;
                }
        }
-       
+
        /**
         * The statement to be evaluated if the condition holds.
         */
@@ -49,7 +49,7 @@ public class Vala.IfStatement : CodeNode, Statement {
                        _true_statement.parent_node = this;
                }
        }
-       
+
        /**
         * The optional statement to be evaluated if the condition doesn't hold.
         */
@@ -80,16 +80,16 @@ public class Vala.IfStatement : CodeNode, Statement {
                false_statement = false_stmt;
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_if_statement (this);
        }
 
        public override void accept_children (CodeVisitor visitor) {
                condition.accept (visitor);
-               
+
                visitor.visit_end_full_expression (condition);
-               
+
                true_statement.accept (visitor);
                if (false_statement != null) {
                        false_statement.accept (visitor);
index 9a18b71e17335f66bb1a7569c1c437d204eba14e..8a601874e2365c5ec633f9e060ba2288b5812d57 100644 (file)
@@ -29,9 +29,9 @@ using GLib;
  */
 public class Vala.InitializerList : Expression {
        private List<Expression> initializers = new ArrayList<Expression> ();
-       
+
        /**
-        * Appends the specified expression to this initializer 
+        * Appends the specified expression to this initializer
         *
         * @param expr an expression
         */
@@ -39,9 +39,9 @@ public class Vala.InitializerList : Expression {
                initializers.add (expr);
                expr.parent_node = this;
        }
-       
+
        /**
-        * Returns a copy of the expression 
+        * Returns a copy of the expression
         *
         * @return expression list
         */
@@ -50,14 +50,14 @@ public class Vala.InitializerList : Expression {
        }
 
        /**
-        * Returns the initializer count in this initializer 
+        * Returns the initializer count in this initializer
         */
        public int size {
                get { return initializers.size; }
        }
 
        /**
-        * Creates a new initializer 
+        * Creates a new initializer
         *
         * @param source_reference reference to source code
         * @return                 newly created initializer list
index 3a1d6734c906c0660cf7fdc298bf7b0e4e15d903..76b0ac0b0d130a438c0ff360c4b88daeae72d6c6 100644 (file)
@@ -44,7 +44,7 @@ public class Vala.IntegerLiteral : Literal {
                value = i;
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_integer_literal (this);
 
@@ -77,7 +77,7 @@ public class Vala.IntegerLiteral : Literal {
                        u = true;
                        value = value.substring (0, value.length - 1);
                }
-               
+
                int64 n = int64.parse (value);
                if (!u && (n > int.MAX || n < int.MIN)) {
                        // value doesn't fit into signed 32-bit
index 72d345476b508ec60681bc47b139fc07e9aeabff..adb41ae16fa6f3985caf3743fbb9b3324e9b5496 100644 (file)
@@ -70,7 +70,7 @@ public class Vala.Interface : ObjectTypeSymbol {
        public List<DataType> get_prerequisites () {
                return prerequisites;
        }
-       
+
        /**
         * Adds the specified method as a member to this interface.
         *
@@ -79,7 +79,7 @@ public class Vala.Interface : ObjectTypeSymbol {
        public override void add_method (Method m) {
                if (m is CreationMethod) {
                        Report.error (m.source_reference, "construction methods may only be declared within classes and structs");
-               
+
                        m.error = true;
                        return;
                }
@@ -113,7 +113,7 @@ public class Vala.Interface : ObjectTypeSymbol {
                prop.this_parameter = new Parameter ("this", new ObjectType (this));
                prop.scope.add (prop.this_parameter.name, prop.this_parameter);
        }
-       
+
        public virtual List<Symbol> get_virtuals () {
                return virtuals;
        }
@@ -139,7 +139,7 @@ public class Vala.Interface : ObjectTypeSymbol {
                foreach (Method m in get_methods ()) {
                        m.accept (visitor);
                }
-               
+
                foreach (Field f in get_fields ()) {
                        f.accept (visitor);
                }
@@ -151,15 +151,15 @@ public class Vala.Interface : ObjectTypeSymbol {
                foreach (Property prop in get_properties ()) {
                        prop.accept (visitor);
                }
-               
+
                foreach (Signal sig in get_signals ()) {
                        sig.accept (visitor);
                }
-               
+
                foreach (Class cl in get_classes ()) {
                        cl.accept (visitor);
                }
-               
+
                foreach (Struct st in get_structs ()) {
                        st.accept (visitor);
                }
@@ -172,7 +172,7 @@ public class Vala.Interface : ObjectTypeSymbol {
        public override bool is_reference_type () {
                return true;
        }
-       
+
        public override bool is_subtype_of (TypeSymbol t) {
                if (this == t) {
                        return true;
@@ -183,10 +183,10 @@ public class Vala.Interface : ObjectTypeSymbol {
                                return true;
                        }
                }
-               
+
                return false;
        }
-       
+
        public override void replace_type (DataType old_type, DataType new_type) {
                for (int i = 0; i < prerequisites.size; i++) {
                        if (prerequisites[i] == old_type) {
index 3ca1a2c857db1fc220d5432a005a234cb12a3740..6187044d165a7e5d2728152537b1efeb76d66d8d 100644 (file)
@@ -42,11 +42,11 @@ public class Vala.InterfaceType : ReferenceType {
                result.nullable = nullable;
                result.is_dynamic = is_dynamic;
                result.floating_reference = floating_reference;
-               
+
                foreach (DataType arg in get_type_arguments ()) {
                        result.add_type_argument (arg.copy ());
                }
-               
+
                return result;
        }
 }
index a3ee20a2fa14ed811225e2d2b8a72fe597ec8520..3223e747a7e846b3dc2a307d9d2d54a757f2c555 100644 (file)
@@ -34,13 +34,13 @@ public class Vala.LambdaExpression : Expression {
         * expression_body or statement_body may be set.
         */
        public Expression expression_body { get; set; }
-       
+
        /**
         * The statement body of this lambda expression. Only one of
         * expression_body or statement_body may be set.
         */
        public Block statement_body { get; set; }
-       
+
        /**
         * The generated method.
         */
@@ -59,7 +59,7 @@ public class Vala.LambdaExpression : Expression {
                this.source_reference = source_reference;
                this.expression_body = expression_body;
        }
-       
+
        /**
         * Creates a new lambda expression with statement body.
         *
@@ -71,7 +71,7 @@ public class Vala.LambdaExpression : Expression {
                this.statement_body = statement_body;
                this.source_reference = source_reference;
        }
-       
+
        /**
         * Appends implicitly typed parameter.
         *
@@ -80,7 +80,7 @@ public class Vala.LambdaExpression : Expression {
        public void add_parameter (Parameter param) {
                parameters.add (param);
        }
-       
+
        /**
         * Returns copy of parameter list.
         *
@@ -89,7 +89,7 @@ public class Vala.LambdaExpression : Expression {
        public List<Parameter> get_parameters () {
                return parameters;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_lambda_expression (this);
 
index c11380700038bfaee329bf8cccb91294a7059fd2..22d7c6991835302b7cd0b6b7f57aec4f38c46c30 100644 (file)
@@ -43,7 +43,7 @@ public class Vala.LocalVariable : Variable {
        public LocalVariable (DataType? variable_type, string name, Expression? initializer = null, SourceReference? source_reference = null) {
                base (variable_type, name, initializer, source_reference);
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_local_variable (this);
        }
@@ -51,10 +51,10 @@ public class Vala.LocalVariable : Variable {
        public override void accept_children (CodeVisitor visitor) {
                if (initializer != null) {
                        initializer.accept (visitor);
-               
+
                        visitor.visit_end_full_expression (initializer);
                }
-               
+
                if (variable_type != null) {
                        variable_type.accept (visitor);
                }
index 8d738125cdb70bdf00e33393cb8a991eeb37a2c4..0cbf063cb1789dd20661fdcfcb6ad9d2dcfa082f 100644 (file)
@@ -31,7 +31,7 @@ public interface Vala.Lockable {
         * Indicates a specific lockable object beeing actually locked somewhere.
         */
        public abstract bool get_lock_used ();
-       
+
        /**
         * Set this lockable object as beeing locked somewhere.
         */
index e0d4216f91a64d259cd39a0117ebced437eb5c5d..ad15d063bf6955188a6cc4bc6f77b3157dcf6aaf 100644 (file)
@@ -37,18 +37,18 @@ public class Vala.LockStatement : CodeNode, Statement {
         * Expression representing the resource to be locked.
         */
        public Expression resource { get; set; }
-       
+
        /**
         * The statement during its execution the resource is locked.
         */
        public Block? body { get; set; }
-       
+
        public LockStatement (Expression resource, Block? body, SourceReference? source_reference = null) {
                this.body = body;
                this.source_reference = source_reference;
                this.resource = resource;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                resource.accept (visitor);
                if (body != null) {
index 85f8bbb638dca4cd94fc93c4db431fe9b8712b74..a5e056f4653b7d37ba9b2dd7528fb5b8137f1c6e 100644 (file)
@@ -40,7 +40,7 @@ public class Vala.MemberAccess : Expression {
                        }
                }
        }
-       
+
        /**
         * The name of the member.
         */
@@ -69,7 +69,7 @@ public class Vala.MemberAccess : Expression {
 
        private Expression? _inner;
        private List<DataType> type_argument_list = new ArrayList<DataType> ();
-       
+
        /**
         * Creates a new member access expression.
         *
@@ -105,7 +105,7 @@ public class Vala.MemberAccess : Expression {
                type_argument_list.add (arg);
                arg.parent_node = this;
        }
-       
+
        /**
         * Returns a copy of the list of generic type arguments.
         *
@@ -125,7 +125,7 @@ public class Vala.MemberAccess : Expression {
                if (inner != null) {
                        inner.accept (visitor);
                }
-               
+
                foreach (DataType type_arg in type_argument_list) {
                        type_arg.accept (visitor);
                }
@@ -203,7 +203,7 @@ public class Vala.MemberAccess : Expression {
                if (inner != null) {
                        inner.check (context);
                }
-               
+
                foreach (DataType type_arg in type_argument_list) {
                        type_arg.check (context);
                }
index 352b1ffa4b3b55091f6fad24e8c11f4a567aae50..436423aa5a3f072068f3fb8be56392286ec52261 100644 (file)
@@ -63,11 +63,11 @@ public class Vala.MemberInitializer : CodeNode {
                this.source_reference = source_reference;
                this.name = name;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                initializer.accept (visitor);
        }
-       
+
        public override bool check (CodeContext context) {
                return initializer.check (context);
        }
index a2bd57c45ed6a9cf2e95a3463b78aaedc8b1532a..1adfeabfd81fa4cdd8553d25b01f0c3a17fc8a12 100644 (file)
@@ -50,26 +50,26 @@ public class Vala.Method : Subroutine, Callable {
         * the contained type.
         */
        public MemberBinding binding { get; set; default = MemberBinding.INSTANCE; }
-       
+
        /**
         * Specifies whether this method is abstract. Abstract methods have no
         * body, may only be specified within abstract classes, and must be
         * overriden by derived non-abstract classes.
         */
        public bool is_abstract { get; set; }
-       
+
        /**
         * Specifies whether this method is virtual. Virtual methods may be
         * overridden by derived classes.
         */
        public bool is_virtual { get; set; }
-       
+
        /**
         * Specifies whether this method overrides a virtual or abstract method
         * of a base type.
         */
        public bool overrides { get; set; }
-       
+
        /**
         * Specifies whether this method should be inlined.
         */
@@ -100,7 +100,7 @@ public class Vala.Method : Subroutine, Callable {
 
        /**
         * Specifies the virtual or abstract method this method overrides.
-        * Reference must be weak as virtual and abstract methods set 
+        * Reference must be weak as virtual and abstract methods set
         * base_method to themselves.
         */
        public Method base_method {
@@ -225,7 +225,7 @@ public class Vala.Method : Subroutine, Callable {
                parameters.add (param);
                scope.add (param.name, param);
        }
-       
+
        public List<Parameter> get_parameters () {
                return parameters;
        }
@@ -350,7 +350,7 @@ public class Vala.Method : Subroutine, Callable {
                        invalid_match = "Base method expected return type `%s', but `%s' was provided".printf (actual_base_type.to_prototype_string (), return_type.to_prototype_string ());
                        return false;
                }
-               
+
                Iterator<Parameter> method_params_it = parameters.iterator ();
                int param_index = 1;
                foreach (Parameter base_param in base_method.parameters) {
@@ -379,7 +379,7 @@ public class Vala.Method : Subroutine, Callable {
                        }
                        param_index++;
                }
-               
+
                /* this method may not expect more arguments */
                if (method_params_it.next ()) {
                        invalid_match = "too many parameters";
@@ -603,7 +603,7 @@ public class Vala.Method : Subroutine, Callable {
                                                                continue;
                                                        }
                                                }
-                                               
+
                                                string invalid_match = null;
                                                if (!compatible (base_method, out invalid_match)) {
                                                        error = true;
@@ -611,7 +611,7 @@ public class Vala.Method : Subroutine, Callable {
                                                        Report.error (source_reference, "overriding method `%s' is incompatible with base method `%s': %s.".printf (get_full_name (), base_method_type.to_prototype_string (), invalid_match));
                                                        return;
                                                }
-                                               
+
                                                _base_interface_method = base_method;
                                                return;
                                        }
@@ -841,7 +841,7 @@ public class Vala.Method : Subroutine, Callable {
                }
 
                // check that all errors that can be thrown in the method body are declared
-               if (body != null) { 
+               if (body != null) {
                        foreach (DataType body_error_type in body.get_error_types ()) {
                                bool can_propagate_error = false;
                                foreach (DataType method_error_type in get_error_types ()) {
@@ -932,19 +932,19 @@ public class Vala.Method : Subroutine, Callable {
                                return false;
                        }
                }
-               
+
                if (binding == MemberBinding.INSTANCE) {
                        // method must be static
                        return false;
                }
-               
+
                if (return_type is VoidType) {
                } else if (return_type.data_type == context.analyzer.int_type.data_type) {
                } else {
                        // return type must be void or int
                        return false;
                }
-               
+
                var params = get_parameters ();
                if (params.size == 0) {
                        // method may have no parameters
@@ -955,7 +955,7 @@ public class Vala.Method : Subroutine, Callable {
                        // method must not have more than one parameter
                        return false;
                }
-               
+
                Iterator<Parameter> params_it = params.iterator ();
                params_it.next ();
                var param = params_it.get ();
@@ -964,18 +964,18 @@ public class Vala.Method : Subroutine, Callable {
                        // parameter must not be an out parameter
                        return false;
                }
-               
+
                if (!(param.variable_type is ArrayType)) {
                        // parameter must be an array
                        return false;
                }
-               
+
                var array_type = (ArrayType) param.variable_type;
                if (array_type.element_type.data_type != context.analyzer.string_type.data_type) {
                        // parameter must be an array of strings
                        return false;
                }
-               
+
                return true;
        }
 
index 415191ab616940d8b2584a880ab3d3082e12a63c..cc6a3fcda9a7248b5aba125cbeae278a24cd1d0b 100644 (file)
@@ -49,7 +49,7 @@ public class Vala.MethodCall : Expression {
        public bool is_chainup { get; private set; }
 
        private Expression _call;
-       
+
        private List<Expression> argument_list = new ArrayList<Expression> ();
 
        /**
@@ -63,7 +63,7 @@ public class Vala.MethodCall : Expression {
                this.source_reference = source_reference;
                this.call = call;
        }
-       
+
        /**
         * Appends the specified expression to the list of arguments.
         *
@@ -73,7 +73,7 @@ public class Vala.MethodCall : Expression {
                argument_list.add (arg);
                arg.parent_node = this;
        }
-       
+
        /**
         * Returns a copy of the argument list.
         *
@@ -101,7 +101,7 @@ public class Vala.MethodCall : Expression {
                if (call == old_node) {
                        call = new_node;
                }
-               
+
                int index = argument_list.index_of (old_node);
                if (index >= 0 && new_node.parent_node == null) {
                        argument_list[index] = new_node;
index 2f2894e85c7573b799056feb1dc35d2ece5473dc..063189f6e9a334629a1ec8056bc6b10c0d7670cd 100644 (file)
@@ -54,7 +54,7 @@ public class Vala.MethodType : CallableType {
                        // method types incompatible to anything but delegates
                        return false;
                }
-               
+
                return dt.delegate_symbol.matches_method (method_symbol, dt);
        }
 
index 47dd4eee14bba946583a5f1d7acb1c94c1ef4ffe..af062f85c0108c004a7062081c7e6b0728eae6cb 100644 (file)
@@ -139,7 +139,7 @@ public class Vala.Namespace : Symbol {
                        scope.add (ns.name, ns);
                }
        }
-       
+
        /**
         * Returns a copy of the list of namespaces.
         *
@@ -148,7 +148,7 @@ public class Vala.Namespace : Symbol {
        public List<Namespace> get_namespaces () {
                return namespaces;
        }
-       
+
        /**
         * Adds the specified class to this namespace.
         *
@@ -187,7 +187,7 @@ public class Vala.Namespace : Symbol {
                scope.add (iface.name, iface);
 
        }
-       
+
        /**
         * Adds the specified struct to this namespace.
         *
@@ -206,7 +206,7 @@ public class Vala.Namespace : Symbol {
                structs.add (st);
                scope.add (st.name, st);
        }
-       
+
        /**
         * Removes the specified struct from this namespace.
         *
@@ -216,7 +216,7 @@ public class Vala.Namespace : Symbol {
                structs.remove (st);
                scope.remove (st.name);
        }
-                       
+
        /**
         * Adds the specified enum to this namespace.
         *
@@ -291,7 +291,7 @@ public class Vala.Namespace : Symbol {
        public List<Class> get_classes () {
                return classes;
        }
-       
+
        /**
         * Returns a copy of the list of interfaces.
         *
@@ -300,7 +300,7 @@ public class Vala.Namespace : Symbol {
        public List<Interface> get_interfaces () {
                return interfaces;
        }
-       
+
        /**
         * Returns a copy of the list of enums.
         *
@@ -309,7 +309,7 @@ public class Vala.Namespace : Symbol {
        public List<Enum> get_enums () {
                return enums;
        }
-       
+
        /**
         * Returns a copy of the list of error domains.
         *
@@ -318,7 +318,7 @@ public class Vala.Namespace : Symbol {
        public List<ErrorDomain> get_error_domains () {
                return error_domains;
        }
-       
+
        /**
         * Returns a copy of the list of fields.
         *
@@ -327,7 +327,7 @@ public class Vala.Namespace : Symbol {
        public List<Field> get_fields () {
                return fields;
        }
-       
+
        /**
         * Returns a copy of the list of constants.
         *
@@ -336,7 +336,7 @@ public class Vala.Namespace : Symbol {
        public List<Constant> get_constants () {
                return constants;
        }
-       
+
        /**
         * Returns a copy of the list of delegates.
         *
@@ -345,7 +345,7 @@ public class Vala.Namespace : Symbol {
        public List<Delegate> get_delegates () {
                return delegates;
        }
-       
+
        /**
         * Returns a copy of the list of methods.
         *
@@ -354,7 +354,7 @@ public class Vala.Namespace : Symbol {
        public List<Method> get_methods () {
                return methods;
        }
-       
+
        /**
         * Adds the specified constant to this namespace.
         *
@@ -373,7 +373,7 @@ public class Vala.Namespace : Symbol {
                constants.add (constant);
                scope.add (constant.name, constant);
        }
-       
+
        /**
         * Adds the specified field to this namespace.
         *
@@ -407,7 +407,7 @@ public class Vala.Namespace : Symbol {
                fields.add (f);
                scope.add (f.name, f);
        }
-       
+
        /**
         * Adds the specified method to this namespace.
         *
index b5f95d0646be1a25cdfb248e06fdaafc3906793b..bde409a6ef37d90bf8453a0b227c3d948cb2d272 100644 (file)
@@ -35,7 +35,7 @@ public class Vala.NullLiteral : Literal {
        public NullLiteral (SourceReference? source = null) {
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_null_literal (this);
 
index 7a2d6fbf809f110d88d99bcf2288fbaf0499d773..08a37dfad3fae1f28bb820b7e70081f4fe36efba 100644 (file)
@@ -64,7 +64,7 @@ public class Vala.ObjectCreationExpression : Expression {
                this.source_reference = source_reference;
                this.member_name = member_name;
        }
-       
+
        /**
         * Appends the specified expression to the list of arguments.
         *
@@ -117,7 +117,7 @@ public class Vala.ObjectCreationExpression : Expression {
                if (member_name != null) {
                        member_name.accept (visitor);
                }
-               
+
                foreach (Expression arg in argument_list) {
                        arg.accept (visitor);
                }
@@ -441,7 +441,7 @@ public class Vala.ObjectCreationExpression : Expression {
                        if (member_name != null) {
                                member_name.check (context);
                        }
-               
+
                        foreach (Expression arg in argument_list) {
                                arg.check (context);
                        }
index eccdbbddf14360885fd8b2d3fbe3632dcda8e119..4683f2081586025f6d7e00f0eb8594fc0e5dd8c6 100644 (file)
@@ -43,11 +43,11 @@ public class Vala.ObjectType : ReferenceType {
                result.nullable = nullable;
                result.is_dynamic = is_dynamic;
                result.floating_reference = floating_reference;
-               
+
                foreach (DataType arg in get_type_arguments ()) {
                        result.add_type_argument (arg.copy ());
                }
-               
+
                return result;
        }
 
@@ -60,7 +60,7 @@ public class Vala.ObjectType : ReferenceType {
                if (value_owned != target_type.value_owned) {
                        return false;
                }
-               
+
                if (nullable && !target_type.nullable) {
                        return false;
                }
index aca53ed006578414d221631c743676acd0bb1774..eab81c425f6e0b211b6c5275fe61dbfee9817106 100644 (file)
@@ -25,7 +25,7 @@
 
 /**
  * Represents a runtime data type for objects and interfaces. This data type may
- * be defined in Vala source code or imported from an external library with a 
+ * be defined in Vala source code or imported from an external library with a
  * Vala API file.
  */
 public abstract class Vala.ObjectTypeSymbol : TypeSymbol {
index 39820718ceb3a75c2b1c59efd930790a029df4ca..bfc340bc55aa66f0688d28bf994bbbfa4b225fb7 100644 (file)
@@ -35,13 +35,13 @@ public class Vala.Parameter : Variable {
         * parameters.
         */
        public bool ellipsis { get; set; }
-       
+
        /**
         * Specifies whether the methods accepts an indefinite number of
         * parameters.
         */
        public bool params_array { get; set; }
-       
+
        public bool captured { get; set; }
 
        public bool format_arg {
@@ -68,7 +68,7 @@ public class Vala.Parameter : Variable {
 
                access = SymbolAccessibility.PUBLIC;
        }
-       
+
        /**
         * Creates a new ellipsis parameter representing an indefinite number of
         * parameters.
@@ -87,7 +87,7 @@ public class Vala.Parameter : Variable {
        public override void accept_children (CodeVisitor visitor) {
                if (!ellipsis) {
                        variable_type.accept (visitor);
-                       
+
                        if (initializer != null) {
                                initializer.accept (visitor);
                        }
@@ -151,7 +151,7 @@ public class Vala.Parameter : Variable {
 
                if (!ellipsis) {
                        variable_type.check (context);
-                       
+
                        if (params_array && !(variable_type is ArrayType)) {
                                error = true;
                                Report.error (source_reference, "parameter array expected");
index 1b1a06f66ffb84ec8a1eeae411b620c4a8098219..127a118a7a46d9af1f33d41a05f4735d6e5c9acc 100644 (file)
@@ -332,7 +332,7 @@ public class Vala.Parser : CodeVisitor {
 
                index = -1;
                size = 0;
-               
+
                next ();
 
 
@@ -348,7 +348,7 @@ public class Vala.Parser : CodeVisitor {
                } catch (ParseError e) {
                        report_parse_error (e);
                }
-               
+
                scanner = null;
                if (!has_global_context) {
                        context = null;
@@ -406,7 +406,7 @@ public class Vala.Parser : CodeVisitor {
                        }
                        accept (TokenType.INTERR);
                }
-               
+
                while (accept (TokenType.OPEN_BRACKET)) {
                        do {
                                // required for decision between expression and declaration statement
@@ -423,12 +423,12 @@ public class Vala.Parser : CodeVisitor {
 
        bool is_inner_array_type () {
                var begin = get_location ();
-               
+
                var result = accept (TokenType.OPEN_PARENS) && accept (TokenType.UNOWNED) && current() != TokenType.CLOSE_PARENS;
                rollback (begin);
                return result;
        }
-       
+
        DataType parse_type (bool owned_by_default, bool can_weak_ref, bool require_unowned = false) throws ParseError {
                var begin = get_location ();
 
@@ -468,7 +468,7 @@ public class Vala.Parser : CodeVisitor {
                if (accept (TokenType.OPEN_PARENS)) {
                        type = parse_type (false, false, true);
                        expect (TokenType.CLOSE_PARENS);
-                       
+
                        inner_type_owned = false;
 
                        expect (TokenType.OPEN_BRACKET);
@@ -479,7 +479,7 @@ public class Vala.Parser : CodeVisitor {
                        } else {
                                var sym = parse_symbol_name ();
                                List<DataType> type_arg_list = parse_type_argument_list (false);
-                               
+
                                type = new UnresolvedType.from_symbol (sym, get_src (begin));
                                if (type_arg_list != null) {
                                        foreach (DataType type_arg in type_arg_list) {
@@ -487,7 +487,7 @@ public class Vala.Parser : CodeVisitor {
                                        }
                                }
                        }
-                       
+
                        while (accept (TokenType.STAR)) {
                                type = new PointerType (type, get_src (begin));
                        }
@@ -496,7 +496,7 @@ public class Vala.Parser : CodeVisitor {
                                type.nullable = accept (TokenType.INTERR);
                        }
                }
-                       
+
                // array brackets in types are read from right to left,
                // this is more logical, especially when nullable arrays
                // or pointers are involved
@@ -914,7 +914,7 @@ public class Vala.Parser : CodeVisitor {
                        expect (TokenType.OPEN_PARENS);
                        expect (TokenType.UNOWNED);
                }
-               
+
                var member = parse_member_name ();
                DataType element_type = UnresolvedType.new_from_expression (member);
                bool is_pointer_type = false;
@@ -927,14 +927,14 @@ public class Vala.Parser : CodeVisitor {
                                element_type.nullable = true;
                        }
                }
-               
+
                if (inner_array_type) {
                        expect (TokenType.CLOSE_PARENS);
                        element_type.value_owned = false;
                } else {
                        element_type.value_owned = true;
                }
-               
+
                expect (TokenType.OPEN_BRACKET);
 
                bool size_specified = false;
@@ -1624,7 +1624,7 @@ public class Vala.Parser : CodeVisitor {
                if (current () == TokenType.OPEN_PARENS) {
                        return !is_inner_array_type ();
                }
-               
+
                var begin = get_location ();
 
                // decide between declaration and expression statement
@@ -2231,17 +2231,17 @@ public class Vala.Parser : CodeVisitor {
        void parse_declaration (Symbol parent, bool root = false) throws ParseError {
                comment = scanner.pop_comment ();
                var attrs = parse_attributes ();
-               
+
                var begin = get_location ();
-               
+
                TokenType last_keyword = current ();
-               
+
                while (is_declaration_keyword (current ())) {
                        last_keyword = current ();
                        next ();
                }
-       
-               switch (current ()) {   
+
+               switch (current ()) {
                case TokenType.CONSTRUCT:
                        rollback (begin);
                        parse_constructor_declaration (parent, attrs);
index ec8b6b4f77dfc2d5b224e2631cf35fa1d745d1d0..97f6473a80e42456c32c8e186000650742d9a613 100644 (file)
@@ -37,7 +37,7 @@ public class Vala.PointerIndirection : Expression {
                        _inner.parent_node = this;
                }
        }
-       
+
        private Expression _inner;
 
        /**
@@ -50,7 +50,7 @@ public class Vala.PointerIndirection : Expression {
                this.source_reference = source_reference;
                this.inner = inner;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                inner.accept (visitor);
 
index 05274c1e99d819135b5dd4ab2a3e2a288c3b662d..eed39a39a0d0e60c0948ca083cf2e74aaea9ca95 100644 (file)
@@ -36,7 +36,7 @@ public class Vala.PostfixExpression : Expression {
                        _inner.parent_node = this;
                }
        }
-       
+
        /**
         * Specifies whether value should be incremented or decremented.
         */
@@ -57,7 +57,7 @@ public class Vala.PostfixExpression : Expression {
                increment = inc;
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_postfix_expression (this);
 
index e0a8e4390cdb1887b92e8f82426251c7607f2b35..2a83295fb0763788791dd642502922fe885d9999 100644 (file)
@@ -39,7 +39,7 @@ public class Vala.Property : Symbol, Lockable {
                        }
                }
        }
-       
+
        /**
         * The get accessor of this property if available.
         */
@@ -52,7 +52,7 @@ public class Vala.Property : Symbol, Lockable {
                        }
                }
        }
-       
+
        /**
         * The set/construct accessor of this property if available.
         */
@@ -65,7 +65,7 @@ public class Vala.Property : Symbol, Lockable {
                        }
                }
        }
-       
+
        /**
         * Represents the generated `this` parameter in this property.
         */
@@ -76,20 +76,20 @@ public class Vala.Property : Symbol, Lockable {
         * disabled.
         */
        public bool interface_only { get; set; }
-       
+
        /**
         * Specifies whether this property is abstract. Abstract properties have
         * no accessor bodies, may only be specified within abstract classes and
         * interfaces, and must be overriden by derived non-abstract classes.
         */
        public bool is_abstract { get; set; }
-       
+
        /**
         * Specifies whether this property is virtual. Virtual properties may be
         * overridden by derived classes.
         */
        public bool is_virtual { get; set; }
-       
+
        /**
         * Specifies whether this property overrides a virtual or abstract
         * property of a base type.
@@ -160,7 +160,7 @@ public class Vala.Property : Symbol, Lockable {
                        return _base_property;
                }
        }
-       
+
        /**
         * Specifies the abstract interface property this property implements.
         */
@@ -222,7 +222,7 @@ public class Vala.Property : Symbol, Lockable {
 
        public override void accept_children (CodeVisitor visitor) {
                property_type.accept (visitor);
-               
+
                if (get_accessor != null) {
                        get_accessor.accept (visitor);
                }
@@ -238,11 +238,11 @@ public class Vala.Property : Symbol, Lockable {
        public bool get_lock_used () {
                return lock_used;
        }
-       
+
        public void set_lock_used (bool used) {
                lock_used = used;
        }
-       
+
        /**
         * Checks whether the accessors of this property are compatible
         * with the specified base property.
index 81981b84aabaee451c6db4361b12b53949a40292..73d8c82393c9f7905ae0373f2bc67894d8db280c 100644 (file)
@@ -50,12 +50,12 @@ public class Vala.PropertyAccessor : Subroutine {
         * Specifies whether this accessor may be used to get the property.
         */
        public bool readable { get; private set; }
-       
+
        /**
         * Specifies whether this accessor may be used to set the property.
         */
        public bool writable { get; private set; }
-       
+
        /**
         * Specifies whether this accessor may be used to construct the
         * property.
@@ -77,7 +77,7 @@ public class Vala.PropertyAccessor : Subroutine {
        public Parameter value_parameter { get; private set; }
 
        private DataType _value_type;
-       
+
        /**
         * Creates a new property accessor.
         *
index 550c2b45c26061859da24580ee2cd7b1c0174981..3ef4d6e66b58164c5399ebc8a8ad7166be33294b 100644 (file)
@@ -42,13 +42,13 @@ public class Vala.RealLiteral : Literal {
                value = r;
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_real_literal (this);
 
                visitor.visit_expression (this);
        }
-       
+
        /**
         * Returns the type name of the value this literal represents.
         *
@@ -58,7 +58,7 @@ public class Vala.RealLiteral : Literal {
                if (value.has_suffix ("f") || value.has_suffix ("F")) {
                        return "float";
                }
-               
+
                return "double";
        }
 
index ceb51a2a2cc2944237cf24f430a336729dde271a..9362bbd1ccec051aecb35a37dc25314e57baafb3 100644 (file)
@@ -37,7 +37,7 @@ public class Vala.ReferenceTransferExpression : Expression {
                        _inner.parent_node = this;
                }
        }
-       
+
        private Expression _inner;
 
        /**
@@ -50,13 +50,13 @@ public class Vala.ReferenceTransferExpression : Expression {
                this.inner = inner;
                this.source_reference = source_reference;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_reference_transfer_expression (this);
 
                visitor.visit_expression (this);
        }
-       
+
        public override void accept_children (CodeVisitor visitor) {
                inner.accept (visitor);
        }
index 3015ea3e4588ba415b3c573cfe02aef611de2390..7667887062c16b3ddaf32fa8299364f709404d37 100644 (file)
@@ -394,7 +394,7 @@ public class Vala.Report {
        private delegate int AttyFunc (int fd);
 
        private bool is_atty (int fd) {
-               Module module = Module.open (null, ModuleFlags.BIND_LAZY); 
+               Module module = Module.open (null, ModuleFlags.BIND_LAZY);
                if (module == null) {
                        return false;
                }
index e407aec4af2acece5778c862164ed2027ecaf916..2cb1e6dd5d6afb7eea8f2948c33caab51cd850dc 100644 (file)
@@ -59,7 +59,7 @@ public class Vala.ReturnStatement : CodeNode, Statement {
        public override void accept_children (CodeVisitor visitor) {
                if (return_expression != null) {
                        return_expression.accept (visitor);
-               
+
                        visitor.visit_end_full_expression (return_expression);
                }
        }
index ddf6f2859c80b8147a5b0283eef03aa71e2d048e..73b0b61efbe0b0dc61b3391e8fb81f3a207850e3 100644 (file)
@@ -924,10 +924,10 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                } else {
                        temp_access.target_type = target_type != null ? target_type.copy () : null;
                }
-               
+
                return temp_access;
        }
-       
+
        public void visit_member_initializer (MemberInitializer init, DataType type) {
                init.symbol_reference = symbol_lookup_inherited (type.data_type, init.name);
                if (!(init.symbol_reference is Field || init.symbol_reference is Property)) {
index d0a6ac0c3897d9a839bef024014fa7adc4249133..1597a1fa9aef3bffd6a5c4733f8ed3dd869a5377 100644 (file)
@@ -83,7 +83,7 @@ public class Vala.Signal : Symbol, Lockable, Callable {
                base (name, source_reference, comment);
                this.return_type = return_type;
        }
-       
+
        /**
         * Appends parameter to signal handler.
         *
@@ -149,14 +149,14 @@ public class Vala.Signal : Symbol, Lockable, Callable {
 
                return generated_delegate;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_signal (this);
        }
 
        public override void accept_children (CodeVisitor visitor) {
                return_type.accept (visitor);
-               
+
                foreach (Parameter param in parameters) {
                        param.accept (visitor);
                }
@@ -173,7 +173,7 @@ public class Vala.Signal : Symbol, Lockable, Callable {
        public bool get_lock_used () {
                return lock_used;
        }
-       
+
        public void set_lock_used (bool used) {
                lock_used = used;
        }
@@ -192,7 +192,7 @@ public class Vala.Signal : Symbol, Lockable, Callable {
                checked = true;
 
                return_type.check (context);
-               
+
                foreach (Parameter param in parameters) {
                        if (param.ellipsis) {
                                Report.error  (param.source_reference, "Signals with variable argument lists are not supported");
index 42c1ee5991bbc130e26addc3da157fdb56d2eb82..e5de62d62a559bc1863ee56fc55427fc4dba2457 100644 (file)
@@ -50,7 +50,7 @@ public class Vala.SizeofExpression : Expression {
                type_reference = type;
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_sizeof_expression (this);
 
index 1263bcd7d790d249a679ca24a25bf684cd22643c..b056c012661bf211a9ae5d08c5c58dc92bde61eb 100644 (file)
@@ -30,7 +30,7 @@ public class Vala.SourceFile {
         * The name of this source file.
         */
        public string filename { get; set; }
-       
+
        public string? relative_filename {
                set {
                        this._relative_filename = value;
@@ -359,7 +359,7 @@ public class Vala.SourceFile {
 
                return mapped_file.get_contents ();
        }
-       
+
        public size_t get_mapped_length () {
                if (content != null) {
                        return content.length;
index ffacd525328da903aec98a7fe1a9a3aa6d911dcd..24aeeda45a02d36b0922d409f0bdd6ca48f7f380 100644 (file)
@@ -57,7 +57,7 @@ public class Vala.SourceReference {
                this.end = end;
                using_directives = file.current_using_directives;
        }
-       
+
        /**
         * Returns a string representation of this source reference.
         *
index 72970c6d7d51459297c1ebf3c0d210cc54b1c703..d1995576c5d578c053810444af1d1edaa9fe7350 100644 (file)
@@ -49,18 +49,18 @@ public class Vala.StringLiteral : Literal {
         * Evaluates the literal string value.
         *
         * @return the unescaped string
-        */     
+        */
        public string? eval () {
                if (value == null) {
                        return null;
                }
-               
+
                /* remove quotes */
                var noquotes = value.substring (1, (uint) (value.length - 2));
                /* unescape string */
                return noquotes.compress ();
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_string_literal (this);
 
index 21985d7af3420a72be8a49c1b9cf2210db3ac2fa..972b4bdab10f896990d5ac8d7a4ca7678a6b862a 100644 (file)
@@ -144,7 +144,7 @@ public class Vala.Struct : TypeSymbol {
                type_parameters.add (p);
                scope.add (p.name, p);
        }
-       
+
        /**
         * Returns a copy of the type parameter list.
         *
@@ -163,7 +163,7 @@ public class Vala.Struct : TypeSymbol {
                constants.add (c);
                scope.add (c.name, c);
        }
-       
+
        /**
         * Adds the specified field as a member to this struct.
         *
@@ -175,7 +175,7 @@ public class Vala.Struct : TypeSymbol {
                fields.add (f);
                scope.add (f.name, f);
        }
-       
+
        /**
         * Returns a copy of the list of fields.
         *
@@ -201,7 +201,7 @@ public class Vala.Struct : TypeSymbol {
         */
        public override void add_method (Method m) {
                return_if_fail (m != null);
-               
+
                if (m.binding == MemberBinding.INSTANCE || m is CreationMethod) {
                        m.this_parameter = new Parameter ("this", SemanticAnalyzer.get_data_type_for_symbol (this));
                        m.scope.add (m.this_parameter.name, m.this_parameter);
@@ -228,7 +228,7 @@ public class Vala.Struct : TypeSymbol {
                methods.add (m);
                scope.add (m.name, m);
        }
-       
+
        /**
         * Returns a copy of the list of methods.
         *
@@ -276,15 +276,15 @@ public class Vala.Struct : TypeSymbol {
                foreach (TypeParameter p in type_parameters) {
                        p.accept (visitor);
                }
-               
+
                foreach (Field f in fields) {
                        f.accept (visitor);
                }
-               
+
                foreach (Constant c in constants) {
                        c.accept (visitor);
                }
-               
+
                foreach (Method m in methods) {
                        m.accept (visitor);
                }
@@ -325,7 +325,7 @@ public class Vala.Struct : TypeSymbol {
                }
                return integer_type;
        }
-       
+
        /**
         * Returns whether this is a floating point type.
         *
@@ -388,14 +388,14 @@ public class Vala.Struct : TypeSymbol {
 
        public override int get_type_parameter_index (string name) {
                int i = 0;
-               
+
                foreach (TypeParameter p in type_parameters) {
                        if (p.name == name) {
                                return (i);
                        }
                        i++;
                }
-               
+
                return -1;
        }
 
index 99fbb4a69bdc9f2aebf7eff096c5ea2a444e8c35..70eb7e336af1aba03c47fc2d107b76c161790a2a 100644 (file)
@@ -54,19 +54,19 @@ public class Vala.SwitchLabel : CodeNode {
        public SwitchLabel.with_default (SourceReference? source = null) {
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_switch_label (this);
        }
-       
+
        public override void accept_children (CodeVisitor visitor) {
                if (expression != null) {
                        expression.accept (visitor);
-                       
+
                        visitor.visit_end_full_expression (expression);
                }
        }
-       
+
        public override bool check (CodeContext context) {
                if (expression != null) {
                        var switch_statement = (SwitchStatement) section.parent_node;
index bf9932f04a1a3f78400d09f282e37b76ac259893..156740f80be56841ddbf9945cfb657db5701b04f 100644 (file)
@@ -37,7 +37,7 @@ public class Vala.SwitchSection : Block {
        public SwitchSection (SourceReference? source_reference) {
                base (source_reference);
        }
-       
+
        /**
         * Appends the specified label to the list of switch labels.
         *
@@ -51,7 +51,7 @@ public class Vala.SwitchSection : Block {
                labels.add (label);
                label.section = this;
        }
-       
+
        /**
         * Returns a copy of the list of switch labels.
         *
@@ -60,17 +60,17 @@ public class Vala.SwitchSection : Block {
        public List<SwitchLabel> get_labels () {
                return labels;
        }
-       
+
        public bool has_default_label () {
                foreach (SwitchLabel label in labels) {
                        if (label.expression == null) {
                                return true;
                        }
                }
-               
+
                return false;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_switch_section (this);
        }
index c583f8db9d6b9f3cc8364f721c011f6bb189112d..66dab0193a4de94533d062ef744c8f32d298cf26 100644 (file)
@@ -53,7 +53,7 @@ public class Vala.SwitchStatement : CodeNode, Statement {
                this.source_reference = source_reference;
                this.expression = expression;
        }
-       
+
        /**
         * Appends the specified section to the list of switch sections.
         *
@@ -63,7 +63,7 @@ public class Vala.SwitchStatement : CodeNode, Statement {
                section.parent_node = this;
                sections.add (section);
        }
-       
+
        /**
         * Returns a copy of the list of switch sections.
         *
@@ -81,7 +81,7 @@ public class Vala.SwitchStatement : CodeNode, Statement {
                expression.accept (visitor);
 
                visitor.visit_end_full_expression (expression);
-               
+
                foreach (SwitchSection section in sections) {
                        section.accept (visitor);
                }
@@ -92,7 +92,7 @@ public class Vala.SwitchStatement : CodeNode, Statement {
                        expression = new_node;
                }
        }
-       
+
        public override bool check (CodeContext context) {
                if (checked) {
                        return !error;
index 3dcd820cc009789fb70114ec83f9905de03f4ce2..ed1ad8318b927a8d1cb1aac90e38d5c32182a821 100644 (file)
@@ -105,7 +105,7 @@ public abstract class Vala.Symbol : CodeNode {
        public bool hides { get; set; }
 
        /**
-        * Check if this symbol is just internal API (and therefore doesn't need 
+        * Check if this symbol is just internal API (and therefore doesn't need
         * to be listed in header files for instance) by traversing parent symbols
         * and checking their accessibility.
         */
@@ -209,7 +209,7 @@ public abstract class Vala.Symbol : CodeNode {
                if (parent_symbol == null) {
                        return name;
                }
-               
+
                if (name == null) {
                        return parent_symbol.get_full_name ();
                }
@@ -224,7 +224,7 @@ public abstract class Vala.Symbol : CodeNode {
                        return "%s.%s".printf (parent_symbol.get_full_name (), name);
                }
        }
-       
+
        /**
         * Converts a string from CamelCase to lower_case.
         *
@@ -261,13 +261,13 @@ public abstract class Vala.Symbol : CodeNode {
                                        }
                                }
                        }
-                       
+
                        result_builder.append_unichar (c.tolower ());
-                       
+
                        first = false;
                        i = i.next_char ();
                }
-               
+
                return result_builder.str;
        }
 
@@ -296,7 +296,7 @@ public abstract class Vala.Symbol : CodeNode {
                        } else {
                                result_builder.append_unichar (c);
                        }
-                       
+
                        i = i.next_char ();
                }
 
index 8b7f75cd349331d6e6e239130e510c67deac44b9..55fa94f629ed44a1640a1c9671404e72f17d4db2 100644 (file)
@@ -31,7 +31,7 @@ public class Vala.SymbolResolver : CodeVisitor {
        CodeContext context;
        Symbol root_symbol;
        Scope current_scope;
-       
+
        /**
         * Resolve symbol names in the specified code context.
         *
@@ -46,7 +46,7 @@ public class Vala.SymbolResolver : CodeVisitor {
                root_symbol = null;
                this.context = null;
        }
-       
+
        public override void visit_namespace (Namespace ns) {
                var old_scope = current_scope;
                current_scope = ns.scope;
@@ -55,7 +55,7 @@ public class Vala.SymbolResolver : CodeVisitor {
 
                current_scope = old_scope;
        }
-       
+
        public override void visit_class (Class cl) {
                current_scope = cl.scope;
 
index 4a49f5bac4172ab0cb87dd03e2ac5dbf4ad36516..b02cd940587021acfb4311104118d3674469ed3f 100644 (file)
@@ -36,7 +36,7 @@ public class Vala.TypeCheck : Expression {
                        _expression.parent_node = this;
                }
        }
-       
+
        /**
         * The type to be matched against.
         */
@@ -58,13 +58,13 @@ public class Vala.TypeCheck : Expression {
         * @param type   a data type
         * @param source reference to source code
         * @return       newly created type check expression
-        */     
+        */
        public TypeCheck (Expression expr, DataType type, SourceReference source) {
                expression = expr;
                type_reference = type;
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_type_check (this);
 
@@ -101,7 +101,7 @@ public class Vala.TypeCheck : Expression {
                checked = true;
 
                expression.check (context);
-               
+
                type_reference.check (context);
 
                if (expression.value_type == null) {
index 9b0e02e13f1ce240fcb57190e57651d7e4c82ced..936c7d44af208d1103ff08f0fd3c74e4ca39362a 100644 (file)
@@ -50,7 +50,7 @@ public class Vala.TypeofExpression : Expression {
                type_reference = type;
                source_reference = source;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_typeof_expression (this);
 
index 8ba3aef578a02dfc9fe6cfd2e4c1a05b8028230a..ce1d4ea30e0b29ba52902c1af55a9f1e90de1840 100644 (file)
@@ -52,7 +52,7 @@ public abstract class Vala.TypeSymbol : Symbol {
        public virtual bool is_subtype_of (TypeSymbol t) {
                return (this == t);
        }
-       
+
        /**
         * Return the index of the specified type parameter name.
         */
index 95b0d4fc48c27f689ba142aaf165dbdf85842dda..87f4032efc192496153bbe9c56eb032815df7cdc 100644 (file)
@@ -44,7 +44,7 @@ public class Vala.UnaryExpression : Expression {
                        _inner.parent_node = this;
                }
        }
-       
+
        private Expression _inner;
 
        /**
index 527fa0a7d08104703d4b516a16b2ccaa66fe260c..84244809c0f96df171d43285cb3fa1da97bc8519 100644 (file)
@@ -78,11 +78,11 @@ public class Vala.UnresolvedType : DataType {
                result.nullable = nullable;
                result.is_dynamic = is_dynamic;
                result.unresolved_symbol = unresolved_symbol.copy ();
-               
+
                foreach (DataType arg in get_type_arguments ()) {
                        result.add_type_argument (arg.copy ());
                }
-               
+
                return result;
        }
 
index 4a76e2df442d6867f8f66a4c4a0ec9eae6f2492d..4947b33a9415faee614855569627f599e2d8177d 100644 (file)
@@ -63,7 +63,7 @@ public class Vala.UsedAttr : CodeVisitor {
                "Version", "since", "replacement", "deprecated", "deprecated_since", "experimental", "experimental_until", "",
                "Signal", "detailed", "run", "no_recurse", "action", "no_hooks", "",
                "Description", "nick", "blurb", "",
-               
+
                "IntegerType", "rank", "min", "max", "signed", "width", "",
                "FloatingType", "rank", "decimal", "width", "",
                "BooleanType", "",
@@ -86,7 +86,7 @@ public class Vala.UsedAttr : CodeVisitor {
                "GIR", "fullname", "name", ""
 
        };
-       
+
        public UsedAttr () {
                // mark default valac attrs
                var curattr = "";
@@ -103,7 +103,7 @@ public class Vala.UsedAttr : CodeVisitor {
                        }
                }
        }
-       
+
        /**
         * Mark the attribute or attribute argument as used by the compiler
         */
@@ -118,7 +118,7 @@ public class Vala.UsedAttr : CodeVisitor {
                        set.add (argument);
                }
        }
-       
+
        /**
         * Traverse the code tree and warn about unused attributes.
         *
@@ -145,12 +145,12 @@ public class Vala.UsedAttr : CodeVisitor {
                        }
                }
        }
-       
+
        public override void visit_namespace (Namespace ns) {
                check_unused_attr (ns);
                ns.accept_children (this);
        }
-       
+
        public override void visit_class (Class cl) {
                check_unused_attr (cl);
                cl.accept_children (this);
index 9fb0766aff7050728084d7d2de9778cf9a3e17ad..15bb2d034950ee2475324d6442c573c1822eb5d4 100644 (file)
@@ -41,7 +41,7 @@ public class Vala.UsingDirective : CodeNode {
                this.namespace_symbol = namespace_symbol;
                this.source_reference = source_reference;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_using_directive (this);
        }
index e625e660bba7890c52d314addadb74f68f9d0bfa..80a444c0b112c8abc77de535df90968b5ec10f96 100644 (file)
@@ -35,7 +35,7 @@ public class Vala.Variable : Symbol {
                        }
                }
        }
-       
+
        /**
         * The variable type.
         */
index 6a1bcde13b1f3b3f74cd89ba296fc3dffbc5f3a0..9c4e65e6c0a04c3335d6af415b645b32c4f0a4be 100644 (file)
@@ -38,7 +38,7 @@ public class Vala.WhileStatement : CodeNode, Statement {
                        _condition.parent_node = this;
                }
        }
-       
+
        /**
         * Specifies the loop body.
         */
@@ -68,14 +68,14 @@ public class Vala.WhileStatement : CodeNode, Statement {
                this.source_reference = source_reference;
                this.condition = condition;
        }
-       
+
        public override void accept (CodeVisitor visitor) {
                visitor.visit_while_statement (this);
        }
 
        public override void accept_children (CodeVisitor visitor) {
                condition.accept (visitor);
-               
+
                visitor.visit_end_full_expression (condition);
 
                body.accept (visitor);
index 25e7a09077e18388e38bb18859d1fca28c4703c4..be31313ff6d52f4c0e48a7a6fb32268d541523d9 100644 (file)
@@ -57,7 +57,7 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
        public override void visit_comment (Content.Comment c) {
                c.accept_children (this);
        }
-  
+
        public override void visit_embedded (Embedded em) {
                current_builder.append ("<figure>");
                if (em.caption != null) {
@@ -83,7 +83,7 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
                hl.accept_children (this);
                current_builder.append ("\n");
        }
-  
+
        public override void visit_wiki_link (WikiLink link) {
                // wiki pages are not supported right now
                if (link.content.size > 0) {
@@ -159,13 +159,13 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
                list.accept_children (this);
                current_builder.append_printf ("</%s>", tag);
        }
-  
+
        public override void visit_list_item (ListItem item) {
                current_builder.append ("<listitem>");
                item.accept_children (this);
                current_builder.append ("</listitem>");
        }
-  
+
        public override void visit_paragraph (Paragraph para) {
                if (!in_brief_comment) {
                        current_builder.append ("<para>");
@@ -196,7 +196,7 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
        public override void visit_page (Page page) {
                page.accept_children (this);
        }
-  
+
        public override void visit_run (Run run) {
                string? tag = null;
                switch (run.style) {
@@ -226,19 +226,19 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
                        current_builder.append_printf ("</%s>", tag);
                }
        }
-  
+
        public override void visit_source_code (SourceCode code) {
                current_builder.append ("\n|[\n");
                current_builder.append (Markup.escape_text (code.code));
                current_builder.append ("\n]|\n");
        }
-  
+
        public override void visit_table (Table t) {
                current_builder.append ("<table>");
                t.accept_children (this);
                current_builder.append ("</table>");
        }
-  
+
        public override void visit_table_row (TableRow row) {
                current_builder.append ("<tr>");
                row.accept_children (this);
@@ -250,7 +250,7 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
                cell.accept_children (this);
                current_builder.append ("</td>");
        }
-  
+
        public override void visit_taglet (Taglet t) {
                var old_builder = (owned)current_builder;
                current_builder = new StringBuilder ();
@@ -296,7 +296,7 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
                }
                current_builder = (owned)old_builder;
        }
-  
+
        public override void visit_text (Text t) {
                current_builder.append (Markup.escape_text (t.content));
                t.accept_children (this);
index 09bab21a09766a508c34bb1b297f3ecbbf54f356..c6f135a8c94678b60e693a082e2c5fdb23a39e4a 100644 (file)
@@ -769,7 +769,7 @@ It is important that your <link linkend=\"GValue\"><type>GValue</type></link> ho
 
                en.accept_all_children (this);
                var gcomment = add_symbol (en.get_filename(), en.get_cname(), en.documentation);
-       
+
                // Handle attributes for things like deprecation.
                process_attributes (en, gcomment);
 
@@ -903,7 +903,7 @@ It is important that your <link linkend=\"GValue\"><type>GValue</type></link> ho
                        // field not in class/struct/interface
                        var gcomment = add_symbol (f.get_filename(), f.get_cname(), f.documentation);
                        f.accept_all_children (this);
-       
+
                        // Handle attributes for things like deprecation.
                        process_attributes (f, gcomment);
                } else {
@@ -957,7 +957,7 @@ It is important that your <link linkend=\"GValue\"><type>GValue</type></link> ho
                        */
                        }
                }
-       
+
                // Handle attributes for things like deprecation.
                process_attributes (d, gcomment);
 
index be551720417af229478563c8dc15129ec8b371bf..21ddea6642448e8336243be4f2d0e96c6d8927db 100644 (file)
@@ -257,7 +257,7 @@ public class Gtkdoc.TextWriter {
        public void close () {
                stream = null;
        }
-       
+
        public void write_line (string line) {
                stream.puts (line);
                stream.putc ('\n');
index b60de1683bdb1eea6ab2f860e9228b26d13aeaeb..4980e88ab19fdba2237d0c5b4a2429b8d83d9151 100644 (file)
@@ -186,7 +186,7 @@ public class Valadoc.Drivers.SymbolResolver : Visitor {
                }
 
                resolve_type_reference (item.property_type);
-               
+
                item.accept_all_children (this, false);
        }
 
index 48c54b53787604b42c067410dd98854bf36d7fe6..4a1024d24825825f724ecb6239e3d3001645815a 100644 (file)
@@ -182,7 +182,7 @@ public static void test_enum_global (Api.Enum? en, Api.Package pkg, Api.Namespac
                        Api.NodeType.TYPE_PARAMETER
                };
 
-       Vala.List<Api.Node> nodes = en.get_children_by_types (forbidden, false);        
+       Vala.List<Api.Node> nodes = en.get_children_by_types (forbidden, false);
        assert (nodes.size == 0);
 }
 
@@ -339,7 +339,7 @@ public static void test_erroromain_global (Api.ErrorDomain? err, Api.Package pkg
                        Api.NodeType.TYPE_PARAMETER
                };
 
-       Vala.List<Api.Node> nodes = err.get_children_by_types (forbidden, false);       
+       Vala.List<Api.Node> nodes = err.get_children_by_types (forbidden, false);
        assert (nodes.size == 0);
 }
 
@@ -756,7 +756,7 @@ public static void test_class_global (Api.Class? cl, Api.Package pkg, Api.Namesp
 
                case "field2":
                        // (.Field check)
-                       assert (field.get_cname () == "field2");        
+                       assert (field.get_cname () == "field2");
                        assert (field.is_static == false);
                        assert (field.is_volatile == false);
                        // (.Symbol check)
@@ -833,7 +833,7 @@ public static void test_class_global (Api.Class? cl, Api.Package pkg, Api.Namesp
                        Api.NodeType.TYPE_PARAMETER
                };
 
-       Vala.List<Api.Node> nodes = cl.get_children_by_types (forbidden, false);        
+       Vala.List<Api.Node> nodes = cl.get_children_by_types (forbidden, false);
        assert (nodes.size == 0);
 }
 
@@ -1157,7 +1157,7 @@ public static void test_interface_global (Api.Interface? iface, Api.Package pkg,
                        Api.NodeType.TYPE_PARAMETER
                };
 
-       Vala.List<Api.Node> nodes = iface.get_children_by_types (forbidden, false);     
+       Vala.List<Api.Node> nodes = iface.get_children_by_types (forbidden, false);
        assert (nodes.size == 0);
 }
 
@@ -1362,7 +1362,7 @@ public static void test_struct_global (Api.Struct? stru, Api.Package pkg, Api.Na
 
                case "field2":
                        // (.Field check)
-                       assert (field.get_cname () == "field2");        
+                       assert (field.get_cname () == "field2");
                        assert (field.is_static == false);
                        assert (field.is_volatile == false);
                        // (.Symbol check)
@@ -1562,7 +1562,7 @@ public static void test_struct_global (Api.Struct? stru, Api.Package pkg, Api.Na
                        Api.NodeType.TYPE_PARAMETER
                };
 
-       Vala.List<Api.Node> nodes = stru.get_children_by_types (forbidden, false);      
+       Vala.List<Api.Node> nodes = stru.get_children_by_types (forbidden, false);
        assert (nodes.size == 0);
 }
 
@@ -1611,7 +1611,7 @@ public static void param_test (Api.Namespace ns, Api.Package pkg) {
                                Api.NodeType.TYPE_PARAMETER
                        };
 
-               Vala.List<Api.Node> nodes = m.get_children_by_types (forbidden, false); 
+               Vala.List<Api.Node> nodes = m.get_children_by_types (forbidden, false);
                assert (nodes.size == 0);
 
                Vala.List<Api.Node> params = m.get_children_by_type (Api.NodeType.FORMAL_PARAMETER, false);
@@ -2325,7 +2325,7 @@ public static void param_test (Api.Namespace ns, Api.Package pkg) {
                        Api.NodeType.TYPE_PARAMETER
                };
 
-       Vala.List<Api.Node> nodes = ns.get_children_by_types (forbidden, false);        
+       Vala.List<Api.Node> nodes = ns.get_children_by_types (forbidden, false);
        assert (nodes.size == 0);
 }
 
@@ -2370,7 +2370,7 @@ public static void return_test (Api.Namespace ns, Api.Package pkg) {
                                Api.NodeType.TYPE_PARAMETER
                        };
 
-               Vala.List<Api.Node> nodes = m.get_children_by_types (forbidden, false); 
+               Vala.List<Api.Node> nodes = m.get_children_by_types (forbidden, false);
                assert (nodes.size == 0);
 
                Api.TypeReference? ret = m.return_type;
@@ -2723,7 +2723,7 @@ public static void test_global_ns (Api.Namespace global_ns, Api.Package pkg) {
        Api.Field field = fields.get (0) as Api.Field;
        assert (field != null);
        // (.Field check)
-       assert (field.get_cname () == "test_field_global");     
+       assert (field.get_cname () == "test_field_global");
        assert (field.is_static == false);
        assert (field.is_volatile == false);
        // (.Symbol check)
@@ -2744,7 +2744,7 @@ public static void test_global_ns (Api.Namespace global_ns, Api.Package pkg) {
        Api.Constant constant = constants.get (0) as Api.Constant;
        assert (constant != null);
        // (.Constant check)
-       assert (constant.get_cname () == "test_const_global");  
+       assert (constant.get_cname () == "test_const_global");
        // (.Symbol check)
        assert (constant.is_deprecated == false);
        assert (constant.accessibility == Api.SymbolAccessibility.PUBLIC);
index 164a2a53845decb85e83c40c358646b187b6c7f5..f299931da5f347e25a3621ffda8fd284d77a49a1 100644 (file)
@@ -175,7 +175,7 @@ myword
        assert (token.type == Gtkdoc.TokenType.WORD);
        assert (token.content == "myword");
        assert (token.attributes == null);
-       
+
 
        token = scanner.next ();
        assert (token.type == Gtkdoc.TokenType.SPACE);
index 363e4b462df53759f09d9baf8d80d8f2658f162d..426b3a756a750452fb83b996fa8b994cff4d27c8 100644 (file)
@@ -26,7 +26,7 @@ using Valadoc;
 public static void positive_1 () {
        var reporter = new ErrorReporter ();
 
-       string content = 
+       string content =
 """<?xml version="1.0" ?>
 <root-element>
        <subelement level="1" nested="true">my text</subelement>
index 4c4cd02cffa0268a019daf38c3edcd3c832e301d..a1a7a7773d16cac20c4b0e8797cfa203c202c5f5 100644 (file)
@@ -1492,7 +1492,7 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
                parent.add_child (node);
 
                process_children (node, element);
-       }       
+       }
 
 
        //