Commit Graph

53 Commits

Author SHA1 Message Date
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
Dan Rubel 02ce510601 translate missing ">" fasta error code to analyzer error
Fix #30320

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2996673002 .
2017-08-11 15:29:49 -04: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
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
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
Paul Berry 1c2268b13e Move scanner tests into the front_end package.
This required moving the following classes into front_end as well:
- CharSequenceReader
- SubSequenceReader
- JenkinsSmiHash

A small amount of the functionality of GatheringErrorListener and
AnalysisError had to be replicated, to avoid a dependency on the
analyzer package.  In a future CL I will either refactor this code to
make it available to the rest of the front end, or, if
GatheringErrorListener and AnalysisError wind up getting moved into
the front end, I will un-do the replication.

I also took the liberty of addition functionality to JenkinsSmiHash to
make it easier to use.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2508483002 .
2016-11-15 14:53:49 -08: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
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
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
Brian Wilkerson 4dcb9b6196 Initial implementation for lazy compound assignment operators
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2199323002 .
2016-08-02 09:16:17 -07: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
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
John Messerly 3cb4cdec03 initial generic method comment parsing
R=brianwilkerson@google.com, leafp@google.com

Review URL: https://codereview.chromium.org/1434863003 .
2015-11-11 16:27:27 -08: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
Konstantin Shcheglov 8eb0de07f3 Issue 23919. Fix for line starts in multiline comments.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23919

Review URL: https://codereview.chromium.org//1271553002 .
2015-07-31 08:33:38 -07:00
Paul Berry 4b83219847 Switch on null-aware operators by default in analyzer.
Patches to update analyzer_cli and analysis_server will follow once a
new version of analyzer has been published.

BUG=dartbug.com/23793
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1239513005 .
2015-07-13 15:56:21 -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 6fe7a1d39b Scanner/parser support for DEP 9 (null-aware operators).
This adds scanner and parser support for the operators '?.', '??', and
'??='.

Support is not yet enabled--it is only turned on during the unit tests
for the new tokens and AST's.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1043583002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44770 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-28 02:25:32 +00:00
brianwilkerson@google.com 2fe598c6ea Fix line info for multi-line strings (issue 22794)
R=pquitslund@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//1000913004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44481 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 21:54:16 +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
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
brianwilkerson@google.com e6686b2993 Move incremental scanner to separate file
R=scheglov@google.com

Review URL: https://codereview.chromium.org//746503002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41856 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 17:54:41 +00:00
brianwilkerson@google.com e65d299873 Code clean-up, add utility class for incremental scanning, add tests
R=scheglov@google.com

Review URL: https://codereview.chromium.org//742013003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41855 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 17:03:27 +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 0a20e03aa0 Add tests of incremental scanner
R=scheglov@google.com

Review URL: https://codereview.chromium.org//675173004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41374 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 21:51:42 +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 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
scheglov@google.com 78c7e8fc06 Convert most of the EngineTestCase.createSource invocations into multi-line String literals.
There are sill invocations in Angular tests, but these call it with List<String>,
I will clean them up in the following CL.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//682553002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41308 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 22:03:21 +00:00
brianwilkerson@google.com 66f7c97acf Remove JavaStringBuilder
R=scheglov@google.com

Review URL: https://codereview.chromium.org//680863002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41305 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 21:49:04 +00:00
scheglov@google.com ebf761a5af Convert all the generated tests to reflective.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//637003002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40974 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 19:48:40 +00:00
scheglov@google.com d682c178b4 Write end-of-block comments.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//624403002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40912 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-05 17:53:52 +00:00
scheglov@google.com 46b9b138d6 Move Tokenfactory, AstFactory and ElementFactory from tests to the testing/ Folder.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//351283003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37748 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-26 17:30:25 +00:00
scheglov@google.com d06a1cff08 New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//322603002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37096 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-06 19:48:47 +00:00
scheglov@google.com 496aa45ed1 New analyzer snapshot. Sorted unit members.
New Character utilities.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//259773005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35468 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-26 22:37:24 +00:00
paulberry@google.com 6c000ea2cb New analyzer snapshot, based on r35422.
R=scheglov@google.com

Review URL: https://codereview.chromium.org//257773008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35426 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 15:18:19 +00:00
scheglov@google.com e5652e0e90 New analyzer snapshot with MapIterator.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//229653004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34891 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 20:18:01 +00:00
scheglov@google.com 6da7a82a20 Fix for translation of \!= to \!identical(), but use == and \!= for Enum.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//221483002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34636 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 03:09:22 +00:00
scheglov@google.com 1145c19860 Rollback pkg/analyzer that breaks code_transformers
R=blois@google.com, brianwilkerson@google.com, sigmund@google.com
BUG=

Review URL: https://codereview.chromium.org//214593008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34479 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 20:29:08 +00:00
scheglov@google.com 240b4138ce Translate Java enums to Dart constants.
1. Restore "this.field" field formal initializers.

2. Tweaks for several Java places - mostly to the constructors; but also duplicate HintCode messages (in Dart we cannot get values of constant values final fields).

3. Translate field that are not written to Dart final fields and also to field initializers, even if there are no property for them.

4. And constant enums.

5. pkg/code_transformers/test/resolver_test has to be skipped, I cannot fix it myself.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//214253002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34474 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 15:37:37 +00:00
scheglov@google.com a674327095 Translate private Java members to private Dart members.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//189803004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33453 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 20:59:57 +00:00
scheglov@google.com 151c4c3a7d Improved 'has' properties translation.
New analyzer snapshot.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//189043003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33399 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 22:18:26 +00:00
scheglov@google.com bd4d6033ba New analyzer snapshot.
1. Rename WorkManagerPriority -> SourcePriority.

2. Replace CharSequence with String.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//156763002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32373 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-06 18:09:20 +00:00
scheglov@google.com 38d028e67f Issue 8742. Preserve leading line comments during java2dart translation.
https://code.google.com/p/dart/issues/detail?id=8742

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//137863002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31790 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-14 16:28:59 +00:00
scheglov@google.com 7a418f273f Add copyright header to generated analyzer files.
R=brianwilkerson@google.com, danrubel@google.com
BUG=

Review URL: https://codereview.chromium.org//136143002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31743 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-13 16:01:36 +00:00
scheglov@google.com 9efe9ba519 New analyzer snapshot.
Mostly to remove unnecessary casts.
But also includes your latest changed for Alan.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//134533007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31717 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-10 22:27:52 +00:00
scheglov@google.com fb66f5d516 New analyzer snapshot.
Mainly to add support for the new options.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//107833002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30960 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-06 19:43:15 +00:00
scheglov@google.com 0cd8cd4006 New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//103233003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30862 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-04 17:57:44 +00:00