Commit Graph

482 Commits

Author SHA1 Message Date
Paul Berry 7d277c4a32 Introduce methods and classes to replace "2" variants left over from "UI as code" work.
The AST refactor for "UI as code" left behind a few things whose names
ended in "2".  This CL deprecates those things and creates
replacements that don't end in "2", so that we keep the API clean.  In
a future breaking change release of the analyzer we'll remove the
deprecated things.

The following methods and classes are added:
- ForStatement and ForStatementImpl
- ListLiteral.elements
- SetOrMapLiteral.elements
- AstVisitor.visitForStatement
- AstFactory.forStatement
- NodeLintRegistry.addForStatement

The following methods and classes are deprecated:
- ForStatement2 and ForStatement2Impl
- ListLiteral.elements2
- SetOrMapLiteral.elements2
- AstVisitor.visitForStatement2
- AstFactory.forStatement2
- NodeLintRegistry.addForStatement2

In a similar way to how we did the previous stage of AST migration,
the existing visitors have been modified so that the default
implementation of visitForStatement2 redirects to visitForStatement;
this allows clients to change their overrides of visitForStatement2 to
override visitForStatement instead.  Once all clients have been
migrated we will be able to delete the visitForStatement2 method.

Change-Id: Ife5949071fe4cb50791cd4f2f4b99a1bfaad54c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97360
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-03-20 22:58:55 +00:00
Paul Berry c79927fdd7 Change type of Expression.precedence to the Precedence class.
This is a breaking change, however clients that switched to using
`Expression.precedence2` (which was introduced in analyzer release
0.35.3) are unaffected.  After this change, clients may switch back to
using `Expression.precedence`.

Change-Id: Ia952c44001bdea91d32082add0be7e10c9936181
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-03-20 22:13:15 +00:00
Paul Berry b18b626d78 Remove deprecated AST structures related to the "UI as code" feature.
This constitutes a breaking change, so the analyzer major version
number is bumped to 36.  Clients that have stopped using the removed
data structures (and the methods associated with them) should be
unaffected.

Change-Id: Iab68ecf8d10a13013ebb6b1198c54755225d0eb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95704
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-20 03:36:42 +00:00
Brian Wilkerson b5528fa84d Improve the docs for isSet and isMap in SetOrMapLiteral
Change-Id: I7b6769cdb89e728c7678361855481fd4ab307d5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96827
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-03-13 20:54:01 +00:00
Brian Wilkerson 6e359857e4 Move ConstantEvaluationTarget out of the task model
Change-Id: I961f033e871a05ba38383b79865ed2795a1d452f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95984
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-03-08 16:03:03 +00:00
Paul Berry 0124541d5f Deprecate AST data structures that will be obseleted by the "UI as code" feature
- ForStatement and ForEachStatement will be replaced by ForStatement2.
- MapLiteral and SetLiteral will be replaced by SetOrMapLiteral.

To ease the transition, the old classes are subtypes of the new
classes, so even though the analyzer still creates instances of the
old classes, clients should be able to start referring to the new
classes in their code.  The analyzer will stop creating instances of
MapLiteral and SetLiteral when the experimental flags for the "UI as
code" feature are turned on, and will stop creating instances of all 4
classes when we bump the major version number (which should happen
sometime in March).

For visitors, we've updated the base classes with the following default methods:
  visitForStatement(node) => visitForStatement2(node);
  visitForEachStatement(node) => visitForStatement2(node);
  visitMapLiteral(node) => visitSetOrMapLiteral(node);
  visitSetLiteral(node) => visitSetOrMapLiteral(node);

So clients should be able to start revising their visitors to override
the new visit methods rather than the old ones, and the visit methods
in the base classes will automatically forward to the new visit
methods.

