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

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

Issue 1151163004: Implementation of null-aware operators. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « pkg/compiler/lib/src/scanner/listener.dart ('k') | pkg/compiler/lib/src/scanner/scanner.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 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 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1777 if (!allowCascades) { 1777 if (!allowCascades) {
1778 return token; 1778 return token;
1779 } 1779 }
1780 token = parseCascadeExpression(token); 1780 token = parseCascadeExpression(token);
1781 } else if (identical(tokenLevel, ASSIGNMENT_PRECEDENCE)) { 1781 } else if (identical(tokenLevel, ASSIGNMENT_PRECEDENCE)) {
1782 // Right associative, so we recurse at the same precedence 1782 // Right associative, so we recurse at the same precedence
1783 // level. 1783 // level.
1784 token = parsePrecedenceExpression(token.next, level, allowCascades); 1784 token = parsePrecedenceExpression(token.next, level, allowCascades);
1785 listener.handleAssignmentExpression(operator); 1785 listener.handleAssignmentExpression(operator);
1786 } else if (identical(tokenLevel, POSTFIX_PRECEDENCE)) { 1786 } else if (identical(tokenLevel, POSTFIX_PRECEDENCE)) {
1787 if (identical(info, PERIOD_INFO)) { 1787 if (identical(info, PERIOD_INFO) ||
1788 identical(info, QUESTION_PERIOD_INFO)) {
1788 // Left associative, so we recurse at the next higher 1789 // Left associative, so we recurse at the next higher
1789 // precedence level. However, POSTFIX_PRECEDENCE is the 1790 // precedence level. However, POSTFIX_PRECEDENCE is the
1790 // highest level, so we just call parseUnaryExpression 1791 // highest level, so we just call parseUnaryExpression
1791 // directly. 1792 // directly.
1792 token = parseUnaryExpression(token.next, allowCascades); 1793 token = parseUnaryExpression(token.next, allowCascades);
1793 listener.handleBinaryExpression(operator); 1794 listener.handleBinaryExpression(operator);
1794 } else if ((identical(info, OPEN_PAREN_INFO)) || 1795 } else if ((identical(info, OPEN_PAREN_INFO)) ||
1795 (identical(info, OPEN_SQUARE_BRACKET_INFO))) { 1796 (identical(info, OPEN_SQUARE_BRACKET_INFO))) {
1796 token = parseArgumentOrIndexStar(token); 1797 token = parseArgumentOrIndexStar(token);
1797 } else if ((identical(info, PLUS_PLUS_INFO)) || 1798 } else if ((identical(info, PLUS_PLUS_INFO)) ||
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
2658 } 2659 }
2659 listener.handleContinueStatement(hasTarget, continueKeyword, token); 2660 listener.handleContinueStatement(hasTarget, continueKeyword, token);
2660 return expectSemicolon(token); 2661 return expectSemicolon(token);
2661 } 2662 }
2662 2663
2663 Token parseEmptyStatement(Token token) { 2664 Token parseEmptyStatement(Token token) {
2664 listener.handleEmptyStatement(token); 2665 listener.handleEmptyStatement(token);
2665 return expectSemicolon(token); 2666 return expectSemicolon(token);
2666 } 2667 }
2667 } 2668 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/scanner/listener.dart ('k') | pkg/compiler/lib/src/scanner/scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698