Commit Graph

324 Commits

Author SHA1 Message Date
Brian Wilkerson 9559e4d444 Initial documentation for a small sample of diagnostics and a script to generate a markdown file containing that documentation
Change-Id: I06602a29c95829b42add1d655ad8d7190ae7100a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105141
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-06-07 22:31:16 +00:00
Dan Rubel 9b22dd8e92 remove hard coded feature index
Change-Id: Ib01f2c9b1516987ec39591a5a320bab81138718d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104786
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-06-05 16:49:24 +00:00
Dan Rubel 9197b34a0e generate analyzer experimental flags
Change-Id: I7dc2be03e7266b6ef0a936269a2dbe584096e3db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104785
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-06-05 14:17:35 +00:00
Konstantin Shcheglov eff6e95385 Improve code generation for variant classes.
Change-Id: Iabaceebdf6efbec80d0026b74f71eac45b742760
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103600
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-24 21:55:16 +00:00
Konstantin Shcheglov 8208e872f8 Refactor summary IDL generator.
I need to make changes to 'collectApiSignature' and 'flushInformative'
to support variants, and we have lots of code around already.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I9ba3b61a22b9e9e2c547e97d5c5adaa07443b24a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103552
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-24 00:30:49 +00:00
Dan Rubel 08832508ec Forward "late" modifier to parser listeners
... and update parser tests to use preNonNullable feature set
to address comments in https://dart-review.googlesource.com/c/sdk/+/99963

Change-Id: I3a3293d65805807b7b95e887f829f3f0080ae3b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99964
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-22 17:20:10 +00:00
Brian Wilkerson af0fa108da Add support for required named parameters
Change-Id: Iebfd8da18c6f2158ed39043ab116e2670a7329c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99717
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-19 19:25:01 +00:00
Mike Fairhurst 5f03a9a07e Fix lints in summary generator: setter types, star-slash docs
Change-Id: I808be84579c775c58b9a4b6d8f4ea10fc6fb29dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98458
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-02 23:48:31 +00:00
Mike Fairhurst 1bbd282d65 Make analyzer/tool/summary/generate.dart take an IDL path
Change-Id: I919b6d92342076ed4420dcc4a5ee94853a35ed41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96240
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-27 16:08:47 +00:00
Brian Wilkerson 5f0de26d48 Clean up the remaining copyright notices
Change-Id: If099be4f71ba551df0dc3d69815ae6a9f55d1eba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97781
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-03-24 20:11:28 +00:00
Paul Berry 31c47567dc Remove AnalysisOptionsForLink and plumb analysis options through linker.
This is a non-breaking change; the only way linking is exposed to
clients is through `SummaryBuilder`, which can get the analysis
options from the context.

Fixes #35747.

Change-Id: I273408f33a881ac32ab248cbc8f3e0644630563b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96829
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-03-13 22:39:53 +00:00
Brian Wilkerson 3712235e0e Remove the task graph and the tool that produces it
Change-Id: I8fa4b1e1646f4072fafa4521648f0ec158e4cebc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95561
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-03-06 13:43:37 +00:00
Konstantin Shcheglov 927e758e96 Stop using package:html in analyzer.
Related to https://github.com/dart-lang/sdk/issues/35802

R=brianwilkerson@google.com

Change-Id: I875a8dc657900137c5a7b59f2820b30a81b23405
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95480
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-05 18:36:41 +00:00
Konstantin Shcheglov 298866ed94 Write / read resolved AST to / from flat buffers.
AstBinaryWriter does not yet support all node types, but a lot of them,
and can successfully write many large Dart files, including itself.
Whether it does it correctly, we cannot say yet, because AstBinaryReader
supports much smaller set of node types. I plan to add all nodes in
following CLs, and run over larger bodies of code.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Iaa2a5c743bd1659ea30c93632028d3a475736bf5
Reviewed-on: https://dart-review.googlesource.com/c/94684
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-01 19:48:02 +00:00
Konstantin Shcheglov 67366ed771 Support for @Variant and @VariantId in generator.
It also includes a sample how it looks in IDL and generated.
I will remove it before landing.

R=paulberry@google.com

Change-Id: I4c60b33e623cf9c55d46a8dd9624377e5a0f5053
Reviewed-on: https://dart-review.googlesource.com/c/94921
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-03-01 02:43:30 +00:00
Dan Rubel 8f12d634fe add postfix "!" non-null assert operator
This updates the parser to support a new "!" postfix assert non-null
operator for NNBD experimentation in analyzer. All other CFE listeners
report an error as they always have... albet a slightly different error.

This also updates reportErrorIfNullableType to report experiment-not-enabled

