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

Side by Side Diff: pkg/analyzer/lib/src/summary/fasta/stack_listener.dart

Issue 2892173002: Update Listener implementations. (Closed)
Patch Set: Created 3 years, 7 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 | pkg/analyzer/lib/src/summary/fasta/summary_builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 library fe.stack_listener; 5 library fe.stack_listener;
6 6
7 import 'dart:collection' show Queue; 7 import 'dart:collection' show Queue;
8 8
9 import 'package:front_end/src/fasta/parser/identifier_context.dart'; 9 import 'package:front_end/src/fasta/parser.dart'
10 import 'package:front_end/src/fasta/parser/listener.dart'; 10 show IdentifierContext, Listener, MemberKind;
11 import 'package:front_end/src/fasta/scanner/token.dart'; 11
12 import 'package:front_end/src/scanner/token.dart' show Token; 12 import 'package:front_end/src/fasta/scanner.dart' show BeginGroupToken, Token;
13 13
14 enum NullValue { 14 enum NullValue {
15 Arguments, 15 Arguments,
16 Combinators, 16 Combinators,
17 FormalParameters, 17 FormalParameters,
18 FunctionBody, 18 FunctionBody,
19 IdentifierList, 19 IdentifierList,
20 Initializers, 20 Initializers,
21 Metadata, 21 Metadata,
22 Modifiers, 22 Modifiers,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 push(token.lexeme); 59 push(token.lexeme);
60 } 60 }
61 61
62 void handleNoArguments(Token token) { 62 void handleNoArguments(Token token) {
63 debugEvent("NoArguments"); 63 debugEvent("NoArguments");
64 var typeArguments = pop(); 64 var typeArguments = pop();
65 assert(typeArguments == null); 65 assert(typeArguments == null);
66 push(NullValue.Arguments); 66 push(NullValue.Arguments);
67 } 67 }
68 68
69 void handleNoFormalParameters(Token token) { 69 void handleNoFormalParameters(Token token, MemberKind kind) {
70 debugEvent("NoFormalParameters"); 70 debugEvent("NoFormalParameters");
71 push(NullValue.FormalParameters); 71 push(NullValue.FormalParameters);
72 } 72 }
73 73
74 void handleNoFunctionBody(Token token) { 74 void handleNoFunctionBody(Token token) {
75 debugEvent("NoFunctionBody"); 75 debugEvent("NoFunctionBody");
76 push(NullValue.FunctionBody); 76 push(NullValue.FunctionBody);
77 } 77 }
78 78
79 void handleNoInitializers() { 79 void handleNoInitializers() {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 list[i] = pop(); 129 list[i] = pop();
130 } 130 }
131 return list; 131 return list;
132 } 132 }
133 133
134 void push(Object node) { 134 void push(Object node) {
135 if (node == null) throw "null not allowed."; 135 if (node == null) throw "null not allowed.";
136 stack.addLast(node); 136 stack.addLast(node);
137 } 137 }
138 } 138 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/fasta/summary_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698