| 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 4901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4912 ConsumeToken(); | 4912 ConsumeToken(); |
| 4913 } | 4913 } |
| 4914 result = (CurrentToken() == Token::kIN); | 4914 result = (CurrentToken() == Token::kIN); |
| 4915 } | 4915 } |
| 4916 } | 4916 } |
| 4917 SetPosition(saved_pos); | 4917 SetPosition(saved_pos); |
| 4918 return result; | 4918 return result; |
| 4919 } | 4919 } |
| 4920 | 4920 |
| 4921 | 4921 |
| 4922 static bool ContainsAbruptCompletingStatement(SequenceNode *seq); | 4922 static bool ContainsAbruptCompletingStatement(SequenceNode* seq); |
| 4923 | 4923 |
| 4924 static bool IsAbruptCompleting(AstNode* statement) { | 4924 static bool IsAbruptCompleting(AstNode* statement) { |
| 4925 return statement->IsReturnNode() || | 4925 return statement->IsReturnNode() || |
| 4926 statement->IsJumpNode() || | 4926 statement->IsJumpNode() || |
| 4927 statement->IsThrowNode() || | 4927 statement->IsThrowNode() || |
| 4928 (statement->IsSequenceNode() && | 4928 (statement->IsSequenceNode() && |
| 4929 ContainsAbruptCompletingStatement(statement->AsSequenceNode())); | 4929 ContainsAbruptCompletingStatement(statement->AsSequenceNode())); |
| 4930 } | 4930 } |
| 4931 | 4931 |
| 4932 | 4932 |
| 4933 static bool ContainsAbruptCompletingStatement(SequenceNode *seq) { | 4933 static bool ContainsAbruptCompletingStatement(SequenceNode* seq) { |
| 4934 for (int i = 0; i < seq->length(); i++) { | 4934 for (int i = 0; i < seq->length(); i++) { |
| 4935 if (IsAbruptCompleting(seq->NodeAt(i))) { | 4935 if (IsAbruptCompleting(seq->NodeAt(i))) { |
| 4936 return true; | 4936 return true; |
| 4937 } | 4937 } |
| 4938 } | 4938 } |
| 4939 return false; | 4939 return false; |
| 4940 } | 4940 } |
| 4941 | 4941 |
| 4942 | 4942 |
| 4943 void Parser::ParseStatementSequence() { | 4943 void Parser::ParseStatementSequence() { |
| (...skipping 4296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9240 void Parser::SkipQualIdent() { | 9240 void Parser::SkipQualIdent() { |
| 9241 ASSERT(IsIdentifier()); | 9241 ASSERT(IsIdentifier()); |
| 9242 ConsumeToken(); | 9242 ConsumeToken(); |
| 9243 if (CurrentToken() == Token::kPERIOD) { | 9243 if (CurrentToken() == Token::kPERIOD) { |
| 9244 ConsumeToken(); // Consume the kPERIOD token. | 9244 ConsumeToken(); // Consume the kPERIOD token. |
| 9245 ExpectIdentifier("identifier expected after '.'"); | 9245 ExpectIdentifier("identifier expected after '.'"); |
| 9246 } | 9246 } |
| 9247 } | 9247 } |
| 9248 | 9248 |
| 9249 } // namespace dart | 9249 } // namespace dart |
| OLD | NEW |