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

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

Issue 2950393003: Document where the parser uses peeking. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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.
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698