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

Side by Side Diff: pkg/front_end/lib/src/fasta/source/outline_builder.dart

Issue 2985703002: new handleInvalidTopLevelDeclaration event in fasta parser (Closed)
Patch Set: rebase and address comment Created 3 years, 4 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 // 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 fasta.outline_builder; 5 library fasta.outline_builder;
6 6
7 import 'package:kernel/ast.dart' show ProcedureKind; 7 import 'package:kernel/ast.dart' show ProcedureKind;
8 8
9 import '../../scanner/token.dart' show Token; 9 import '../../scanner/token.dart' show Token;
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 } 118 }
119 119
120 @override 120 @override
121 void endMetadataStar(int count, bool forParameter) { 121 void endMetadataStar(int count, bool forParameter) {
122 debugEvent("MetadataStar"); 122 debugEvent("MetadataStar");
123 push(popList(count) ?? NullValue.Metadata); 123 push(popList(count) ?? NullValue.Metadata);
124 } 124 }
125 125
126 @override 126 @override
127 void handleInvalidTopLevelDeclaration(Token endToken) {
128 debugEvent("InvalidTopLevelDeclaration");
129 pop(); // metadata star
130 }
131
132 @override
127 void endHide(Token hideKeyword) { 133 void endHide(Token hideKeyword) {
128 debugEvent("Hide"); 134 debugEvent("Hide");
129 List<String> names = pop(); 135 List<String> names = pop();
130 push(new Combinator.hide(names, hideKeyword.charOffset, library.fileUri)); 136 push(new Combinator.hide(names, hideKeyword.charOffset, library.fileUri));
131 } 137 }
132 138
133 @override 139 @override
134 void endShow(Token showKeyword) { 140 void endShow(Token showKeyword) {
135 debugEvent("Show"); 141 debugEvent("Show");
136 List<String> names = pop(); 142 List<String> names = pop();
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 docToken = docToken.next; 964 docToken = docToken.next;
959 } 965 }
960 return buffer.toString(); 966 return buffer.toString();
961 } 967 }
962 968
963 @override 969 @override
964 void debugEvent(String name) { 970 void debugEvent(String name) {
965 // printEvent(name); 971 // printEvent(name);
966 } 972 }
967 } 973 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/diet_listener.dart ('k') | pkg/front_end/lib/src/fasta/source/stack_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698