Change-Id: Ifde3a2aa3c8c49ce4e65dfaabf086db4dabb73f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95665
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-03-06 21:43:50 +00:00
Paul Berry 644026da51 Eliminate uses of old AST node types from AstFactory
Change-Id: I6bfb37b9a1e1477a27e5a60ba6120876ae5ecb9d
Reviewed-on: https://dart-review.googlesource.com/c/94804
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-03-01 18:03:25 +00:00
Paul Berry c2e48195f0 Rename UiAsCodeVisitorMixin to UIAsCodeVisitorMixin
To conform to Dart style rules

Change-Id: I1cc7ef76d0d723725f6d0393ca6e2b7538fc2f3e
Reviewed-on: https://dart-review.googlesource.com/c/94900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-02-28 21:42:09 +00:00
Paul Berry 4cd309316b Prepare visitors for UI-as-code rework.
The following AST node types will be deprecated soon:
- ForEachStatement (use ForStatement2 instead)
- ForStatement (use ForStatement2 instead)
- MapLiteral (use SetOrMapLiteral instead)
- SetLiteral (use SetOrMapLiteral instead)

To allow clients to stop implementing visit methods that accept these
AST node types, we add a default implementation of each corresponding
visit method to each of the analyzer's visitor base classes; these
default implementations forwards to the new visit method.

This frees clients to begin migrating their visitors to the new AST
node types.

Future CLs will deprecate, and later remove, the old AST node types.

Change-Id: I8d86b64ef0b131012f0a9959aa8940e0d8561485
Reviewed-on: https://dart-review.googlesource.com/c/94301
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
2019-02-26 21:49:24 +00:00
Paul Berry cfac26e184 Deprecate Expression.precedence.
In analyzer version 0.36.0, its return type will be changed to
`Precedence`.  Clients that wish to prepare for the change can switch
to `Expression.precedence2`.

Change-Id: I9c82fba557c5e3870c498afdb0bb5de22ba38240
Reviewed-on: https://dart-review.googlesource.com/c/94353
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-26 21:07:44 +00:00
Paul Berry 3dfa610694 Work around #35993 by allowing ints to be assigned to doubles in constants.
Change-Id: If206149593849ce8588975ac8ed4d1cd78ae70e8
Reviewed-on: https://dart-review.googlesource.com/c/94123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-02-25 15:28:34 +00:00
Paul Berry 5aba7b7b85 Normalize expression precedence between analyzer and front_end.
Several places in the analyzer and the analysis server were using
hardcoded integers to represent precedence, rather than referring to
constants defined in the front_end.  This led to some subtle
off-by-one errors, because the old analyzer convention (prior to
integration with the front_end parser) used 0 to represent the lowest
precedence of an expression (and -1000 to represent the precedence of
non-expressions), whereas the front_end convention is for 1 to
represent the lowest precedence of an expression.  As far as I can
tell there was no user visible impact, but it made it very difficult
to reason about operator precedence.

This CL updates the analyzer and the analysis server so that they
don't hardcode any precedence values; instead they refer to named
constants in the front end.

In a follow-up CL I'll reduce some hardcoded precedence numbers in the
front end itself.

Change-Id: Id3869afeb83042cc7d6630a0a4a0533a07058736
Reviewed-on: https://dart-review.googlesource.com/c/93964
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-22 13:39:46 +00:00
Brian Wilkerson 122aa43ef6 Convert ListLiteral and remove uses of ListLiteral2
Change-Id: I6c6f60ae969deb798cdbc8572341f2a51256b194
Reviewed-on: https://dart-review.googlesource.com/c/93341
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-15 16:17:28 +00:00
Brian Wilkerson 30f9f5b1c7 Add SetOrMapLiteral to support the code-as-ui features
Change-Id: I6d3023855fea6da859af0815bfae6857f1546cb9
Reviewed-on: https://dart-review.googlesource.com/c/93062
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-02-13 20:14:24 +00:00
Brian Wilkerson 5fe0202b0b Unify MapElement and CollectionElement
Change-Id: Ia1be138d656d07bdf4c11640b79044abbc798986
Reviewed-on: https://dart-review.googlesource.com/c/92762
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-02-12 17:10:58 +00:00
Brian Wilkerson a5c53b03cd Convert more doc comments from block to line style
Change-Id: I62fe9b25fb91518bd054c41688bdff0effbe830b
Reviewed-on: https://dart-review.googlesource.com/c/92540
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-02-11 06:35:32 +00:00
Brian Wilkerson 00ee3159e5 Convert interfaces to use implements not extends
Change-Id: Ia49fb8aefe7eb096ab8c8365a77337155c3c473a
Reviewed-on: https://dart-review.googlesource.com/c/92535
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-02-10 19:31:27 +00:00
Paul Berry ec13e61df3 Move question getter from GenericFunctionType and NamedType to their common base class.
Change-Id: I5f9494a0c354f5b1fc2ec08c7e748dd795671752
Reviewed-on: https://dart-review.googlesource.com/c/91680
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-30 14:59:24 +00:00
Dan Rubel 213cfdc85e Update AstBuilder to generate new for statement structure
... if control flow or spread collection entries are enabled.

