danrubel
96dd9d49db
Update Analyzer tests to pass NonExistingSource rather than null
...
Change-Id: I770d50a31230e7e3fdabecf4cbffc6fee76e1fb5
Reviewed-on: https://dart-review.googlesource.com/57020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-05-29 17:12:26 +00:00
Konstantin Shcheglov
cc034472bb
Fix LineInfo.getOffsetOfLineAfter().
...
Or we could remove it altogether.
It is not used outside of analyzer/analysis_server/analyzer_plugin.
R=brianwilkerson@google.com
Change-Id: I89c90fc0881f2b1602128f8aacdda2762c4e7920
Reviewed-on: https://dart-review.googlesource.com/54306
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-05-08 20:28:07 +00:00
Brian Wilkerson
c214c43758
Make LineInfo a public class
...
Change-Id: I1bc7f5302797374609752ea5293b96c30719b41f
Reviewed-on: https://dart-review.googlesource.com/51101
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-04-13 16:23:47 +00:00
Brian Wilkerson
0e764393f3
A few more Dart2 related fixes
...
Change-Id: If2503b93e11f0831787dfa21e5ae0abb74e9162f
Reviewed-on: https://dart-review.googlesource.com/47302
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-03-20 20:17:59 +00:00
Devon Carew
32beedf168
Print method params as 'foo: bar' instead of 'foo : bar'.
...
Change-Id: I5c50936e1ead2b39d144a4e74e37482cb49410bd
Reviewed-on: https://dart-review.googlesource.com/38421
Commit-Queue: Devon Carew <devoncarew@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-02-04 02:02:35 +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
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
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
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
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
6446cab391
Guard against exceptions thrown by linters (issue 27545)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2407553002 .
2016-10-07 14:37:39 -07: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
Konstantin Shcheglov
9cf47ce04c
Remove parseUriWithException() and URISyntaxException.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2321263003 .
2016-09-09 08:30:01 -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
cc6beaf56d
Pull in test_reflective_loader 0.0.4 and switch analyzer to it.
...
There are following changes:
1. DEPS to pull in test_reflective_loader 0.0.4
2. Rename runReflectiveTests() to defineReflectiveTests().
3. Remove analyzer's pkg/analyzer/test/reflective_tests.dart
4. Replace reflective_tests.dart imports with package:test_reflective_loader/test_reflective_loader.dart imports.
5. Sort/format and organize imports in the files with imports changes.
6. Fix for a couple of bugs in analysis_server exposed by the new loader.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2298913003 .
2016-08-31 13:46:39 -07:00
Konstantin Shcheglov
359e0d9d19
When copying TokenWithComment, use copy of its comments.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2081603002 .
2016-06-20 09:09:35 -07:00
Brian Wilkerson
08241e9072
More strong mode clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1947813002 .
2016-05-04 07:42:46 -07:00
Brian Wilkerson
e46eaa3072
Fix node replacer to handle comments on variable declaration lists (issue 25818)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1715723002 .
2016-02-19 08:45:25 -08:00
Konstantin Shcheglov
5db3ae73bf
Always set the previous token in AstCloner.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1710163002 .
2016-02-18 13:40:32 -08:00
Brian Wilkerson
71e7ed86c0
Move scanner out of generated and clean up imports
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1693083004 .
2016-02-14 07:48:44 -08:00
Konstantin Shcheglov
135be23107
Issue dev_compiler@443. Clone beginToken.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/dev_compiler/issues/443
Review URL: https://codereview.chromium.org/1686653003 .
2016-02-09 19:24:14 -08:00
Bob Nystrom
3f3b242f39
Probably don't need an unused re-implementation of addAll(). :)
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org/1674963002 .
2016-02-08 15:12:10 -08:00
Konstantin Shcheglov
0232570f44
Clone and link all tokens in AstCloner.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1660873003 .
2016-02-03 21:31:28 -08: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 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
Paul Berry
9a08061581
Add support for assert statements with messages to the analyzer.
...
Support is disabled by default.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1480433002 .
2015-11-24 15:50:45 -08:00
Konstantin Shcheglov
c095ba1f91
Extract 'computeLineStarts' utility.
...
R=brianwilkerson@google.com , pquitslund@google.com
BUG=
Review URL: https://codereview.chromium.org/1411253007 .
2015-10-27 14:03:44 -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
908708d655
More fixes for failures on the Windows bot
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//1266923004 .
2015-08-05 08:13:28 -07:00
John Messerly
646eeb7af1
fix NodeReplacer for AwaitExpression
...
similar fix to https://github.com/dart-lang/sdk/commit/fa5b8ce45607827d12532c9f78bb30c3273094a5
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1216463002 .
2015-06-25 15:00:17 -07:00
John Messerly
fa5b8ce456
fix NodeReplacer for YieldStatement
...
it was missing a return, so it always fell through to the visitNode error case
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1213503002 .
2015-06-25 10:59:20 -07: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
paulberry@google.com
0457770df5
Don't permit annotations inside variable declarations.
...
This addresses the root cause of dartbug.com/23176.
BUG=dartbug.com/23204
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1083093002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45165 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 13:28:38 +00:00
scheglov@google.com
5c9110841e
Fix hints in the analyzer package.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1026093002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44639 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-23 17:34:00 +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
268cd8bab2
API clean-up
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//970913002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44134 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 17:28:37 +00:00
scheglov@google.com
a38a503d86
Replace @ReflectiveTestCase() with @reflectiveTest.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//849863002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42821 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 17:11:24 +00:00
paulberry@google.com
280657737f
Annotate analyzer tests with @ReflectiveTestCase().
...
Fixes analyzer tests when run under dart2js.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//780763004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42181 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-08 21:00:51 +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
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
brianwilkerson@google.com
e9696e5f67
Clean up logging uses
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//685993004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41443 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 19:05:19 +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
e96b29143c
Rename ForEachStatement.iterator -> iterable.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//689793003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41405 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 21:33:04 +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
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