OLD | NEW |
(Empty) | |
| 1 <!-- |
| 2 Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 3 for details. All rights reserved. Use of this source code is governed by a |
| 4 BSD-style license that can be found in the LICENSE file. |
| 5 --> |
| 6 |
| 7 # Uses of peek in the parser |
| 8 |
| 9 * In parseTypedef, the parser uses peekAfterNominalType to select between old |
| 10 style and new style. |
| 11 |
| 12 * In parseClassOrNamedMixinApplication, the parser uses peekAfterNominalType |
| 13 to select between named mixin application or class declaration. |
| 14 |
| 15 * In parseClass, the parser uses peekAfterNominalType to select between a |
| 16 mixin application and a regular extends. |
| 17 |
| 18 * In parseType, the parser uses peekAfterIfType to tell the difference |
| 19 between `id` and `id id`. |
| 20 |
| 21 * In parseExpressionStatementOrDeclaration, the parser uses |
| 22 peekIdentifierAfterType to select between an expression statement or a |
| 23 local (function or variable) declaration. |
| 24 |
| 25 * In parseExpressionStatementOrConstDeclaration, the parser uses |
| 26 peekIdentifierAfterOptionalType to select between an expression statement |
| 27 and a const local variable. |
| 28 |
| 29 * In parseSendOrFunctionLiteral, the parser uses peekAfterIfType to select |
| 30 between function expression and send. |
| 31 |
| 32 * In parseVariablesDeclarationOrExpressionOpt, the parser uses |
| 33 peekIdentifierAfterType to select between local variable declarations or an |
| 34 expression. |
| 35 |
| 36 * In parseSwitchCase, the parser uses peekPastLabels to select between case |
| 37 labels and statement labels. |
| 38 |
| 39 * The parser uses isGeneralizedFunctionType in parseType, and findMemberName. |
| 40 |
| 41 * The parser uses findMemberName in parseTopLevelMember, and parseMember. |
OLD | NEW |