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 5792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5803 if (tag == Dart_kCanonicalizeUrl) { | 5803 if (tag == Dart_kCanonicalizeUrl) { |
5804 return url.raw(); | 5804 return url.raw(); |
5805 } | 5805 } |
5806 return Object::null(); | 5806 return Object::null(); |
5807 } | 5807 } |
5808 ReportError(token_pos, "no library handler registered"); | 5808 ReportError(token_pos, "no library handler registered"); |
5809 } | 5809 } |
5810 // Block class finalization attempts when calling into the library | 5810 // Block class finalization attempts when calling into the library |
5811 // tag handler. | 5811 // tag handler. |
5812 I->BlockClassFinalization(); | 5812 I->BlockClassFinalization(); |
5813 Api::Scope api_scope(I); | 5813 Api::Scope api_scope(T); |
5814 Dart_Handle result = handler(tag, | 5814 Dart_Handle result = handler(tag, |
5815 Api::NewHandle(I, library_.raw()), | 5815 Api::NewHandle(I, library_.raw()), |
5816 Api::NewHandle(I, url.raw())); | 5816 Api::NewHandle(I, url.raw())); |
5817 I->UnblockClassFinalization(); | 5817 I->UnblockClassFinalization(); |
5818 if (Dart_IsError(result)) { | 5818 if (Dart_IsError(result)) { |
5819 // In case of an error we append an explanatory error message to the | 5819 // In case of an error we append an explanatory error message to the |
5820 // error obtained from the library tag handler. | 5820 // error obtained from the library tag handler. |
5821 Error& prev_error = Error::Handle(Z); | 5821 Error& prev_error = Error::Handle(Z); |
5822 prev_error ^= Api::UnwrapHandle(result); | 5822 prev_error ^= Api::UnwrapHandle(result); |
5823 Report::LongJumpF(prev_error, script_, token_pos, "library handler failed"); | 5823 Report::LongJumpF(prev_error, script_, token_pos, "library handler failed"); |
(...skipping 8478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14302 void Parser::SkipQualIdent() { | 14302 void Parser::SkipQualIdent() { |
14303 ASSERT(IsIdentifier()); | 14303 ASSERT(IsIdentifier()); |
14304 ConsumeToken(); | 14304 ConsumeToken(); |
14305 if (CurrentToken() == Token::kPERIOD) { | 14305 if (CurrentToken() == Token::kPERIOD) { |
14306 ConsumeToken(); // Consume the kPERIOD token. | 14306 ConsumeToken(); // Consume the kPERIOD token. |
14307 ExpectIdentifier("identifier expected after '.'"); | 14307 ExpectIdentifier("identifier expected after '.'"); |
14308 } | 14308 } |
14309 } | 14309 } |
14310 | 14310 |
14311 } // namespace dart | 14311 } // namespace dart |
OLD | NEW |