summaryrefslogtreecommitdiff
path: root/vala/valasymbolresolver.vala
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2009-01-03 14:02:48 +0000
committerJürg Billeter <juergbi@src.gnome.org>2009-01-03 14:02:48 +0000
commitd19da45e60ffec828f352572249cfbc46d9cbb08 (patch)
tree7b94163ed5b453b95b95636cebc15221f65e9dcf /vala/valasymbolresolver.vala
parentf6bf92b12f8ee41102136e12aa5a98275c24e812 (diff)
downloadvala-d19da45e60ffec828f352572249cfbc46d9cbb08.tar.gz
Add BooleanType, EnumValueType, FloatingType, and StructValueType as
2009-01-03 Jürg Billeter <j@bitron.ch> * vala/Makefile.am: * vala/valaarraytype.vala: * vala/valabinaryexpression.vala: * vala/valabooleantype.vala: * vala/valacharacterliteral.vala: * vala/valadostatement.vala: * vala/valaenum.vala: * vala/valaenumvaluetype.vala: * vala/valaerrordomain.vala: * vala/valafloatingtype.vala: * vala/valaintegerliteral.vala: * vala/valaintegertype.vala: * vala/valaobjectcreationexpression.vala: * vala/valarealliteral.vala: * vala/valasemanticanalyzer.vala: * vala/valastruct.vala: * vala/valastructvaluetype.vala: * vala/valasymbolresolver.vala: * vala/valavaluetype.vala: * gobject/valaccodebasemodule.vala: * gobject/valaccodemethodmodule.vala: * vapi/glib-2.0.vapi: Add BooleanType, EnumValueType, FloatingType, and StructValueType as ValueType subclasses svn path=/trunk/; revision=2256
Diffstat (limited to 'vala/valasymbolresolver.vala')
-rw-r--r--vala/valasymbolresolver.vala15
1 files changed, 12 insertions, 3 deletions
diff --git a/vala/valasymbolresolver.vala b/vala/valasymbolresolver.vala
index 7ce0055e4..be43079f2 100644
--- a/vala/valasymbolresolver.vala
+++ b/vala/valasymbolresolver.vala
@@ -1,6 +1,6 @@
/* valasymbolresolver.vala
*
- * Copyright (C) 2006-2008 Jürg Billeter, Raffaele Sandrini
+ * Copyright (C) 2006-2009 Jürg Billeter, Raffaele Sandrini
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -276,9 +276,18 @@ public class Vala.SymbolResolver : CodeVisitor {
} else if (sym is Interface) {
type = new ObjectType ((Interface) sym);
} else if (sym is Struct) {
- type = new ValueType ((Struct) sym);
+ var st = (Struct) sym;
+ if (st.is_boolean_type ()) {
+ type = new BooleanType (st);
+ } else if (st.is_integer_type ()) {
+ type = new IntegerType (st);
+ } else if (st.is_floating_type ()) {
+ type = new FloatingType (st);
+ } else {
+ type = new StructValueType (st);
+ }
} else if (sym is Enum) {
- type = new ValueType ((Enum) sym);
+ type = new EnumValueType ((Enum) sym);
} else if (sym is ErrorDomain) {
type = new ErrorType ((ErrorDomain) sym, null, unresolved_type.source_reference);
} else if (sym is ErrorCode) {