Change-Id: I7751443fd5a7a2756e823f38c78120e9c2e3e075
Reviewed-on: https://dart-review.googlesource.com/c/94580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-27 19:20:22 +00:00
Konstantin Shcheglov c49537e743 Support for 'double' fields in summaries.
We already can store List<double>, but not `double` itself.

The LinkedConstantValue data structure I'm working on will have a
field of type `double`, so I need to support in in the generator.

R=paulberry@google.com

Change-Id: Ic5aa3a9a7266afabe6c64214fd68097fbebda4e8
Reviewed-on: https://dart-review.googlesource.com/c/93820
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-21 17:06:49 +00:00
Dan Rubel 94d8e730fb Remove parser enableSetLiterals flag
Change-Id: I5e806f2e4a1dd368417802f7b4ff18bc1b4d0250
Reviewed-on: https://dart-review.googlesource.com/c/92843
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-13 22:57:12 +00:00
Kevin Moore ca4978e363 Add pkg:analysis_tool as an SDK-only set of utils
Reduces the API surface of pkg:analyzer that requires pkg:html

Related to https://github.com/dart-lang/sdk/issues/35802

Change-Id: Icd08d76190d6ab77cd180561cdde6df254b22557
Reviewed-on: https://dart-review.googlesource.com/c/91701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2019-01-31 16:52:05 +00:00
Aske Simon Christensen 7475080928 Enable set literals by default in the parser
Change-Id: I854a7d35b05f95d05f0b13f67677d2e512db4eeb
Reviewed-on: https://dart-review.googlesource.com/c/87844
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-01-03 13:45:36 +00:00
danrubel 2a85a3433e Update handleType event to take questionMark token
... which in this CL will always null.
This is the first step when adding NNDB support as outlined in
https://github.com/dart-lang/language/issues/110

Change-Id: If3810bcaf1b73e70924f09d619e2a84e7d5ba8d6
Reviewed-on: https://dart-review.googlesource.com/c/86860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-12-11 16:21:05 +00:00
Dan Rubel 3b65f0ded8 Update the analyzer error code auto generation tool
to display a list of fasta error codes in the parser that are not yet auto generated.

Change-Id: Ic3c82c76de2af01b8a80c670e4783da18704c48e
Reviewed-on: https://dart-review.googlesource.com/c/86461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-12-06 22:21:17 +00:00
Brian Wilkerson 30f1c7cbab Remove references to analyzer/analyzer.dart
Change-Id: I3b3affa957ed8cc8c66f2b32c45b7dcd820f9b1e
Reviewed-on: https://dart-review.googlesource.com/c/82713
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-03 00:19:22 +00:00
Konstantin Shcheglov 5711a1d539 Move implementations of analysis results into src/results.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I7527dfb597ff54802517093b4aa526b14e7b705c
Reviewed-on: https://dart-review.googlesource.com/c/82461
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-11-01 16:11:23 +00:00
Brian Wilkerson 9a69a5c1ee Remove more unnecessary awaits (from analyzer)
Change-Id: I796c8344db1d8bf225ef347cd09e419bb86b3a5f
Reviewed-on: https://dart-review.googlesource.com/c/80400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-10-17 00:29:01 +00:00
Brian Wilkerson 469e1e2e64 Remove unnecessary library directives
Change-Id: I7a157080e4d7fd80d64489a13de4e996b5870930
Reviewed-on: https://dart-review.googlesource.com/c/79474
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-10-13 00:44:04 +00:00
Dan Rubel e4c3fa0a9c Improve recovery when parsing named constructor invocation with invalid type arguments
The parser now generates a ConstructorWithTypeArguments error and a new
handleInvalidTypeArguments event after a begin/endTypeArguments event pair
when those type arguments are in a syntatically invalid location.

