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 library dart_parser; | 5 library dart_parser; |
6 | 6 |
7 import 'package:dart_scanner/src/keyword.dart' show | 7 import 'package:dart_scanner/src/keyword.dart' show |
8 Keyword; | 8 Keyword; |
9 | 9 |
10 import 'package:dart_scanner/src/precedence.dart' show | 10 import 'package:dart_scanner/src/precedence.dart' show |
(...skipping 2754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2765 listener.beginForStatementBody(token); | 2765 listener.beginForStatementBody(token); |
2766 token = parseStatement(token); | 2766 token = parseStatement(token); |
2767 listener.endForStatementBody(token); | 2767 listener.endForStatementBody(token); |
2768 listener.endForStatement(expressionCount, forToken, token); | 2768 listener.endForStatement(expressionCount, forToken, token); |
2769 return token; | 2769 return token; |
2770 } | 2770 } |
2771 | 2771 |
2772 Token parseForInRest(Token awaitToken, Token forToken, Token token) { | 2772 Token parseForInRest(Token awaitToken, Token forToken, Token token) { |
2773 assert(optional('in', token)); | 2773 assert(optional('in', token)); |
2774 Token inKeyword = token; | 2774 Token inKeyword = token; |
2775 token = parseExpression(token.next); | 2775 token = token.next; |
| 2776 listener.beginForInExpression(token); |
| 2777 token = parseExpression(token); |
| 2778 listener.endForInExpression(token); |
2776 token = expect(')', token); | 2779 token = expect(')', token); |
2777 listener.beginForInBody(token); | 2780 listener.beginForInBody(token); |
2778 token = parseStatement(token); | 2781 token = parseStatement(token); |
2779 listener.endForInBody(token); | 2782 listener.endForInBody(token); |
2780 listener.endForIn(awaitToken, forToken, inKeyword, token); | 2783 listener.endForIn(awaitToken, forToken, inKeyword, token); |
2781 return token; | 2784 return token; |
2782 } | 2785 } |
2783 | 2786 |
2784 Token parseWhileStatement(Token token) { | 2787 Token parseWhileStatement(Token token) { |
2785 Token whileToken = token; | 2788 Token whileToken = token; |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3037 } | 3040 } |
3038 listener.handleContinueStatement(hasTarget, continueKeyword, token); | 3041 listener.handleContinueStatement(hasTarget, continueKeyword, token); |
3039 return expectSemicolon(token); | 3042 return expectSemicolon(token); |
3040 } | 3043 } |
3041 | 3044 |
3042 Token parseEmptyStatement(Token token) { | 3045 Token parseEmptyStatement(Token token) { |
3043 listener.handleEmptyStatement(token); | 3046 listener.handleEmptyStatement(token); |
3044 return expectSemicolon(token); | 3047 return expectSemicolon(token); |
3045 } | 3048 } |
3046 } | 3049 } |
OLD | NEW |