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

Side by Side Diff: dart/pkg/compiler/lib/src/scanner/parser.dart

Issue 822423005: Avoid duplicated messages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Should have no changes. Created 5 years, 11 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 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 } 889 }
890 Token token = parseIdentifier(name); 890 Token token = parseIdentifier(name);
891 891
892 token = parseFormalParametersOpt(token); 892 token = parseFormalParametersOpt(token);
893 bool previousYieldIsKeyword = yieldIsKeyword; 893 bool previousYieldIsKeyword = yieldIsKeyword;
894 bool previousAwaitIsKeyword = awaitIsKeyword; 894 bool previousAwaitIsKeyword = awaitIsKeyword;
895 token = parseAsyncModifier(token); 895 token = parseAsyncModifier(token);
896 token = parseFunctionBody(token, false, externalModifier != null); 896 token = parseFunctionBody(token, false, externalModifier != null);
897 yieldIsKeyword = previousYieldIsKeyword; 897 yieldIsKeyword = previousYieldIsKeyword;
898 awaitIsKeyword = previousAwaitIsKeyword; 898 awaitIsKeyword = previousAwaitIsKeyword;
899 listener.endTopLevelMethod(start, getOrSet, token); 899 Token endToken = token;
900 return token.next; 900 token = token.next;
901 if (token.kind == BAD_INPUT_TOKEN) {
902 token = listener.unexpected(token);
903 }
904 listener.endTopLevelMethod(start, getOrSet, endToken);
905 return token;
901 } 906 }
902 907
903 Link<Token> findMemberName(Token token) { 908 Link<Token> findMemberName(Token token) {
904 Token start = token; 909 Token start = token;
905 Link<Token> identifiers = const Link<Token>(); 910 Link<Token> identifiers = const Link<Token>();
906 while (!identical(token.kind, EOF_TOKEN)) { 911 while (!identical(token.kind, EOF_TOKEN)) {
907 String value = token.stringValue; 912 String value = token.stringValue;
908 if ((identical(value, '(')) || (identical(value, '{')) 913 if ((identical(value, '(')) || (identical(value, '{'))
909 || (identical(value, '=>'))) { 914 || (identical(value, '=>'))) {
910 // A method. 915 // A method.
(...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after
2593 } 2598 }
2594 listener.handleContinueStatement(hasTarget, continueKeyword, token); 2599 listener.handleContinueStatement(hasTarget, continueKeyword, token);
2595 return expectSemicolon(token); 2600 return expectSemicolon(token);
2596 } 2601 }
2597 2602
2598 Token parseEmptyStatement(Token token) { 2603 Token parseEmptyStatement(Token token) {
2599 listener.handleEmptyStatement(token); 2604 listener.handleEmptyStatement(token);
2600 return expectSemicolon(token); 2605 return expectSemicolon(token);
2601 } 2606 }
2602 } 2607 }
OLDNEW
« no previous file with comments | « dart/pkg/compiler/lib/src/scanner/listener.dart ('k') | dart/tests/compiler/dart2js/message_kind_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698