| 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 "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 21 matching lines...) Expand all Loading... |
| 32 DEFINE_FLAG(bool, warn_legacy_map_literal, false, | 32 DEFINE_FLAG(bool, warn_legacy_map_literal, false, |
| 33 "Warning on legacy map literal syntax (single type argument)"); | 33 "Warning on legacy map literal syntax (single type argument)"); |
| 34 | 34 |
| 35 static void CheckedModeHandler(bool value) { | 35 static void CheckedModeHandler(bool value) { |
| 36 FLAG_enable_asserts = value; | 36 FLAG_enable_asserts = value; |
| 37 FLAG_enable_type_checks = value; | 37 FLAG_enable_type_checks = value; |
| 38 } | 38 } |
| 39 | 39 |
| 40 DEFINE_FLAG_HANDLER(CheckedModeHandler, | 40 DEFINE_FLAG_HANDLER(CheckedModeHandler, |
| 41 enable_checked_mode, | 41 enable_checked_mode, |
| 42 "Enabled checked mode."); | 42 "Enable checked mode."); |
| 43 | 43 |
| 44 #if defined(DEBUG) | 44 #if defined(DEBUG) |
| 45 | 45 |
| 46 class TraceParser : public ValueObject { | 46 class TraceParser : public ValueObject { |
| 47 public: | 47 public: |
| 48 TraceParser(intptr_t token_pos, const Script& script, const char* msg) { | 48 TraceParser(intptr_t token_pos, const Script& script, const char* msg) { |
| 49 if (FLAG_trace_parser) { | 49 if (FLAG_trace_parser) { |
| 50 // Skips tracing of bootstrap libraries. | 50 // Skips tracing of bootstrap libraries. |
| 51 if (script.HasSource()) { | 51 if (script.HasSource()) { |
| 52 intptr_t line, column; | 52 intptr_t line, column; |
| (...skipping 9456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9509 void Parser::SkipQualIdent() { | 9509 void Parser::SkipQualIdent() { |
| 9510 ASSERT(IsIdentifier()); | 9510 ASSERT(IsIdentifier()); |
| 9511 ConsumeToken(); | 9511 ConsumeToken(); |
| 9512 if (CurrentToken() == Token::kPERIOD) { | 9512 if (CurrentToken() == Token::kPERIOD) { |
| 9513 ConsumeToken(); // Consume the kPERIOD token. | 9513 ConsumeToken(); // Consume the kPERIOD token. |
| 9514 ExpectIdentifier("identifier expected after '.'"); | 9514 ExpectIdentifier("identifier expected after '.'"); |
| 9515 } | 9515 } |
| 9516 } | 9516 } |
| 9517 | 9517 |
| 9518 } // namespace dart | 9518 } // namespace dart |
| OLD | NEW |