| 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 part of scanner; | 5 part of scanner; |
| 6 | 6 |
| 7 class FormalParameterType { | 7 class FormalParameterType { |
| 8 final String type; | 8 final String type; |
| 9 const FormalParameterType(this.type); | 9 const FormalParameterType(this.type); |
| 10 bool get isRequired => this == REQUIRED; | 10 bool get isRequired => this == REQUIRED; |
| (...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 } | 1066 } |
| 1067 | 1067 |
| 1068 void parseModifierList(Link<Token> tokens) { | 1068 void parseModifierList(Link<Token> tokens) { |
| 1069 int count = 0; | 1069 int count = 0; |
| 1070 for (; !tokens.isEmpty; tokens = tokens.tail) { | 1070 for (; !tokens.isEmpty; tokens = tokens.tail) { |
| 1071 Token token = tokens.head; | 1071 Token token = tokens.head; |
| 1072 if (isModifier(token)) { | 1072 if (isModifier(token)) { |
| 1073 parseModifier(token); | 1073 parseModifier(token); |
| 1074 } else { | 1074 } else { |
| 1075 listener.unexpected(token); | 1075 listener.unexpected(token); |
| 1076 // Skip the remaining modifiers. |
| 1077 break; |
| 1076 } | 1078 } |
| 1077 count++; | 1079 count++; |
| 1078 } | 1080 } |
| 1079 listener.handleModifiers(count); | 1081 listener.handleModifiers(count); |
| 1080 } | 1082 } |
| 1081 | 1083 |
| 1082 Token parseModifiers(Token token) { | 1084 Token parseModifiers(Token token) { |
| 1083 int count = 0; | 1085 int count = 0; |
| 1084 while (identical(token.kind, KEYWORD_TOKEN)) { | 1086 while (identical(token.kind, KEYWORD_TOKEN)) { |
| 1085 if (!isModifier(token)) | 1087 if (!isModifier(token)) |
| (...skipping 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2661 } | 2663 } |
| 2662 listener.handleContinueStatement(hasTarget, continueKeyword, token); | 2664 listener.handleContinueStatement(hasTarget, continueKeyword, token); |
| 2663 return expectSemicolon(token); | 2665 return expectSemicolon(token); |
| 2664 } | 2666 } |
| 2665 | 2667 |
| 2666 Token parseEmptyStatement(Token token) { | 2668 Token parseEmptyStatement(Token token) { |
| 2667 listener.handleEmptyStatement(token); | 2669 listener.handleEmptyStatement(token); |
| 2668 return expectSemicolon(token); | 2670 return expectSemicolon(token); |
| 2669 } | 2671 } |
| 2670 } | 2672 } |
| OLD | NEW |