Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/scanner/parser.dart

Issue 206193002: Remove cancel and make crash exit with code 253. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 } while (optional(',', token)); 936 } while (optional(',', token));
937 mayParseFunctionExpressions = old; 937 mayParseFunctionExpressions = old;
938 listener.endInitializers(count, begin, token); 938 listener.endInitializers(count, begin, token);
939 return token; 939 return token;
940 } 940 }
941 941
942 Token parseLiteralStringOrRecoverExpression(Token token) { 942 Token parseLiteralStringOrRecoverExpression(Token token) {
943 if (identical(token.kind, STRING_TOKEN)) { 943 if (identical(token.kind, STRING_TOKEN)) {
944 return parseLiteralString(token); 944 return parseLiteralString(token);
945 } else { 945 } else {
946 listener.recoverableError("unexpected", token: token); 946 listener.recoverableError(token, "unexpected");
947 return parseExpression(token); 947 return parseExpression(token);
948 } 948 }
949 } 949 }
950 950
951 Token expectSemicolon(Token token) { 951 Token expectSemicolon(Token token) {
952 return expect(';', token); 952 return expect(';', token);
953 } 953 }
954 954
955 bool isModifier(Token token) { 955 bool isModifier(Token token) {
956 final String value = token.stringValue; 956 final String value = token.stringValue;
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after
2433 } 2433 }
2434 listener.handleContinueStatement(hasTarget, continueKeyword, token); 2434 listener.handleContinueStatement(hasTarget, continueKeyword, token);
2435 return expectSemicolon(token); 2435 return expectSemicolon(token);
2436 } 2436 }
2437 2437
2438 Token parseEmptyStatement(Token token) { 2438 Token parseEmptyStatement(Token token) {
2439 listener.handleEmptyStatement(token); 2439 listener.handleEmptyStatement(token);
2440 return expectSemicolon(token); 2440 return expectSemicolon(token);
2441 } 2441 }
2442 } 2442 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698