Chromium Code Reviews| 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 483 listener.handleModifier(token); | 483 listener.handleModifier(token); |
| 484 modifierCount++; | 484 modifierCount++; |
| 485 token = token.next; | 485 token = token.next; |
| 486 } | 486 } |
| 487 listener.handleModifiers(modifierCount); | 487 listener.handleModifiers(modifierCount); |
| 488 token = parseIdentifier(token.next); | 488 token = parseIdentifier(token.next); |
| 489 token = parseTypeVariablesOpt(token); | 489 token = parseTypeVariablesOpt(token); |
| 490 Token extendsKeyword; | 490 Token extendsKeyword; |
| 491 if (optional('extends', token)) { | 491 if (optional('extends', token)) { |
| 492 extendsKeyword = token; | 492 extendsKeyword = token; |
| 493 if (optional('with', token.next.next)) { | 493 if (optional('with', peekAfterType(token.next))) { |
| 494 token = parseMixinApplication(token.next); | 494 token = parseMixinApplication(token.next); |
|
karlklose
2013/01/25 10:12:47
Remove whitespace.
| |
| 495 } else { | 495 } else { |
| 496 token = parseType(token.next); | 496 token = parseType(token.next); |
| 497 } | 497 } |
| 498 } else { | 498 } else { |
| 499 extendsKeyword = null; | 499 extendsKeyword = null; |
| 500 listener.handleNoType(token); | 500 listener.handleNoType(token); |
| 501 } | 501 } |
| 502 Token implementsKeyword; | 502 Token implementsKeyword; |
| 503 int interfacesCount = 0; | 503 int interfacesCount = 0; |
| 504 if (optional('implements', token)) { | 504 if (optional('implements', token)) { |
| (...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2197 } | 2197 } |
| 2198 listener.handleContinueStatement(hasTarget, continueKeyword, token); | 2198 listener.handleContinueStatement(hasTarget, continueKeyword, token); |
| 2199 return expectSemicolon(token); | 2199 return expectSemicolon(token); |
| 2200 } | 2200 } |
| 2201 | 2201 |
| 2202 Token parseEmptyStatement(Token token) { | 2202 Token parseEmptyStatement(Token token) { |
| 2203 listener.handleEmptyStatement(token); | 2203 listener.handleEmptyStatement(token); |
| 2204 return expectSemicolon(token); | 2204 return expectSemicolon(token); |
| 2205 } | 2205 } |
| 2206 } | 2206 } |
| OLD | NEW |