Brian Wilkerson
d129b0261c
Fix recovery to prevent generating a parameter with no name and no type (issue 30020)
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2955063004 .
2017-06-27 09:19:25 -07:00
Erik Corry
029b1cb948
Spelling fixes e to i.
...
R=kevmoo@google.com
BUG=
Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Brian Wilkerson
4fab4a1f52
Clean up type parameters in comments
...
R=devoncarew@google.com
Review-Url: https://codereview.chromium.org/2948393002 .
2017-06-23 12:53:11 -07:00
Dan Rubel
d0910ce078
translate fasta parser error to analyzer error
...
* translate fasta parser BuiltInIdentifierAsType error to analyzer error
* remove unused error listener field
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2944383002 .
2017-06-20 13:18:48 -04:00
Dan Rubel
966d1a4701
integrating fasta parser
...
* start integrating fasta parser into analyzer
* extract new Scanner.fasta factory
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2948473002 .
2017-06-20 12:24:13 -04:00
Peter von der Ahé
db2e915aac
Improve recovery from compile-time errors.
...
R=danrubel@google.com , paulberry@google.com
Review-Url: https://codereview.chromium.org/2938573002 .
2017-06-13 16:00:15 +02:00
Brian Wilkerson
62d0376231
Run the sorter to reduce code churn
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2933753002 .
2017-06-12 07:37:14 -07:00
Peter von der Ahé
4e8203f9cd
Improve error messages and recovery.
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2924363002 .
2017-06-10 10:43:03 +02:00
Alexandre Ardhuin
617d0f53b6
add hint for @required ( #29828 )
2017-06-09 06:36:50 -07:00
Dan Rubel
56402976cd
more fixes for fasta analyzer integration
...
* fix scanner adapter setSourceStart
* fix fasta token copy() methods
* replace "is TokenWithComment" with "?.preceedingComments != null"
* update scanner test
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2928773003 .
2017-06-08 18:02:09 -04:00
Dan Rubel
b0374f214c
update analyzer parser tests for fasta scanner
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2930453002 .
2017-06-07 11:05:44 -04:00
Peter von der Ahé
7df768af0d
Restore invariant that stack is empty in parseFunctionBody.
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2914373002 .
2017-06-06 16:58:31 +02:00
Konstantin Shcheglov
0a194c2f40
Named parameters of generic functions should have names.
...
I stumbled upon this problem accidentally while editing a file.
It caused an exception in summarizer.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2918373002 .
2017-06-05 13:35:35 -07:00
danrubel
683e94aedb
fix scanner test expectations
...
Review-Url: https://codereview.chromium.org/2911243003 .
2017-05-30 17:56:17 -04:00
danrubel
427c06c2fe
fix fasta scanner adapter lineStarts
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2913043002 .
2017-05-30 16:54:05 -04:00
Brian Wilkerson
1b4679cacd
Clean-up several warnings
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2912883003 .
2017-05-30 09:04:41 -07:00
Paul Berry
e4042e5de2
Implement type inference for await expressions in front_end.
...
This required implementing FutureOr rules in
type_constraint_gatherer.dart. It also required fixing an incorrect
type in analyzer's mock SDK, which had some follow on effects on
analyzer unit tests.
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2904263003 .
2017-05-27 07:30:46 -07:00
Dan Rubel
8928329339
improve fasta interpolation recovery
...
* improve fasta interpolation recovery by adding closing brace
for unterminated string
* update analyzer scanner test because fasta does not support
does not support \r line endings
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2910583002 .
2017-05-26 08:43:48 -04:00
Dan Rubel
136698a734
remove fasta <--> analyzer token translation
...
R=ahe@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2902813005 .
2017-05-24 17:34:08 -04:00
Peter von der Ahé
61d855bb47
Prepare for development branch by updating externally-used API.
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2898183002 .
2017-05-24 14:32:45 +02:00
Brian Wilkerson
80fd95bb70
Fix parser bug found while trying to reproduce a different bug
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2895743002 .
2017-05-19 13:07:59 -07:00
Peter von der Ahé
547b2cdcce
Implement generalized function types.
...
Fixes https://github.com/dart-lang/sdk/issues/6972
Fixes https://github.com/dart-lang/sdk/issues/26581
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2876813002 .
2017-05-19 11:03:24 +02:00
David Morgan
32c4094d04
Analyzer: add ignore_for_file comment that ignores a type of problem for the whole file; add tests.
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2888953002 .
2017-05-19 10:01:53 +02:00
Dan Rubel
278c7bfbeb
merge fasta.Token into analyzer.Token
...
This eliminates much of the duplication between the two token hierarchies
by merging much of the fasta.Token hierarchy into the analyzer.Token.
* merge token hierarchies
* cleanup fasta.Token.copy()
* set preceedingComments field via constructor
* replace isBuiltInIdentifier --> type.isBuiltIn
* change all fasta.Token references to analyzer.Token
* move fasta.Token.value() implementation into analyzer.SimpleToken
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2890523002 .
2017-05-16 11:50:14 -04:00
Dan Rubel
d566906167
cleanup unused incremental resolution
...
* remove unused analyzer incremental resolution
* remove unused Token.applyDelta method
Patch Set 1 is the original CL that was landed and reverted
https://codereview.chromium.org/2876993005
Patsh Set 2 contains additional fixes and test changes
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2884853002 .
2017-05-16 07:53:17 -04:00
Dan Rubel
d644be82ab
Revert "cleanup unused incremental resolution"
...
This reverts commit 77b383e6b8 .
Review-Url: https://codereview.chromium.org/2887443002 .
2017-05-15 11:01:57 -04:00
Dan Rubel
77b383e6b8
cleanup unused incremental resolution
...
* remove unused analyzer incremental resolution
* remove unused Token.applyDelta method
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2876993005 .
2017-05-15 09:09:25 -04:00
Konstantin Shcheglov
a4fd5d814f
Extract PerformanceLogger from AnalysisDriver.
...
I also added the runAsync().
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2883633002 .
2017-05-12 14:27:50 -07:00
Erik Ernst
6cb0966401
Allowing e of any type in void f(...) => e in the analyzer.
...
Re-land, now including adjustment of two tests in pkg/analyzer/test.
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2870363003 .
2017-05-11 10:10:03 +02:00
Konstantin Shcheglov
bd1ee32543
Move [file_]byte_store.dart into pkg/front_end/test/src/incremental/.
...
We are going to reuse ByteStore in front_end, also for incremental
compilation.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2869803004 .
2017-05-09 09:12:15 -07:00
Konstantin Shcheglov
37092ed677
New tests and improvements for generics in comments parsing.
...
R=ahe@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2856463004 .
2017-05-01 12:52:09 -07:00
Dan Rubel
3b790e5311
new TokenType and Keyword API
...
This adds two new methods and adapts most of the old references
to use these new API. Once all call sites have been updated,
the old API can be removed.
This is part one of https://codereview.chromium.org/2842643004/
* replace type == TokenType.KEYWORD with type.isKeyword
* change Keyword.syntax --> Keyword.lexeme
R=paulberry@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2842213003 .
2017-04-26 15:53:58 -04:00
Dan Rubel
684065855f
merge PrecedenceInfo into TokenType and update all refs
...
* replace PrecedenceInfo *_INFO with TokenType.*
* remove outdated PrecedenceInfo tests
* delete unused precedence_info.dart
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2832403002 .
2017-04-25 08:51:52 -04:00
Jennifer Messerly
613881a433
fix #29426 , class type alias was missing checks
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2837173002 .
2017-04-24 15:02:29 -07:00
Brian Wilkerson
70e0d725ea
Fix exception when parsing broken code
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2837033003 .
2017-04-24 10:22:59 -07:00
Konstantin Shcheglov
04b40ad15d
Issue 29432. Instantiate the redirect constructor with the in-scope type arguments.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29432
Review-Url: https://codereview.chromium.org/2837743002 .
2017-04-24 08:54:54 -07:00
Brian Wilkerson
5cdfe4d8b0
Fix exception parsing generic function type syntax
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2836983002 .
2017-04-24 08:49:42 -07:00
Erik Corry
6617737ff5
Replace 'the the' with 'the'
...
R=kmillikin@google.com
BUG=
Review-Url: https://codereview.chromium.org/2830353002 .
2017-04-24 08:50:37 +02:00
Konstantin Shcheglov
d780f10d72
Remove ReferencedNames(Builder).
...
Nobody uses them anymore, so there is no point in computing it.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2835703002 .
2017-04-21 14:28:53 -07:00
Konstantin Shcheglov
e24b9c218d
Remove the limited invalidation feature.
...
So, we remove IncrementalCompilationUnitElementBuilder, which was one
of the places that potentially modifies element models.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2834773003 .
2017-04-21 12:09:28 -07:00
P.Y. Laligand
d7def1271d
Scan all packages files found in the output directory to build package mappings. ( #29400 )
...
This accounts for the (common) situation where multiple targets (library, binaries, test) are declared inside a single Dart package.
2017-04-20 13:36:38 -07:00
Konstantin Shcheglov
8f2061e6e3
Issue 29393. Consider 'v ??= doSomething()' as usage of 'v'.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29393
Review-Url: https://codereview.chromium.org/2832013002 .
2017-04-20 12:43:21 -07:00
Devon Carew
3998e35679
Fix two analyzer warnings.
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2832873002 .
2017-04-20 11:32:51 -07:00
Konstantin Shcheglov
0ce4611fd9
Move 'general function type' unit tests into mixins to run them with Fasta.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2829693002 .
2017-04-19 10:11:21 -07:00
P.Y. Laligand
043b8ebbf2
Fixed test failing on Windows. ( #29380 )
2017-04-18 12:50:50 -07:00
Konstantin Shcheglov
19353f9e63
Issue 29358. Fix for reporting constant errors while evaluating constructor invocations.
...
We should not report errors in one file using offsets of node in
another file.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29358
Review-Url: https://codereview.chromium.org/2825813002 .
2017-04-18 12:13:23 -07:00
P.Y. Laligand
bfdf42a8e0
GN workspaces now use packages files. ( #29364 )
...
The previous version would use a global cache of package locations which would hide missing dependencies.
Also fixed an issue in file tracking with non-existing sources that resolvers such as PackageMapUriResolver sometimes return.
2017-04-18 10:41:29 -07:00
Konstantin Shcheglov
63a6f83739
Issue 29360. Fix type name resolution for GenericTypeAliasElement.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29360
Review-Url: https://codereview.chromium.org/2827463002 .
2017-04-17 10:16:28 -07:00
Brian Wilkerson
fcac30e080
Reland: Fix more parser bugs
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2812243006 .
2017-04-14 07:26:29 -07:00
Alan Knight
7bf59fac63
Revert "Fix more parser bugs"
...
This reverts commit 65f8d25aa0 .
BUG=
Review-Url: https://codereview.chromium.org/2821483003 .
2017-04-13 10:07:40 -07:00