dart-sdk/pkg/front_end
Jens Johansen f72603ab45 [fasta] Allow --dump-ir to print error program
For instance, with the program snippet from issue #31409 one would not
get any other output than the errors, and one would have to explicitly
dump the dill file afterwards to see what was actually generated.

This CL changes this, so the error-library is also printed (in addition
to the, at least in the case of issue #31409, empty list) as in

```
$ pkg/front_end/tool/fasta compile tmp.dart --dump-ir

tmp.dart:2:4: Error: Expected a function body or '=>'.
Try adding {}.
V();
   ^
tmp.dart:3:5: Error: Duplicated definition of 'V'.
var V;
    ^
tmp.dart: Error: Duplicated name: 'V'.
tmp.dart:2:1: Error: Duplicated name: V
V();
^
library;
import self as self;

static method #main() → dynamic {
  throw "tmp.dart:2:1: Error: Duplicated name: V\nV();\n^";
}
```

Bug:
Change-Id: I8739be43137f098e6dc50df27f4d1d8628bea469
Reviewed-on: https://dart-review.googlesource.com/32602
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-01-09 13:11:58 +00:00
..
benchmarks/ikg Smaller changes to incremental_perf.dart, this is preparation for the flutter IKG perf benchmark 2017-11-17 10:34:12 +00:00
example/incremental_reload [CFE] Move front-end API under src/ 2017-12-01 08:42:16 +00:00
lib/src [fasta] Allow --dump-ir to print error program 2018-01-09 13:11:58 +00:00
test Use --reify-generic-functions when running strong-mode tests with fasta 2018-01-05 16:15:48 +00:00
testcases Fix for explicit 'call' invocation and property get. 2018-01-09 00:18:56 +00:00
tool Reland "Treat most warnings as errors in strong mode." 2018-01-08 09:20:02 +00:00
analysis_options.yaml Fix dynamic as bottom uses in front end and dart2js. 2017-10-30 19:54:26 +00:00
error_recovery.yaml Add error_recovery.yaml: a place to add scenarios we explicitly want to model in 2017-08-10 11:52:48 -07:00
LICENSE Create a README and pubspec for the front_end package. 2016-10-19 12:14:38 -07:00
messages.yaml Reland "Treat most warnings as errors in strong mode." 2018-01-08 09:20:02 +00:00
pubspec.yaml Add unstable API for bazel summary worker and move the actual worker out of package:front-end 2017-12-21 19:09:11 +00:00
README.md Prepare package:analyzer 0.30.0. 2017-05-03 14:34:55 -07:00
testing.json Add tests of instantiate to bound in fasta 2018-01-08 08:35:22 +00:00

Front end for Dart

This package provides a low-level API for use by compiler back ends that wish to implement the Dart language. It is intended for eventual use by dev_compiler, dart2js, and the Dart VM. In addition, it will share implementation details with the analyzer package--this will be accomplished by having the analyzer package import (and re-export) parts of this package's private implementation.

End-users should use the [dartanalyzer][analyzercli] command-line tool to analyze their Dart code.

Integrators that want to write tools that analyze Dart code should use the [analyzer] package.

Note: The APIs in this package are in an early state; developers should be careful about depending on this package.