Change-Id: I8718c1f7a649b7a2a7c9e376a6bf67c1df0542cf
Reviewed-on: https://dart-review.googlesource.com/c/91320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-29 17:53:58 +00:00
Dan Rubel 93a56336a3 Parse simple for control flow collection entires
... and address comments in:
https://dart-review.googlesource.com/c/sdk/+/91144
https://dart-review.googlesource.com/c/sdk/+/90901

Change-Id: I7a9288bf28e069832193bd8a196a11f9a407b20d
Reviewed-on: https://dart-review.googlesource.com/c/91300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-29 17:53:58 +00:00
Paul Berry 09224e4a2b Remove deprecated EMPTY_LIST constants.
Change-Id: I0f5662f56d1c7dc61e6b4a8ff96217b730ae8ffd
Reviewed-on: https://dart-review.googlesource.com/c/89820
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-23 01:45:46 +00:00
Brian Wilkerson 30f478b439 Add visitor methods for new AST nodes
Change-Id: Ifa8ce25f4da6580acddf76502c0c84b38eed555a
Reviewed-on: https://dart-review.googlesource.com/c/90121
Reviewed-by: Paul Berry <paulberry@google.com>
2019-01-22 19:25:12 +00:00
danrubel 2faab1d4c0 Update AstBuilder to build spread collection AST structures
Change-Id: Ifde5047933d810bdda77fe1b46eb6f69b7eabc5a
Reviewed-on: https://dart-review.googlesource.com/c/90082
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-01-18 00:05:30 +00:00
Brian Wilkerson ac1bf656c4 Non-breaking changes to add code-as-ui support
Change-Id: I8a2f0fe4e8e732f866d16e7d349fb21b8dd46194
Reviewed-on: https://dart-review.googlesource.com/c/89923
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-01-17 16:55:19 +00:00
Brian Wilkerson 6c2ea4936a Clean up several deprecation hints
Change-Id: I6191ddc4bb4a98c4976d8bc281b084bfd5073547
Reviewed-on: https://dart-review.googlesource.com/c/89941
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-01-17 01:05:24 +00:00
Konstantin Shcheglov 84273b9f36 Improvements for flow analysis.
Support for ConditionalExpression.
Check for potential mutations in closures.
Un-promote on assignment.
Support for 'while' statement.
Support for 'do-while' statement.

R=paulberry@google.com

Change-Id: Ic9e33a08057dc3519efec759702c52ddada728ed
Reviewed-on: https://dart-review.googlesource.com/c/89763
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-01-16 21:17:10 +00:00
Konstantin Shcheglov 0109e39ca4 Report INVALID_ASSIGNMENT for prefix/postfix increment decrement when the result is not assignable to the operand.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I83a732c039c1c83599c068a1944c5dd1040c3fd5
Reviewed-on: https://dart-review.googlesource.com/c/88880
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-10 05:51:15 +00:00
Sam Rawlins 9dbb6fb113 Add a Hint enforcing contract of @literal
Example code:

