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

Unified Diff: pkg/compiler/lib/src/kernel/error.dart

Issue 2265383002: Copy Rasta visitor to dart2js. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: missed some renames Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/kernel/accessors.dart ('k') | pkg/compiler/lib/src/kernel/fall_through_visitor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/error.dart
diff --git a/pkg/compiler/lib/src/kernel/error.dart b/pkg/compiler/lib/src/kernel/error.dart
new file mode 100644
index 0000000000000000000000000000000000000000..464112fae7d9b40bf529f1cc5f18568b8a8f9ac2
--- /dev/null
+++ b/pkg/compiler/lib/src/kernel/error.dart
@@ -0,0 +1,139 @@
+// Copyright (c) 2016, 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.md file.
+
+import 'package:kernel/ast.dart' as ir;
+
+import "../dart_types.dart" show DartType;
+import "../elements/elements.dart" show Element, ErroneousElement;
+import "../resolution/operators.dart"
+ show AssignmentOperator, BinaryOperator, IncDecOperator, UnaryOperator;
+import "../tree/tree.dart"
+ show Expression, NewExpression, Node, NodeList, Operator, Send, SendSet;
+import "../universe/call_structure.dart" show CallStructure;
+import "../universe/selector.dart" show Selector;
+
+abstract class KernelError {
+ // TODO(ahe): Get rid of this method, each error should be handled according
+ // to the semantics required by the Dart Language Specification.
+ ir.Expression handleError(Expression node);
+
+ ir.Expression errorInvalidBinary(Send node, ErroneousElement error,
+ BinaryOperator operator, Node right, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidCompound(Send node, ErroneousElement error,
+ AssignmentOperator operator, Node rhs, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidCompoundIndexSet(Send node, ErroneousElement error,
+ Node index, AssignmentOperator operator, Node rhs, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidEquals(
+ Send node, ErroneousElement error, Node right, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidGet(Send node, ErroneousElement error, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidIndex(
+ Send node, ErroneousElement error, Node index, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidIndexPostfix(Send node, ErroneousElement error,
+ Node index, IncDecOperator operator, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidIndexPrefix(Send node, ErroneousElement error,
+ Node index, IncDecOperator operator, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidIndexSet(
+ Send node, ErroneousElement error, Node index, Node rhs, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidInvoke(Send node, ErroneousElement error,
+ NodeList arguments, Selector selector, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidNotEquals(
+ Send node, ErroneousElement error, Node right, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidPostfix(
+ Send node, ErroneousElement error, IncDecOperator operator, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidPrefix(
+ Send node, ErroneousElement error, IncDecOperator operator, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidSet(
+ Send node, ErroneousElement error, Node rhs, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidSetIfNull(
+ Send node, ErroneousElement error, Node rhs, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidUnary(
+ Send node, UnaryOperator operator, ErroneousElement error, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorNonConstantConstructorInvoke(
+ NewExpression node,
+ Element element,
+ DartType type,
+ NodeList arguments,
+ CallStructure callStructure,
+ _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorUndefinedBinaryExpression(
+ Send node, Node left, Operator operator, Node right, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorUndefinedUnaryExpression(
+ Send node, Operator operator, Node expression, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorUnresolvedFieldInitializer(
+ SendSet node, Element element, Node initializer, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorUnresolvedSuperConstructorInvoke(
+ Send node, Element element, NodeList arguments, Selector selector, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorUnresolvedThisConstructorInvoke(
+ Send node, Element element, NodeList arguments, Selector selector, _) {
+ return handleError(node);
+ }
+
+ ir.Expression errorInvalidIndexSetIfNull(
+ SendSet node, ErroneousElement error, Node index, Node rhs, _) {
+ return handleError(node);
+ }
+}
« no previous file with comments | « pkg/compiler/lib/src/kernel/accessors.dart ('k') | pkg/compiler/lib/src/kernel/fall_through_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698