diff options
author | Jürg Billeter <j@bitron.ch> | 2008-09-26 19:09:30 +0000 |
---|---|---|
committer | Jürg Billeter <juergbi@src.gnome.org> | 2008-09-26 19:09:30 +0000 |
commit | aaa70e51776a4fb842f982fcddcd032a543fe12b (patch) | |
tree | e5ef3913a804dd0530d7449c86899007a11126d7 /vala/valausingdirective.vala | |
parent | 5aeac6a9f613ad321933af1bf29d1a108dc637a2 (diff) | |
download | vala-aaa70e51776a4fb842f982fcddcd032a543fe12b.tar.gz |
Replace NamespaceReference by UsingDirective and UnresolvedSymbol, fixes
2008-09-26 Jürg Billeter <j@bitron.ch>
* vala/Makefile.am:
* vala/valacodevisitor.vala:
* vala/valagenieparser.vala:
* vala/valaparser.vala:
* vala/valasemanticanalyzer.vala:
* vala/valasourcefile.vala:
* vala/valasymbolresolver.vala:
* vala/valaunresolvedsymbol.vala:
* vala/valausingdirective.vala:
* compiler/valacompiler.vala:
Replace NamespaceReference by UsingDirective and UnresolvedSymbol,
fixes bug 537510
* tests/namespaces.vala:
Test using directive with nested namespaces
svn path=/trunk/; revision=1783
Diffstat (limited to 'vala/valausingdirective.vala')
-rw-r--r-- | vala/valausingdirective.vala | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/vala/valausingdirective.vala b/vala/valausingdirective.vala new file mode 100644 index 000000000..9fb0766af --- /dev/null +++ b/vala/valausingdirective.vala @@ -0,0 +1,48 @@ +/* valausingdirective.vala + * + * 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 + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Author: + * Jürg Billeter <j@bitron.ch> + */ + +using GLib; + +/** + * A reference to a namespace symbol. + */ +public class Vala.UsingDirective : CodeNode { + /** + * The symbol of the namespace this using directive is referring to. + */ + public Symbol namespace_symbol { get; set; } + + /** + * Creates a new using directive. + * + * @param namespace_symbol namespace symbol + * @return newly created using directive + */ + public UsingDirective (Symbol namespace_symbol, SourceReference? source_reference = null) { + this.namespace_symbol = namespace_symbol; + this.source_reference = source_reference; + } + + public override void accept (CodeVisitor visitor) { + visitor.visit_using_directive (this); + } +} |