```dart
import 'package:meta/meta.dart';

class A {
  @literal
  const A();

  @literal
  const A.named();
}

var a = A();
var b = const A();
const c = A();
var d = new A();

var e = new A.named();
```

Produces:

Analyzing b.dart...
  hint • This instance creation must be 'const', because the A constructor is marked as '@literal' at b.dart:11:9 • non_const_call_to_literal_constructor
  hint • This instance creation must be 'const', because the A constructor is marked as '@literal' at b.dart:14:9 • non_const_call_to_literal_constructor
  hint • This instance creation must be 'const', because the A.named constructor is marked as '@literal' at b.dart:16:9 • non_const_call_to_literal_constructor
3 hints found.

Bug: https://github.com/dart-lang/sdk/issues/34259
Change-Id: Iba10e5e0a0b2d0f7e99556cd6c201cea229ad675
Reviewed-on: https://dart-review.googlesource.com/c/88422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-01-08 17:20:05 +00:00
Sam Rawlins ce256c762c Impl of INVALID_LITERAL_ANNOTATION
Bug: https://github.com/dart-lang/sdk/issues/34259
Change-Id: Ia5ca627a89dcb3f0fcd5ce74048df8fdf9dd9c9c
Reviewed-on: https://dart-review.googlesource.com/c/88283
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-03 18:07:44 +00:00
Brian Wilkerson bf528959af Proposed public API for the type system
Change-Id: I1980ffe05f246430e9dcb637eb3ac984ae1f4b1e
Reviewed-on: https://dart-review.googlesource.com/c/87240
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-12-13 20:42:17 +00:00
Brian Wilkerson 7a968ae283 Add a question mark to type annotations in the AST
Change-Id: Icb2e6e4a52d91d3ecf3c4e8a44a2d8f2a3d7a204
Reviewed-on: https://dart-review.googlesource.com/c/87167
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-12-13 17:11:02 +00:00
Brian Wilkerson 235da6f45d Rename AstNode.getAncestor by deprecating it and adding the new method (analyzer)
Change-Id: Ia00d8cb7153bd9db798352aab00b2431ba709671
Reviewed-on: https://dart-review.googlesource.com/c/85540
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-28 21:04:57 +00:00
Brian Wilkerson d29633f080 Add support for accessing the errors produced during constant evaluation
Change-Id: Iabd13ff201b79a1ca45cf609a9f48ed7e7155b61
Reviewed-on: https://dart-review.googlesource.com/c/84922
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-20 17:47:57 +00:00
Brian Wilkerson 032bfe0872 Use void rather than Object as a type argument when possible
Change-Id: I275a20e6f58a01adda3be64cf83930cc238beed3
Reviewed-on: https://dart-review.googlesource.com/c/84700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-19 18:32:31 +00:00
Brian Wilkerson 3a427f3294 Add an object representation for literal constant sets
Change-Id: If9ebebac0ba6891c7c5bd2398898f20a7ea82c6b
Reviewed-on: https://dart-review.googlesource.com/c/83940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-09 17:29:31 +00:00
Brian Wilkerson f0f3f445a7 Add a version of getAncestor that matches by type without a closure
Change-Id: Ib10ab78284466b04b47b6480aded9d3535c79b12
Reviewed-on: https://dart-review.googlesource.com/c/83642
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-08 20:43:57 +00:00
Brian Wilkerson 22408c6dee Remove references to previewDart2
Change-Id: Id382dd95d3ae90d483467741b5b6d3dbc6c31ea1
Reviewed-on: https://dart-review.googlesource.com/c/83300
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-07 14:52:37 +00:00
Brian Wilkerson 43bf6d0b54 Add an AST structure for set literals to analyzer
Change-Id: I1f97a0bd4c415dd679994c71cd4ba2b0a9ac8e42
Reviewed-on: https://dart-review.googlesource.com/c/83222
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-07 14:52:07 +00:00
Konstantin Shcheglov 3f431de188 Implement AnalysisSessionHelper.getElementDeclaration() using AnalysisSession.
Also adds parsedUnit / resolvedUnit to ElementDeclarationResult, because
Analysis Server use case shows that we need them.

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

