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

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

Issue 10911206: Remove support for operator negate and replace occurrences with unary (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
« no previous file with comments | « lib/compiler/implementation/lib/interceptors.dart ('k') | lib/core/double.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 5 /**
6 * An event generating parser of Dart programs. This parser expects 6 * An event generating parser of Dart programs. This parser expects
7 * all tokens in a linked list (aka a token stream). 7 * all tokens in a linked list (aka a token stream).
8 * 8 *
9 * The class [Scanner] is used to generate a token stream. See the 9 * The class [Scanner] is used to generate a token stream. See the
10 * file scanner.dart. 10 * file scanner.dart.
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 token = parseIdentifier(token.next); 793 token = parseIdentifier(token.next);
794 } 794 }
795 token = parseFormalParameters(token); 795 token = parseFormalParameters(token);
796 token = parseFunctionBody(token, false); 796 token = parseFunctionBody(token, false);
797 listener.endFactoryMethod(start, period, token); 797 listener.endFactoryMethod(start, period, token);
798 return token.next; 798 return token.next;
799 } 799 }
800 800
801 Token parseOperatorName(Token token) { 801 Token parseOperatorName(Token token) {
802 assert(optional('operator', token)); 802 assert(optional('operator', token));
803 if (isUserDefinableOperator(token.next.stringValue) 803 if (isUserDefinableOperator(token.next.stringValue)) {
804 // TODO(ahe): Remove negate.
805 || token.next.value == const SourceString("negate")) {
806 Token operator = token; 804 Token operator = token;
807 token = token.next; 805 token = token.next;
808 listener.handleOperatorName(operator, token); 806 listener.handleOperatorName(operator, token);
809 return token.next; 807 return token.next;
810 } else { 808 } else {
811 return parseIdentifier(token); 809 return parseIdentifier(token);
812 } 810 }
813 } 811 }
814 812
815 Token parseFunction(Token token, Token getOrSet) { 813 Token parseFunction(Token token, Token getOrSet) {
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1926 } 1924 }
1927 listener.handleContinueStatement(hasTarget, continueKeyword, token); 1925 listener.handleContinueStatement(hasTarget, continueKeyword, token);
1928 return expectSemicolon(token); 1926 return expectSemicolon(token);
1929 } 1927 }
1930 1928
1931 Token parseEmptyStatement(Token token) { 1929 Token parseEmptyStatement(Token token) {
1932 listener.handleEmptyStatement(token); 1930 listener.handleEmptyStatement(token);
1933 return expectSemicolon(token); 1931 return expectSemicolon(token);
1934 } 1932 }
1935 } 1933 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/lib/interceptors.dart ('k') | lib/core/double.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698