summaryrefslogtreecommitdiff
path: root/vala/valatypeofexpression.vala
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2008-11-10 18:56:28 +0000
committerJürg Billeter <juergbi@src.gnome.org>2008-11-10 18:56:28 +0000
commit67649405484570ae012df33b302e0b708a027b2e (patch)
tree09e3f1ec3fcd388a1ceeeef594115d3362709842 /vala/valatypeofexpression.vala
parentef2a5af23c8596f9b5e0805ed1cd7ee628fb3cf2 (diff)
downloadvala-67649405484570ae012df33b302e0b708a027b2e.tar.gz
Move expression checking to code nodes
2008-11-10 Jürg Billeter <j@bitron.ch> * vala/valaaddressofexpression.vala: * vala/valabaseaccess.vala: * vala/valabooleanliteral.vala: * vala/valacastexpression.vala: * vala/valacharacterliteral.vala: * vala/valaconditionalexpression.vala: * vala/valaintegerliteral.vala: * vala/valalambdaexpression.vala: * vala/valanullliteral.vala: * vala/valaobjectcreationexpression.vala: * vala/valaparenthesizedexpression.vala: * vala/valapointerindirection.vala: * vala/valapostfixexpression.vala: * vala/valarealliteral.vala: * vala/valareferencetransferexpression.vala: * vala/valasemanticanalyzer.vala: * vala/valasizeofexpression.vala: * vala/valastringliteral.vala: * vala/valatypecheck.vala: * vala/valatypeofexpression.vala: * vala/valaunaryexpression.vala: Move expression checking to code nodes svn path=/trunk/; revision=2009
Diffstat (limited to 'vala/valatypeofexpression.vala')
-rw-r--r--vala/valatypeofexpression.vala14
1 files changed, 13 insertions, 1 deletions
diff --git a/vala/valatypeofexpression.vala b/vala/valatypeofexpression.vala
index d7111003f..918ae6ccd 100644
--- a/vala/valatypeofexpression.vala
+++ b/vala/valatypeofexpression.vala
@@ -1,6 +1,6 @@
/* valatypeofexpression.vala
*
- * Copyright (C) 2006-2007 Jürg Billeter
+ * Copyright (C) 2006-2008 Jürg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -68,4 +68,16 @@ public class Vala.TypeofExpression : Expression {
type_reference = new_type;
}
}
+
+ public override bool check (SemanticAnalyzer analyzer) {
+ if (checked) {
+ return !error;
+ }
+
+ checked = true;
+
+ value_type = analyzer.type_type;
+
+ return !error;
+ }
}