blob: 27d4c3146525aad8d327d3b67398ccf2cb5d5e7b [file] [log] [blame]
// 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.
library rasta.error;
import "package:compiler/src/resolution/operators.dart" show
AssignmentOperator,
BinaryOperator,
IncDecOperator,
UnaryOperator;
import "package:compiler/src/universe/call_structure.dart" show
CallStructure;
import "package:compiler/src/elements/elements.dart" show
Element,
ErroneousElement;
import "package:compiler/src/dart_types.dart" show
DartType;
import "package:compiler/src/tree/tree.dart" show
Expression,
NewExpression,
Node,
NodeList,
Operator,
Send,
SendSet;
import "package:compiler/src/universe/selector.dart" show
Selector;
import 'package:kernel/ast.dart' as ir;
abstract class RastaError {
// 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);
}
}