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 12034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
12045 ResolveIdentInLocalScope(ident_pos, type_name, NULL)) { | 12045 ResolveIdentInLocalScope(ident_pos, type_name, NULL)) { |
12046 // The type is malformed. Skip over its type arguments. | 12046 // The type is malformed. Skip over its type arguments. |
12047 ParseTypeArguments(ClassFinalizer::kIgnore); | 12047 ParseTypeArguments(ClassFinalizer::kIgnore); |
12048 return ClassFinalizer::NewFinalizedMalformedType( | 12048 return ClassFinalizer::NewFinalizedMalformedType( |
12049 Error::Handle(Z), // No previous error. | 12049 Error::Handle(Z), // No previous error. |
12050 script_, | 12050 script_, |
12051 ident_pos, | 12051 ident_pos, |
12052 "using '%s' in this context is invalid", | 12052 "using '%s' in this context is invalid", |
12053 type_name.ToCString()); | 12053 type_name.ToCString()); |
12054 } | 12054 } |
12055 if (!FLAG_load_deferred_eagerly && | 12055 if ((!FLAG_load_deferred_eagerly || !allow_deferred_type) && |
hausner
2015/07/10 21:47:49
This is becoming kind of unreadable.
| |
12056 !prefix->IsNull() && prefix->is_deferred_load()) { | 12056 !prefix->IsNull() && prefix->is_deferred_load()) { |
12057 // If deferred prefixes are allowed but it is not yet loaded, | 12057 // If deferred prefixes are allowed but it is not yet loaded, |
12058 // remember that this function depends on the prefix. | 12058 // remember that this function depends on the prefix. |
12059 if (allow_deferred_type && !prefix->is_loaded()) { | 12059 if (allow_deferred_type && !prefix->is_loaded()) { |
12060 if (parsed_function() != NULL) { | 12060 if (parsed_function() != NULL) { |
12061 parsed_function()->AddDeferredPrefix(*prefix); | 12061 parsed_function()->AddDeferredPrefix(*prefix); |
12062 } | 12062 } |
12063 } | 12063 } |
12064 // If the deferred prefixes are not allowed, or if the prefix is not yet | 12064 // If the deferred prefixes are not allowed, or if the prefix is not yet |
12065 // loaded when finalization is requested, return a malformed type. | 12065 // loaded when finalization is requested, return a malformed type. |
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
13627 void Parser::SkipQualIdent() { | 13627 void Parser::SkipQualIdent() { |
13628 ASSERT(IsIdentifier()); | 13628 ASSERT(IsIdentifier()); |
13629 ConsumeToken(); | 13629 ConsumeToken(); |
13630 if (CurrentToken() == Token::kPERIOD) { | 13630 if (CurrentToken() == Token::kPERIOD) { |
13631 ConsumeToken(); // Consume the kPERIOD token. | 13631 ConsumeToken(); // Consume the kPERIOD token. |
13632 ExpectIdentifier("identifier expected after '.'"); | 13632 ExpectIdentifier("identifier expected after '.'"); |
13633 } | 13633 } |
13634 } | 13634 } |
13635 | 13635 |
13636 } // namespace dart | 13636 } // namespace dart |
OLD | NEW |