danrubel
a53b585498
Fix more Analyzer tests
...
* Add "usingFastaParser" accessor for Analyzer engine tests
* Update Analyzer compile time error code tests
* Add additional checks for async/await/yield as identifiers
* Update built-in as type variable error message
* Check for "this." in local declaration parameters
* Remove unnecessary asserts
and address comment in https://dart-review.googlesource.com/c/sdk/+/57022
Change-Id: I54b5ac22f912289dad6360646fae7eca717bbd98
Reviewed-on: https://dart-review.googlesource.com/57220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-05-31 00:25:03 +00:00
Paul Berry
105b170ddb
Roll package test to 0.12.29+1 and stack_trace to 1.9.0
...
This required some changes to analysis_server, since analysis_server
used to have its own version of pumpEventQueue(). Since
pumpEventQueue() is now provided by the test package, I've removed
analysis_server's version, and I've updated some of the call sites to
pass in "times: 5000" to replicate the old analysis_server behavior.
This also required some changes to analyzer, since the fail() method
is now marked as @alwaysThrows, so no code may follow it without
producing a dead code hint.
Change-Id: Ie5ef3a5cc685c18da02de699e59f63f3bb8865f7
Reviewed-on: https://dart-review.googlesource.com/32683
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2018-01-07 14:22:23 +00:00
Brian Wilkerson
b8f870c524
Add support for testing the highlight range of errors
...
Change-Id: I077ee8318756450271b68c70ed304807a1dfb240
Reviewed-on: https://dart-review.googlesource.com/16640
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-10-25 20:00:26 +00:00
Brian Wilkerson
86c62a6bad
Remove the command-line plugin
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2565993002 .
2016-12-11 10:59:19 -08:00
Brian Wilkerson
a01afcd1d1
Remove the options plugin
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2569603002 .
2016-12-11 08:38:29 -08:00
Paul Berry
0c928771fc
Revert "Connect analyzer's AnalysisError object to front_end's CompilationError."
...
This reverts commit fc5270df72 .
TBR=scheglov@google.com , brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2503803003 .
2016-11-15 10:00:34 -08:00
Paul Berry
fc5270df72
Connect analyzer's AnalysisError object to front_end's CompilationError.
...
AnalysisError implements CompilationError but provides additional
services, such as extensibility via the `getProperty` method.
Note: CompilationError.location has been renamed to
CompilationError.span to avoid confusion (since its type is
`SourceSpan`, not `SourceLocation`).
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2498133002 .
2016-11-14 15:30:10 -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
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
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
ecc84b26a4
Break up another large file
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2342733002 .
2016-09-15 07:49:27 -07:00
Brian Wilkerson
6c448b6938
Move exception support to its own library
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2328043002 .
2016-09-10 11:04:19 -07:00
Konstantin Shcheglov
e976e692be
Replace and remove JavaException(s).
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2326813002 .
2016-09-08 15:56:33 -07:00
Konstantin Shcheglov
e187e33923
Remove StringUtils from java_core.
...
It is used almost only in analyzer and analysis_server.
There are two places where it is used internally - I'm fixing them.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2317113005 .
2016-09-08 13:26:56 -07:00
Brian Wilkerson
f183ec3a45
Fix equality between subclasses of Source
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2050083002 .
2016-06-09 07:42:32 -07:00
Paul Berry
9e52ab17e0
Consolidate duplicate code for resloving URIs.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1831133005 .
2016-03-25 10:37:36 -07:00
Bob Nystrom
8defa5f77c
Split resolver_test.dart into smaller files.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1782463002 .
2016-03-09 10:42:09 -08:00
Konstantin Shcheglov
918582490e
Fix the 'Unused import' hint when using package summaries.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1722383002 .
2016-02-24 08:16:37 -08:00
Brian Wilkerson
eca9d45bd8
Fix source used in tests
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1698733002 .
2016-02-13 11:13:57 -08:00
William Hesse
b201036951
Remove import of AnalysisException from wrong library.
...
The class comes from generated/java_engine.dart, not generated/engine.dart
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org/1680703002 .
2016-02-08 17:27:24 +01:00
Brian Wilkerson
21ecb14548
Clean-up imports
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1602803002 .
2016-01-18 15:42:16 -08:00
Brian Slesinsky
5cc87405aa
Don't log stack trace for a bad package URL in a source file.
...
BUG=https://github.com/dart-lang/sdk/issues/25367
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1572073003 .
2016-01-11 15:53:49 -08:00
Konstantin Shcheglov
e5e1dc77bd
Replace using '_commentBeforeFunction' with visitXyzInScope().
...
Otherwise it gets really ugly with using FunctionTypeAlias which does not have
a body, and getters not having a FormalParameterList, and with parameters for
function typed parameters...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1526973005 .
2015-12-17 10:52:23 -08:00
Brian Wilkerson
2a190aa11a
Fix imports within the analyzer package
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1524893002 .
2015-12-14 12:25:41 -08:00
Brian Wilkerson
f0d249e269
Clean up package imports and library names
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1513643009 .
2015-12-10 08:11:56 -08:00
Brian Wilkerson
ea3ba0e31f
Remove deprecated code
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1502213002 .
2015-12-07 10:24:36 -08:00
Brian Wilkerson
600fc17de1
Clean-up the registration of plugins
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1487953002 .
2015-12-02 13:25:28 -08:00
Brian Wilkerson
4ae8540383
Revert "Clean-up the registration of plugins"
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1465983004 .
2015-11-20 14:04:53 -08:00
Brian Wilkerson
1367d2d47d
Clean-up the registration of plugins
...
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/1460123002 .
2015-11-20 08:14:14 -08:00
Brian Wilkerson
24b24a3569
Reformat code to reduce churn
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1322513004 .
2015-09-09 08:19:41 -07:00
John Messerly
6417c36b0a
[analyzer] remove "auto-generated do not edit" comments
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1291143002 .
2015-08-13 13:36:02 -07:00
Brian Wilkerson
c9069537d8
Get more tests passing using the new task model
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1211993003 .
2015-06-26 07:43:27 -07:00
Brian Wilkerson
add5a6910d
Remove many explicit references to AnalysisContextImpl and enable testing of the new task model
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1150863007
2015-06-06 08:30:38 -07:00
scheglov@google.com
88973df145
Add DartWorkManager to manage Dart-specific results computation scheduling.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1132893003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45677 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-09 23:22:21 +00:00
brianwilkerson@google.com
81e474c43e
Clean up many generated constructors
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1131423002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45676 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-09 19:06:12 +00:00
brianwilkerson@google.com
d954183441
Change all sources associated with changed files (issue 22680)
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//981283003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44335 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 18:28:21 +00:00
brianwilkerson@google.com
98b7382071
Reformat
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//975453004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44149 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 21:34:46 +00:00
brianwilkerson@google.com
890c99238c
Make source be a target
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//882813007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43355 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-02 17:08:28 +00:00
scheglov@google.com
b8da9bc651
Format and sort analyzer and analysis_server packages.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//725143004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41792 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-17 22:23:53 +00:00
scheglov@google.com
256c3ddbe7
Remove unused fields in analyzer.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//727763003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41742 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-14 15:43:24 +00:00
brianwilkerson@google.com
c258a1d7f6
Create fewer unnecessary lists
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//712083003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41641 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 17:25:58 +00:00
paulberry@google.com
8ff8367558
Additional fixes to printing of error codes.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//706933005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41611 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 17:43:28 +00:00
paulberry@google.com
d3101210b2
Fix printing of error codes in unit tests.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//707733005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41590 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 22:31:43 +00:00
brianwilkerson@google.com
20c13d4715
Fix logging API. This should fix the exception I'm seeing. I'll clean up uses of the deprecated API in a separate CL.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//694833002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41439 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 16:22:50 +00:00
scheglov@google.com
abeba4c773
Replace custom EngineTestCase.assertEquals() with 'unorderedEquals'.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//673233003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41365 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 17:00:06 +00:00
scheglov@google.com
d9aa3d8946
Remove unused EngineTestCase.assertX() methods.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//683193002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41362 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 16:19:39 +00:00
scheglov@google.com
9a806f616d
Replace EngineTestCase.assertSize() with hasLength().
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//686793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41361 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 15:57:33 +00:00
scheglov@google.com
63523cf050
Inline JUnitTestCase 'assert' methods.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//685573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41347 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 00:00:13 +00:00
scheglov@google.com
0f5bc31b0d
Remove any unnecessary parens around expressions in interpolations.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//681833003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41336 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 20:19:18 +00:00
scheglov@google.com
71a54f980b
Replace ${name} with $name where possible.
...
...i.e. when the next character is not a part of an identifier.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//681003002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41333 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 19:43:44 +00:00