1.1 --- a/src/compiler/AST.h Sun Jan 06 13:56:56 2013 -0800
1.2 +++ b/src/compiler/AST.h Sat Jan 12 16:13:46 2013 -0800
1.3 @@ -1086,9 +1086,10 @@
1.4 class ImportStatement : public Statement
1.5 {
1.6 public:
1.7 - ImportStatement(const SourcePosition &pos, PathComponent *path)
1.8 + ImportStatement(const SourcePosition &pos, PathComponent *path, NameList *names)
1.9 : Statement(pos),
1.10 - path_(path)
1.11 + path_(path),
1.12 + names_(names)
1.13 {
1.14 }
1.15
1.16 @@ -1103,17 +1104,25 @@
1.17 Handle<Importable> source() {
1.18 return source_;
1.19 }
1.20 - unsigned importIndex() {
1.21 + unsigned importIndex() const {
1.22 return importIndex_;
1.23 }
1.24 void setImportIndex(unsigned index) {
1.25 importIndex_ = index;
1.26 }
1.27 + NameList *names() const {
1.28 + return names_;
1.29 + }
1.30 +
1.31 + bool importAllNames() const {
1.32 + return names_ && names_->empty();
1.33 + }
1.34
1.35 private:
1.36 PathComponent *path_;
1.37 ScopedRoot<Importable> source_;
1.38 unsigned importIndex_;
1.39 + NameList *names_;
1.40 };
1.41
1.42 typedef StructureStatement::FieldList FieldList;