Konstantin Shcheglov
4d4275d36e
Replace the sequence isInstanceOf/assign with assist-with-cast in ExpressionParserTestMixin.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2719403004 .
2017-02-28 14:31:41 -08:00
Konstantin Shcheglov
f7d379a494
Run ExpressionParserTestMixin tests with Fasta.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2726543003 .
2017-02-28 13:33:52 -08:00
Konstantin Shcheglov
69063303ac
Add support for field formal function typed formal parameters.
...
Plus a couple of new tests.
R=paulberry@google.com , ahe@google.com
BUG=
Review-Url: https://codereview.chromium.org/2720763003 .
2017-02-27 14:01:26 -08:00
Konstantin Shcheglov
6d231ad0ef
Extract ExpressionParserText from SimpleParserTest.
...
So that we can run this portion of tests with Fasta.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2717233004 .
2017-02-27 12:47:57 -08:00
Paul Berry
0c1facfd9b
Split parser tests that exercise class members to their own class.
...
In future CLs I will get these tests to pass.
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2713553011 .
2017-02-23 14:22:16 -08:00
Konstantin Shcheglov
11dfac24bd
Extract FormalParameter tests into FormalParameterParserTestMixin.
...
So, we can run these tests with analyzer's and fasta's parser.
R=paulberry@google.com , brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2707183002 .
2017-02-21 13:44:21 -08:00
Paul Berry
eabf574d7b
Capture const/final/var keyword in AstBuilder.endTopLevelFields.
...
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2708703002 .
2017-02-20 07:38:04 -08:00
Paul Berry
60c2aae9f8
Implement AstBuilder support for library, part, and part-of declarations.
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2707663002 .
2017-02-18 10:26:19 -08:00
Brian Wilkerson
f64bad806b
Recover better from illegally named constructors (issue 28807)
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2700343003 .
2017-02-18 09:48:13 -08:00
Brian Wilkerson
0cd0811083
Re-enable generic function type support
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2700183002 .
2017-02-17 10:45:45 -08:00
Paul Berry
901dc916cf
Begin adding top-level function declaration support to AstBuilder.
...
R=ahe@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2701513006 .
2017-02-17 08:25:44 -08:00
Paul Berry
7d0b31e323
Begin running tests in TopLevelParserTest using the Fasta parser.
...
Most tests currently fail due to methods that are not yet implemented
in AstBuilder. These tests are annotated with "@failingTest". I will
begin filling out the implementation of AstBuilder (and removing the
"@failingTest" overrides) in follow-up CLs.
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2697323003 .
2017-02-16 14:19:54 -08:00
Paul Berry
d5f44ff8be
Create a new class for parser tests that test top level constructs.
...
These parser tests should be easy to port over to Fasta; the others
will be more difficult because they invoke parser methods that may not
have exact analogues in Fasta's parser.
This CL is almost entirely code motion; the only substantive changes
are the creation of the new class TopLevelParserTest, and the creation
of the new mixin ParserTestHelpers (for the helper methods needed by
TopLevelParserTest).
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2703553003 .
2017-02-16 11:31:11 -08:00
Paul Berry
45fef2c266
Eliminate commentAndMetadata() from parser tests.
...
This allows the parser tests to be rewritten in a way that will make
them easier to adapt to testing Fasta, because they no longer make
assumptions about data structures passed around inside the parser.
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2684833004 .
2017-02-08 16:49:25 -08:00
Paul Berry
aa64ca9554
Eliminate emptyCommentAndMetadata() from parser tests.
...
This allows the parser tests to be rewritten in a way that will make
them easier to adapt to testing Fasta, because they no longer make
assumptions about data structures passed around inside the parser.
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2684703007 .
2017-02-08 14:16:17 -08:00
Paul Berry
67463b0f7d
Make some parser test helper methods non-static.
...
This paves the way for allowing more of analyzer's parser tests to be
run on both Fasta's parser and the analyzer parser.
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2683543006 .
2017-02-08 08:24:55 -08:00
Paul Berry
62604294a2
Begin hooking up Fasta to analyzer parser tests.
...
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2672403004 .
2017-02-07 05:45:58 -08:00
Brian Wilkerson
9761ff14d4
Backout part of previous commit to fix bots
...
Review-Url: https://codereview.chromium.org/2645283009 .
2017-01-26 11:56:06 -08:00
Brian Wilkerson
59a9861743
Fix some bugs related to the covariant keyword
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2662433002 .
2017-01-26 11:27:42 -08:00
Konstantin Shcheglov
8cf71084dc
Fix GenericFunctionType parsing tests by making them fail in non-checked mode.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2652443003 .
2017-01-21 14:32:46 -08:00
Brian Wilkerson
c40ec27266
Get the rest of the shared tests for covariant to pass
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2642683006 .
2017-01-20 15:04:50 -08:00
Brian Wilkerson
d06a2326f1
Add parser support for covariant parameters
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2639883005 .
2017-01-19 09:38:35 -08:00
Brian Wilkerson
ae24866083
Disable generic function types
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2640963003 .
2017-01-18 14:17:14 -08:00
Brian Wilkerson
bdb36c9c69
Remaining parser changes for generic function types
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2638463002 .
2017-01-14 08:24:03 -08:00
Brian Wilkerson
e7577172d1
Add preliminary parser support for generic function types
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2628973003 .
2017-01-12 07:00:24 -08:00
Brian Wilkerson
22f561e914
Reapply "Add support for generic function type syntax, part 1"
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2622303006 .
2017-01-11 14:10:05 -08:00
Brian Wilkerson
85b1e7abbe
Revert "Add support for generic function type syntax, part 1"
...
Review-Url: https://codereview.chromium.org/2624283003 .
2017-01-11 13:30:52 -08:00
Brian Wilkerson
1cd918533d
Add support for generic function type syntax, part 1
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2613383003 .
2017-01-11 13:12:10 -08:00
Brian Wilkerson
b4820d6a63
Handle generic local functions without a return type (issue 27965)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2551533002 .
2016-12-02 10:50:21 -08:00
Paul Berry
0c31815f1c
Transition analyzer and analysis_server to new astFactory.
...
This is the same as 1d028eed8d (which
was reverted) except that it doesn't remove the old AST factory
constructors (which broke dev_compiler). The removal of old AST
factory constructors will be done in a follow-up CL so that if it
unexpectedly breaks any other clients we will be able to revert it
without reverting this CL.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2536373008 .
2016-12-01 10:56:21 -08:00
Vijay Menon
b8d3758dcd
Revert "Transition analyzer and analysis_server to new astFactory; remove old AST factory methods."
...
This reverts commit 1d028eed8d .
This was breaking DDC.
TBR=paulberry@google.com
Review URL: https://codereview.chromium.org/2542753002 .
2016-11-30 14:57:49 -08:00
Paul Berry
1d028eed8d
Transition analyzer and analysis_server to new astFactory; remove old AST factory methods.
...
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/2539243002 .
2016-11-30 12:28:51 -08:00
Brian Wilkerson
b923dafd25
Add parser support for using a URI in a part-of directive
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2526063002 .
2016-11-25 08:16:45 -08:00
Paul Berry
05a6045674
Rename AstFactory -> AstTestFactory.
...
This paves the way for introducing a new AstFactory class that will be
part of the analyzer public API.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2524903002 .
2016-11-22 16:09:51 -08:00
Brian Wilkerson
a3e1a0d395
Enable generic method support by default
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2488043002 .
2016-11-22 09:16:19 -08:00
Brian Wilkerson
3c437f5d9e
Create AST structure for asserts in constructor initializers
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2492633002 .
2016-11-10 09:00:18 -08:00
Paul Berry
0a1fb8d248
Move scanner into pkg/front_end/lib/src/scanner.
...
Several support classes also had to move to front_end along with the
scanner. Some of these support classes arguably don't belong to the
scanner itself, since they have other uses (e.g. SyntacticEntity,
ErrorCode, ErrorSeverity, ErrorType, and StringUtilities). They will
be reorganized into a more appropriate location in future CLs, at the
time that they become needed by other components of the front end.
In order to avoid dragging in a lot of dependencies, the following
changes were made:
1. Scanner no longer reports errors through Source and
AnalysisErrorListener objects passed to the constructor. Instead, it
provides an abstract reportError() method which clients may override
to perform error reporting in any way they wish. Analyzer contains an
override of Scanner that mimics the old behavior in order to maintain
compatibility.
2. Static members of ErrorCode (`values` and `byUniqueName`) have been
moved to top level, and remain in analyzer. To maintain
compatibility, these static members remain in ErrorCode (as deprecated
members that simply wrap the implementations in analyzer). This means
we have a reverse dependency (front_end depends on analyzer), but this
dependency will go away as soon as we publish the next breaking change
release of analyzer.
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/2486873003 .
2016-11-08 13:47:17 -08:00
Konstantin Shcheglov
ed172ddf70
When DefaultFormalParameter, don't use ParameterKind.REQUIRED.
...
It's a compilation error, but we still want to be consisten.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2477183002 .
2016-11-07 09:31:48 -08:00
Brian Wilkerson
b57a73e279
Fix the parsing of generic function expressions
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2477793002 .
2016-11-03 09:34:22 -07:00
Brian Wilkerson
785b949894
Improve error recovery (issue 27646)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2444453002 .
2016-10-21 12:36:01 -07:00
Konstantin Shcheglov
bf43e4b43e
Validate local resolution scope, and compute initial name scope.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2439583003 .
2016-10-19 14:08:46 -07:00
Lasse R.H. Nielsen
efb9a12811
Add = as default-value separator for named parameters.
...
Fixes issue #27559 .
BUG= http://dartbug.com/27559
R=asiva@google.com , eernst@google.com , floitsch@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org/2411633002 .
2016-10-14 11:25:25 +02:00
Konstantin Shcheglov
5455fd0118
Remove 'initializeTestEnvironment' from 'analyzer'.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2399913002 .
2016-10-06 10:18:54 -07:00
Konstantin Shcheglov
175dad4f15
Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2391423003 .
2016-10-06 08:46:35 -07:00
Lasse R.H. Nielsen
574ae435f3
Allow surrogates in string literals.
...
Fixes issue #26620
BUG: http://dartbug.com/26620
R=asiva@google.com , brianwilkerson@google.com , floitsch@google.com , hausner@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org/2304923002 .
2016-09-26 13:23:41 +02:00
Brian Wilkerson
fd7bb76a4b
Add some errors related to nnbd
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2362873002 .
2016-09-22 13:43:37 -07:00
Brian Wilkerson
d947a7ba89
Async is no longer optional
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2361433002 .
2016-09-21 08:29:34 -07:00
Brian Wilkerson
d0245ea2b9
Finish removing MethodTrampoline
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2356653003 .
2016-09-20 08:20:56 -07:00
Brian Wilkerson
57f1193c01
First steps toward removing MethodTrampoline
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2348353002 .
2016-09-19 08:24:29 -07:00
Brian Wilkerson
772c93ccf2
Rename libraryUri
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2347213002 .
2016-09-16 10:54:25 -07:00