| 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 part of scanner; | 5 part of scanner; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * An event generating parser of Dart programs. This parser expects | 8 * An event generating parser of Dart programs. This parser expects |
| 9 * all tokens in a linked list (aka a token stream). | 9 * all tokens in a linked list (aka a token stream). |
| 10 * | 10 * |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 if (optional('.', token.next)) { | 693 if (optional('.', token.next)) { |
| 694 // type '.' ... | 694 // type '.' ... |
| 695 if (token.next.next.isIdentifier()) { | 695 if (token.next.next.isIdentifier()) { |
| 696 // type '.' identifier | 696 // type '.' identifier |
| 697 token = token.next.next; | 697 token = token.next.next; |
| 698 } | 698 } |
| 699 } | 699 } |
| 700 if (optional('<', token.next)) { | 700 if (optional('<', token.next)) { |
| 701 if (token.next is BeginGroupToken) { | 701 if (token.next is BeginGroupToken) { |
| 702 BeginGroupToken beginGroup = token.next; | 702 BeginGroupToken beginGroup = token.next; |
| 703 if (beginGroup.endGroup == null) { |
| 704 listener.unmatched(beginGroup); |
| 705 } |
| 703 token = beginGroup.endGroup; | 706 token = beginGroup.endGroup; |
| 704 } | 707 } |
| 705 } | 708 } |
| 706 } | 709 } |
| 707 token = token.next; | 710 token = token.next; |
| 708 } | 711 } |
| 709 return listener.expectedDeclaration(start); | 712 return listener.expectedDeclaration(start); |
| 710 } | 713 } |
| 711 | 714 |
| 712 Token parseVariableInitializerOpt(Token token) { | 715 Token parseVariableInitializerOpt(Token token) { |
| (...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2195 } | 2198 } |
| 2196 listener.handleContinueStatement(hasTarget, continueKeyword, token); | 2199 listener.handleContinueStatement(hasTarget, continueKeyword, token); |
| 2197 return expectSemicolon(token); | 2200 return expectSemicolon(token); |
| 2198 } | 2201 } |
| 2199 | 2202 |
| 2200 Token parseEmptyStatement(Token token) { | 2203 Token parseEmptyStatement(Token token) { |
| 2201 listener.handleEmptyStatement(token); | 2204 listener.handleEmptyStatement(token); |
| 2202 return expectSemicolon(token); | 2205 return expectSemicolon(token); |
| 2203 } | 2206 } |
| 2204 } | 2207 } |
| OLD | NEW |