| Index: lib/src/info.dart
|
| diff --git a/lib/src/info.dart b/lib/src/info.dart
|
| index 3d7c8cfad95688505f9fa025ce66b2ec42952fa0..80413fdad92524f3a2bd3aab992a2d3b0afc0139 100644
|
| --- a/lib/src/info.dart
|
| +++ b/lib/src/info.dart
|
| @@ -17,6 +17,8 @@ import 'package:logging/logging.dart' show Level;
|
| import 'package:dev_compiler/src/checker/rules.dart';
|
| import 'package:dev_compiler/src/utils.dart' as utils;
|
|
|
| +import 'report.dart' show Message;
|
| +
|
| /// Represents a summary of the results collected by running the program
|
| /// checker.
|
| class CheckerResults {
|
| @@ -114,22 +116,23 @@ class CoercionError extends Coercion {
|
| CoercionError() : super(null, null);
|
| }
|
|
|
| -abstract class StaticInfo {
|
| +abstract class StaticInfo implements Message {
|
| /// AST Node this info is attached to.
|
| // TODO(jmesserly): this is somewhat redundant with SemanticNode.
|
| AstNode get node;
|
|
|
| - /// Log level for error messages. This is a placeholder
|
| - /// for severity.
|
| - Level get level;
|
| + @override
|
| + int get begin => node is AnnotatedNode
|
| + ? (node as AnnotatedNode).firstTokenAfterCommentAndMetadata.offset
|
| + : node.offset;
|
|
|
| - /// Description / error message.
|
| - String get message;
|
| + @override
|
| + int get end => node.end;
|
| }
|
|
|
| /// Implicitly injected expression conversion.
|
| // TODO(jmesserly): rename to have Expression suffix?
|
| -abstract class Conversion extends Expression implements StaticInfo {
|
| +abstract class Conversion extends Expression with StaticInfo {
|
| final TypeRules rules;
|
|
|
| // TODO(jmesserly): should probably rename this "operand" for consistency with
|
|
|