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

Side by Side Diff: pkg/front_end/lib/src/fasta/parser/parser.md

Issue 2957503003: Don't peek when parsing mixin applications. (Closed)
Patch Set: Created 3 years, 6 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
OLDNEW
1 <!-- 1 <!--
2 Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 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 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. 4 BSD-style license that can be found in the LICENSE file.
5 --> 5 -->
6 6
7 # Uses of peek in the parser 7 # Uses of peek in the parser
8 8
9 * In parseClass, the parser uses peekAfterNominalType to select between a
10 mixin application and a regular extends.
11
12 * In parseType, the parser uses peekAfterIfType to tell the difference 9 * In parseType, the parser uses peekAfterIfType to tell the difference
13 between `id` and `id id`. 10 between `id` and `id id`.
14 11
15 * In parseExpressionStatementOrDeclaration, the parser uses 12 * In parseExpressionStatementOrDeclaration, the parser uses
16 peekIdentifierAfterType to select between an expression statement or a 13 peekIdentifierAfterType to select between an expression statement or a
17 local (function or variable) declaration. 14 local (function or variable) declaration.
18 15
19 * In parseExpressionStatementOrConstDeclaration, the parser uses 16 * In parseExpressionStatementOrConstDeclaration, the parser uses
20 peekIdentifierAfterOptionalType to select between an expression statement 17 peekIdentifierAfterOptionalType to select between an expression statement
21 and a const local variable. 18 and a const local variable.
22 19
23 * In parseSendOrFunctionLiteral, the parser uses peekAfterIfType to select 20 * In parseSendOrFunctionLiteral, the parser uses peekAfterIfType to select
24 between function expression and send. 21 between function expression and send.
25 22
26 * In parseVariablesDeclarationOrExpressionOpt, the parser uses 23 * In parseVariablesDeclarationOrExpressionOpt, the parser uses
27 peekIdentifierAfterType to select between local variable declarations or an 24 peekIdentifierAfterType to select between local variable declarations or an
28 expression. 25 expression.
29 26
30 * In parseSwitchCase, the parser uses peekPastLabels to select between case 27 * In parseSwitchCase, the parser uses peekPastLabels to select between case
31 labels and statement labels. 28 labels and statement labels.
32 29
33 * The parser uses isGeneralizedFunctionType in parseType, and findMemberName. 30 * The parser uses isGeneralizedFunctionType in parseType, and findMemberName.
34 31
35 * The parser uses findMemberName in parseTopLevelMember, and parseMember. 32 * The parser uses findMemberName in parseTopLevelMember, and parseMember.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698