For example: `new C.n<int>();` in
```
class C<T> { T f; C.n() {} }
main() { var x = new C.n<int>(); }

Most listeners handle this event by dropping the invalid type arguments,
but AstBuilder now preserves those invalid type arguments in the AST
to support better code quick-fixes/quick-assists/refactoring.

Change-Id: I5b22bd4903cd9ee3645936b9a108598b603cf9ca
Reviewed-on: https://dart-review.googlesource.com/c/79300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-10-11 19:57:22 +00:00
Paul Berry 5ea1d2fb20 Convert idl.dart to triple-slash comment style.
Change-Id: If16a8ea5da0f2cd805d3360e1d70cd19be8066a8
Reviewed-on: https://dart-review.googlesource.com/c/78621
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-08 19:04:02 +00:00
Peter von der Ahé 2a6b566ca2 Move byte store to package:analyzer
Change-Id: I1fc41cc0b2e2848565a5411d0512a4ca086ab659
Reviewed-on: https://dart-review.googlesource.com/c/77761
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
2018-10-04 09:15:54 +00:00
Peter von der Ahé 45cb0815bc Move PerformanceLogger to package:analyzer
Change-Id: I89a60ae9ab639c7907a92976e1eb8007d0f4ee9b
Reviewed-on: https://dart-review.googlesource.com/c/77760
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
2018-10-04 08:44:43 +00:00
Peter von der Ahé eb0ec965e3 Move codegen/tools.dart to package:analyzer
Change-Id: Iab61e0dfcdd0969d1bf35e27c13c336a944d14e6
Reviewed-on: https://dart-review.googlesource.com/c/77780
Commit-Queue: Peter von der Ahé <ahe@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-03 07:41:43 +00:00
danrubel af2fd419fb Update more analyzer error codes to be generated from messages.yaml
Change-Id: I1d8a0db791309ac3551fc1079f91807e6e98dcb2
Reviewed-on: https://dart-review.googlesource.com/75603
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-20 18:10:04 +00:00
danrubel ffa99b9cde Update analyzer error code generation
This fixes error code generation when template contains a backslash

Change-Id: If14cbd07605eab454b00c6970d1e21349ac7a662
Reviewed-on: https://dart-review.googlesource.com/75602
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-20 16:54:58 +00:00
Peter von der Ahé 06792cb91f Remove StackListener.popList
Change-Id: I0391b52a0be34c2cf61ac66e06c565e1f311182a
Reviewed-on: https://dart-review.googlesource.com/75680
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-09-20 14:15:16 +00:00
Devon Carew 7df4900a94 Train the dartanalyzer tool on generating summaries.
Change-Id: Ic887eb2135161b5795a2456d38677f016bbe3643
Reviewed-on: https://dart-review.googlesource.com/75561
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-09-19 17:43:46 +00:00
danrubel 61096acab3 Improve analyzer/fasta error code matching
This addresses a comment in https://dart-review.googlesource.com/c/sdk/+/74600,
updates the "run fasta generate first" exception message,
and converts more Analyzer errors to be auto generated.

Change-Id: I9c98184d1b9fe642dab4d66fbcd961dc27dfa6f9
Reviewed-on: https://dart-review.googlesource.com/74900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-13 21:03:47 +00:00
danrubel 29847b8235 Improve analyer error code template matching
... and auto generate more Analyzer error codes

Change-Id: I8b6097685aad30d59e9513656581782819d5ce2e
Reviewed-on: https://dart-review.googlesource.com/74600
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-12 14:45:00 +00:00
danrubel 25d14df016 Auto generate more ParserErrorCodes
Specifically:
* CONTINUE_OUTSIDE_OF_LOOP
* EXTERNAL_CLASS
* EXTERNAL_ENUM
* STATIC_CONSTRUCTOR

Also:
* Exclude classes that are already auto generated from the list of those
  that could be translated,
* Print summary after checking for manual changes
* Generate error codes before checking if manual changes need to be made

And address comments in
* https://dart-review.googlesource.com/c/sdk/+/74040
* https://dart-review.googlesource.com/c/sdk/+/74240

Change-Id: I573215d58e14749edd02a2416389df3047841002
Reviewed-on: https://dart-review.googlesource.com/74520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-11 21:01:46 +00:00
Paul Berry 80fda41538 During one-phase summary generation, use ASTs for type inference.
There are some test failures introduced by this change.  I believe
they are due to pre-existing bugs, so I'll address them in a follow-up
CL.

Change-Id: I4e00083e53f92d5c8ac53a7a597b89496402aec4
Reviewed-on: https://dart-review.googlesource.com/74487
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-11 20:52:09 +00:00
danrubel c7960df357 Generate analyzer error codes from messages.yaml
With this change, analyzer error codes can be generated from messages.yaml
and those error codes easily translated from the corresponding fasta error.

Each fasta error code in messages.yaml that has an "index:" field
(see prior CL https://dart-review.googlesource.com/c/sdk/+/74040)
now has an Analyzer error code automatically generated
with the information in messages.yaml. In addition
a list of all indexed errors is generated so that a fasta error
code can be quickly translated into an Analyzer error code.

Change-Id: I2d534b7349590ddd54996f564db786c6ffe259b3
Reviewed-on: https://dart-review.googlesource.com/74240
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-10 23:07:19 +00:00
danrubel a9cc6f0f19 Revise with clause event handling
This replaces the begin/endMixinApplication events which were used in both
```
  class A = B with M;
```
and
```
  class A extends B with M { }
``
with different events for each of the above situations.
This change facilitates properly handling class declarations of the form
```
  class A with M { }
```

Removed event:
* beginMixinApplication
* endMixinApplication

Added events:
* handleNamedMixinApplicationWithClause
* handleClassWithClause
* handleClassNoWithClause

