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

Unified Diff: pkg/front_end/lib/src/fasta/builder/function_type_builder.dart

Issue 2730093002: Avoid crashing on function syntax. (Closed)
Patch Set: Update status. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/builder/function_type_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/builder/function_type_builder.dart b/pkg/front_end/lib/src/fasta/builder/function_type_builder.dart
new file mode 100644
index 0000000000000000000000000000000000000000..4b66b4c515c79d3f695297f6da6d050a70cc37ac
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/builder/function_type_builder.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library fasta.function_type_builder;
+
+import 'builder.dart' show LibraryBuilder, TypeBuilder, TypeDeclarationBuilder;
+
+import 'scope.dart' show Scope;
+
+abstract class FunctionTypeBuilder extends TypeBuilder {
+ final TypeBuilder returnType;
+ final List typeVariables;
+ final List formals;
+
+ FunctionTypeBuilder(int charOffset, Uri fileUri, this.returnType,
+ this.typeVariables, this.formals)
+ : super(charOffset, fileUri);
+
+ @override
+ void resolveIn(Scope scope) {}
+
+ @override
+ void bind(TypeDeclarationBuilder builder) {}
+
+ @override
+ String get name => null;
+
+ @override
+ String get debugName => "Function";
+
+ @override
+ StringBuffer printOn(StringBuffer buffer) {
+ buffer.write(typeVariables);
+ buffer.write(formals);
+ buffer.write(" -> ");
+ buffer.write(returnType);
+ return buffer;
+ }
+
+ @override
+ build(LibraryBuilder library) {}
+}
« no previous file with comments | « pkg/front_end/lib/src/fasta/builder/builder.dart ('k') | pkg/front_end/lib/src/fasta/builder/named_type_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698