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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2737593002: Add support for parsing #void with Fasta. (Closed)
Patch Set: Created 3 years, 9 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.body_builder; 5 library fasta.body_builder;
6 6
7 import '../parser/parser.dart' show FormalParameterType, optional; 7 import '../parser/parser.dart' show FormalParameterType, optional;
8 8
9 import '../parser/error_kind.dart' show ErrorKind; 9 import '../parser/error_kind.dart' show ErrorKind;
10 10
(...skipping 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2228 return internalError("Unhandled: ${builder.runtimeType}"); 2228 return internalError("Unhandled: ${builder.runtimeType}");
2229 } 2229 }
2230 } 2230 }
2231 2231
2232 @override 2232 @override
2233 void handleOperator(Token token) { 2233 void handleOperator(Token token) {
2234 debugEvent("Operator"); 2234 debugEvent("Operator");
2235 push(new Operator(token.stringValue)..fileOffset = token.charOffset); 2235 push(new Operator(token.stringValue)..fileOffset = token.charOffset);
2236 } 2236 }
2237 2237
2238 @override
2239 void handleSymbolVoid(Token token) {
2240 logEvent("SymbolVoid");
2241 }
2242
2238 dynamic addCompileTimeError(int charOffset, String message) { 2243 dynamic addCompileTimeError(int charOffset, String message) {
2239 return library.addCompileTimeError(charOffset, message, uri); 2244 return library.addCompileTimeError(charOffset, message, uri);
2240 } 2245 }
2241 2246
2242 @override 2247 @override
2243 void handleInvalidFunctionBody(Token token) { 2248 void handleInvalidFunctionBody(Token token) {
2244 if (member.isNative) { 2249 if (member.isNative) {
2245 push(NullValue.FunctionBody); 2250 push(NullValue.FunctionBody);
2246 } else { 2251 } else {
2247 push(new Block(<Statement>[new InvalidStatement()])); 2252 push(new Block(<Statement>[new InvalidStatement()]));
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
2682 } else if (node is TypeDeclarationBuilder) { 2687 } else if (node is TypeDeclarationBuilder) {
2683 return node.name; 2688 return node.name;
2684 } else if (node is PrefixBuilder) { 2689 } else if (node is PrefixBuilder) {
2685 return node.name; 2690 return node.name;
2686 } else if (node is ThisPropertyAccessor) { 2691 } else if (node is ThisPropertyAccessor) {
2687 return node.name.name; 2692 return node.name.name;
2688 } else { 2693 } else {
2689 return internalError("Unhandled: ${node.runtimeType}"); 2694 return internalError("Unhandled: ${node.runtimeType}");
2690 } 2695 }
2691 } 2696 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart ('k') | pkg/front_end/lib/src/fasta/parser/listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698