| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/compiler_stats.h" | 10 #include "vm/compiler_stats.h" |
| (...skipping 3108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3119 const String& name = *CurrentLiteral(); | 3119 const String& name = *CurrentLiteral(); |
| 3120 ConsumeToken(); | 3120 ConsumeToken(); |
| 3121 ExpectToken(Token::kRPAREN); | 3121 ExpectToken(Token::kRPAREN); |
| 3122 ExpectToken(Token::kSEMICOLON); | 3122 ExpectToken(Token::kSEMICOLON); |
| 3123 library_.SetName(name); | 3123 library_.SetName(name); |
| 3124 } | 3124 } |
| 3125 } | 3125 } |
| 3126 | 3126 |
| 3127 | 3127 |
| 3128 Dart_Handle Parser::CallLibraryTagHandler(Dart_LibraryTag tag, | 3128 Dart_Handle Parser::CallLibraryTagHandler(Dart_LibraryTag tag, |
| 3129 intptr_t token_pos, | 3129 intptr_t token_pos, |
| 3130 const String& url) { | 3130 const String& url) { |
| 3131 Dart_LibraryTagHandler handler = Isolate::Current()->library_tag_handler(); | 3131 Dart_LibraryTagHandler handler = Isolate::Current()->library_tag_handler(); |
| 3132 if (handler == NULL) { | 3132 if (handler == NULL) { |
| 3133 ErrorMsg(token_pos, "no library handler registered"); | 3133 ErrorMsg(token_pos, "no library handler registered"); |
| 3134 } | 3134 } |
| 3135 Dart_Handle result = handler(tag, | 3135 Dart_Handle result = handler(tag, |
| 3136 Api::NewLocalHandle(library_), | 3136 Api::NewLocalHandle(library_), |
| 3137 Api::NewLocalHandle(url)); | 3137 Api::NewLocalHandle(url)); |
| 3138 if (Dart_IsError(result)) { | 3138 if (Dart_IsError(result)) { |
| 3139 ErrorMsg(token_pos, "library handler failed: %s", Dart_GetError(result)); | 3139 ErrorMsg(token_pos, "library handler failed: %s", Dart_GetError(result)); |
| 3140 } | 3140 } |
| (...skipping 4207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7348 } | 7348 } |
| 7349 | 7349 |
| 7350 | 7350 |
| 7351 void Parser::SkipNestedExpr() { | 7351 void Parser::SkipNestedExpr() { |
| 7352 const bool saved_mode = SetAllowFunctionLiterals(true); | 7352 const bool saved_mode = SetAllowFunctionLiterals(true); |
| 7353 SkipExpr(); | 7353 SkipExpr(); |
| 7354 SetAllowFunctionLiterals(saved_mode); | 7354 SetAllowFunctionLiterals(saved_mode); |
| 7355 } | 7355 } |
| 7356 | 7356 |
| 7357 } // namespace dart | 7357 } // namespace dart |
| OLD | NEW |