| 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/bootstrap.h" | 9 #include "vm/bootstrap.h" |
| 10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // --enable-checked-mode and --checked both enable checked mode which is | 51 // --enable-checked-mode and --checked both enable checked mode which is |
| 52 // equivalent to setting --enable-asserts and --enable-type-checks. | 52 // equivalent to setting --enable-asserts and --enable-type-checks. |
| 53 DEFINE_FLAG_HANDLER(CheckedModeHandler, | 53 DEFINE_FLAG_HANDLER(CheckedModeHandler, |
| 54 enable_checked_mode, | 54 enable_checked_mode, |
| 55 "Enable checked mode."); | 55 "Enable checked mode."); |
| 56 | 56 |
| 57 DEFINE_FLAG_HANDLER(CheckedModeHandler, | 57 DEFINE_FLAG_HANDLER(CheckedModeHandler, |
| 58 checked, | 58 checked, |
| 59 "Enable checked mode."); | 59 "Enable checked mode."); |
| 60 | 60 |
| 61 |
| 62 // Quick access to the locally defined isolate() method. |
| 63 #define I (isolate()) |
| 64 |
| 65 |
| 61 #if defined(DEBUG) | 66 #if defined(DEBUG) |
| 62 class TraceParser : public ValueObject { | 67 class TraceParser : public ValueObject { |
| 63 public: | 68 public: |
| 64 TraceParser(intptr_t token_pos, const Script& script, const char* msg) { | 69 TraceParser(intptr_t token_pos, const Script& script, const char* msg) { |
| 65 if (FLAG_trace_parser) { | 70 if (FLAG_trace_parser) { |
| 66 // Skips tracing of bootstrap libraries. | 71 // Skips tracing of bootstrap libraries. |
| 67 if (script.HasSource()) { | 72 if (script.HasSource()) { |
| 68 intptr_t line, column; | 73 intptr_t line, column; |
| 69 script.GetTokenLocation(token_pos, &line, &column); | 74 script.GetTokenLocation(token_pos, &line, &column); |
| 70 PrintIndent(); | 75 PrintIndent(); |
| (...skipping 10950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11021 void Parser::SkipQualIdent() { | 11026 void Parser::SkipQualIdent() { |
| 11022 ASSERT(IsIdentifier()); | 11027 ASSERT(IsIdentifier()); |
| 11023 ConsumeToken(); | 11028 ConsumeToken(); |
| 11024 if (CurrentToken() == Token::kPERIOD) { | 11029 if (CurrentToken() == Token::kPERIOD) { |
| 11025 ConsumeToken(); // Consume the kPERIOD token. | 11030 ConsumeToken(); // Consume the kPERIOD token. |
| 11026 ExpectIdentifier("identifier expected after '.'"); | 11031 ExpectIdentifier("identifier expected after '.'"); |
| 11027 } | 11032 } |
| 11028 } | 11033 } |
| 11029 | 11034 |
| 11030 } // namespace dart | 11035 } // namespace dart |
| OLD | NEW |