Change-Id: I845e85f658bec8fdaf3378f879e3d986a0bc01eb
Reviewed-on: https://dart-review.googlesource.com/c/82712
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-11-02 22:52:49 +00:00
Brian Wilkerson 94b428a130 Add utilities to replace lib/analyzer.dart
Change-Id: I04d96cdc9c78390319b2a42c000dee92f5f5685d
Reviewed-on: https://dart-review.googlesource.com/c/82661
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-02 19:20:30 +00:00
Paul Berry 73a58c81d4 Merge commit '31d0896a8b8c7d2a8c0496c9d8d817356ef897ad' into analyzer 2018-11-02 10:44:56 -07:00
Paul Berry 31d0896a8b Introduce API so that the linter can be migrated away from Element.context.
The API change requires adding a "context" parameter to
NodeLintRule.registerNodeProcessors.  If we did this naively it would
be a breaking change since the existing linter code overrides this
method with an implementation that doesn't accept such a parameter.
So to avoid making this a breaking change, we introduce a new
interface NodeLintRuleWithContext that extends NodeLintRule, and adds
the context to the registerNodeProcessors method as an optional
parameter.  The analyzer will only pass in the new parameter if the
lint rule implements the new interface; otherwise it will call the
method in the old way.  This will allow the linter to be migrated to
use the new API at its pace.

The next breaking change version of the analyzer will change both
NodeLintRule and NodeLintRuleWithContext so that the context parameter
is required, and will pass in a context unconditionally.  At a later
date, after the linter has been fully migrated to the new analyzer
version, we will be able to switch back to NodeLintRule and deprecate
NodeLintRuleWithContext.

Change-Id: I75ada0e94e26f831d6f2cb82cddfa706100eb185
Reviewed-on: https://dart-review.googlesource.com/c/82522
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-11-02 14:22:12 +00:00
Konstantin Shcheglov e3c8774543 Add AnalysisSession.analysisContext, stop using AnalysisDriver's AnalysisResult outside the driver.
Change-Id: I63138e002d9e777f51d2d843f7ef2b1f32fed3e0
Reviewed-on: https://dart-review.googlesource.com/c/82529
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-11-02 14:16:31 +00:00
Konstantin Shcheglov ef91571cb8 Add ParsedLibraryResult, getParsedLibrary, getResolvedLibrary to AnalysisSession.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Ia48233b0d72dd0a0673a6ca15817881feca7d26c
Reviewed-on: https://dart-review.googlesource.com/c/82471
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-11-01 21:25:35 +00:00
Paul Berry d47ef00253 Convert session.dart to triple-slash comment style
Change-Id: I9f80b1a79a7d24df660b6a926b347df81d397905
Reviewed-on: https://dart-review.googlesource.com/c/82467
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-11-01 17:50:10 +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 4c61f68f9b Add support for summary files to the public analyzer API
Change-Id: I0d11e0481403c27de191c315f9e5d0bedc96a810
Reviewed-on: https://dart-review.googlesource.com/c/82340
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-11-01 14:21:44 +00:00
Paul Berry 57e631d661 Convert results.dart to triple-slash comment style
Change-Id: I9201d17d89c4ad9d51f50a974271ae32e6637908
Reviewed-on: https://dart-review.googlesource.com/c/82462
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-11-01 14:12:41 +00:00
Konstantin Shcheglov 2bb3dcf5df Add getResolvedLibrary() to AnalysisDriver.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I43fdf62bd6bb4c02e4b0cf97e324e6ca17c5d86c
Reviewed-on: https://dart-review.googlesource.com/c/82140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-10-30 19:30:12 +00:00
Brian Wilkerson 298d22f4ab remove async parse method
Change-Id: I7a2e633b43283221790fb88a12065fed3dcdabb7
Reviewed-on: https://dart-review.googlesource.com/c/82120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-10-30 19:26:00 +00:00