| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/parser.h" | 5 #include "vm/parser.h" |
| 6 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "platform/utils.h" | 8 #include "platform/utils.h" |
| 9 #include "vm/ast_transformer.h" | 9 #include "vm/ast_transformer.h" |
| 10 #include "vm/bootstrap.h" | 10 #include "vm/bootstrap.h" |
| (...skipping 5811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5822 library_prefix = library_.LookupLocalLibraryPrefix(prefix); | 5822 library_prefix = library_.LookupLocalLibraryPrefix(prefix); |
| 5823 if (!library_prefix.IsNull()) { | 5823 if (!library_prefix.IsNull()) { |
| 5824 // Check that prefix names of deferred import clauses are | 5824 // Check that prefix names of deferred import clauses are |
| 5825 // unique. | 5825 // unique. |
| 5826 if (!is_deferred_import && library_prefix.is_deferred_load()) { | 5826 if (!is_deferred_import && library_prefix.is_deferred_load()) { |
| 5827 ReportError(prefix_pos, | 5827 ReportError(prefix_pos, |
| 5828 "prefix '%s' already used in a deferred import clause", | 5828 "prefix '%s' already used in a deferred import clause", |
| 5829 prefix.ToCString()); | 5829 prefix.ToCString()); |
| 5830 } | 5830 } |
| 5831 if (is_deferred_import) { | 5831 if (is_deferred_import) { |
| 5832 ReportError(prefix_pos, "prefix of deferred import must be uniqe"); | 5832 ReportError(prefix_pos, "prefix of deferred import must be unique"); |
| 5833 } | 5833 } |
| 5834 library_prefix.AddImport(ns); | 5834 library_prefix.AddImport(ns); |
| 5835 } else { | 5835 } else { |
| 5836 library_prefix = | 5836 library_prefix = |
| 5837 LibraryPrefix::New(prefix, ns, is_deferred_import, library_); | 5837 LibraryPrefix::New(prefix, ns, is_deferred_import, library_); |
| 5838 library_.AddObject(library_prefix, prefix); | 5838 library_.AddObject(library_prefix, prefix); |
| 5839 } | 5839 } |
| 5840 } | 5840 } |
| 5841 } else { | 5841 } else { |
| 5842 ASSERT(is_export); | 5842 ASSERT(is_export); |
| (...skipping 7973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13816 void Parser::SkipQualIdent() { | 13816 void Parser::SkipQualIdent() { |
| 13817 ASSERT(IsIdentifier()); | 13817 ASSERT(IsIdentifier()); |
| 13818 ConsumeToken(); | 13818 ConsumeToken(); |
| 13819 if (CurrentToken() == Token::kPERIOD) { | 13819 if (CurrentToken() == Token::kPERIOD) { |
| 13820 ConsumeToken(); // Consume the kPERIOD token. | 13820 ConsumeToken(); // Consume the kPERIOD token. |
| 13821 ExpectIdentifier("identifier expected after '.'"); | 13821 ExpectIdentifier("identifier expected after '.'"); |
| 13822 } | 13822 } |
| 13823 } | 13823 } |
| 13824 | 13824 |
| 13825 } // namespace dart | 13825 } // namespace dart |
| OLD | NEW |