Change-Id: Ifa0ecfd7ff8c408087ad78036ad35ba4a00728c6
Reviewed-on: https://dart-review.googlesource.com/73940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-07 19:33:51 +00:00
Paul Berry e72fd5294a Deprecate unneeded fields from PackageBundle.
Change-Id: I071a44499ef20a32388eea7ba04264c8c9b8e1c9
Reviewed-on: https://dart-review.googlesource.com/73285
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-06 14:16:10 +00:00
Peter von der Ahé d1e2ee28f3 Remove addCompileTimeError in favor of addProblem
Replace most methods with names containing CompileTimeError with corresponding
Problem methods.

Also make Severity.error the default severity.

Change-Id: I4f47bf71dec02347407f2ce4ccfdb04730daf51b
Reviewed-on: https://dart-review.googlesource.com/73221
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-09-06 06:56:42 +00:00
Martin Kustermann dcf1f0a145 Revert "Remove addCompileTimeError in favor of addProblem"
This reverts commit f872c17a85.

Reason for revert: After the CQ was green someone else made changes which this CL is not compatible with. The CQ lands if the tests passed
and doesn't rebase before doing so. 


Original change's description:
> Remove addCompileTimeError in favor of addProblem
> 
> Replace most methods with names containing CompileTimeError with corresponding
> Problem methods.
> 
> Also make Severity.error the default severity.
> 
> Change-Id: I85a340168848cd3b4375b3f53cb0361251ed6e5d
> Reviewed-on: https://dart-review.googlesource.com/73100
> Commit-Queue: Peter von der Ahé <ahe@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>

TBR=ahe@google.com,jensj@google.com

Change-Id: I3ea736a9752805adb3bacc8b67e8eb1435c1bf69
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/73181
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-09-05 14:13:48 +00:00
Peter von der Ahé f872c17a85 Remove addCompileTimeError in favor of addProblem
Replace most methods with names containing CompileTimeError with corresponding
Problem methods.

Also make Severity.error the default severity.

Change-Id: I85a340168848cd3b4375b3f53cb0361251ed6e5d
Reviewed-on: https://dart-review.googlesource.com/73100
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-09-05 13:47:23 +00:00
Paul Berry e76d37f307 Remove strong mode booleans related to summary linking.
The analyzer always runs in strong mode now, so these booleans aren't
needed.

Change-Id: Ic16ca9f37f8befead5aee85140fb70395a1d3511
Reviewed-on: https://dart-review.googlesource.com/71622
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-30 13:54:42 +00:00
Peter von der Ahé f5f33776a4 Revert "Store code ranges for formal parameters."
This reverts commit 5b9a42de29.

Change-Id: If6b3edc7194fda050de3b6ffbb0c8124a75509a6
Reviewed-on: https://dart-review.googlesource.com/72100
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-08-30 10:20:18 +00:00
Konstantin Shcheglov 1f52372bfa Remove CFE integration from analyzer, analysis_server, and analyzer_cli.
AnalysisDriverResolutionTest is partially updated, about 30 failing
tests added. I will get back to it in a following CL, it is not
directly CFE integration, but updated understanding how we want to
resolve. For example we don't need types for non-expression identifiers.

Change-Id: I3daddbb6c66ffad7a726f3313a1199fd7387aa04
Reviewed-on: https://dart-review.googlesource.com/71883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-29 13:46:45 +00:00
Janice Collins f40ff153a9 Enable --use-fasta-parser with the analyzer by default.
Based on Devon's change at:

https://dart-review.googlesource.com/c/sdk/+/67090

Change-Id: I80b7943826e248bf37d9bbbb769330d24b0dd6ae
Reviewed-on: https://dart-review.googlesource.com/70160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2018-08-28 19:29:17 +00:00
danrubel cd970b0927 Parser refactoring in preparation for mixin declaration support
This is a bunch of renames and cleanup in preparation for
my next CL with basic mixin declaration support.

Rename listener events:
* handleClassImplements to handleClassOrMixinImplements
* beginClassBody to beginClassOrMixinBody
* endClassBody to endClassOrMixinBody

Rename parser methods:
* parseClassMember to parseClassOrMixinMember
* parseClassBody to parseClassOrMixinBody
* skipClassBody to skipClassOrMixinBody

Also:
* Change test expect from "ClassBody" to "ClassOrMixinBody"
* Rename message ExpectedClassBody to ExpectedClassOrMixinBody
* Update text of MISSING_CLASS_BODY to include mixin
* Rename IdentifierContext.classOrNamedMixinDeclaration to classOrMixinDeclaration
Change-Id: Iaa554cc859e1e665475c0eb544895a311c06395a
Reviewed-on: https://dart-review.googlesource.com/70881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-22 17:57:09 +00:00