Commit Graph

60 Commits

Author SHA1 Message Date
Dan Rubel 05ba85399f Cleanup fasta parser rewriter insert token methods
Change-Id: Ic776cae52cbfae4c1892884a6d9e179147c5396e
Reviewed-on: https://dart-review.googlesource.com/75760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-20 17:00:41 +00:00
Dan Rubel 49da026e3e Report error for extends void type parameters
Change-Id: I634b836ea40199a1e7962b7d07ca9f5d1ef3f16a
Reviewed-on: https://dart-review.googlesource.com/74680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-13 20:27:56 +00:00
danrubel d35c18999f Disallow type parameters of the form <X super Y>
Fix https://github.com/dart-lang/sdk/issues/28848

Change-Id: I1b8cd943b5af448fb6f5826d002d0b5a403e6bba
Reviewed-on: https://dart-review.googlesource.com/74241
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-11 15:30:03 +00:00
Peter von der Ahé f5f33776a4 Revert "Store code ranges for formal parameters."
This reverts commit 5b9a42de29.

Change-Id: If6b3edc7194fda050de3b6ffbb0c8124a75509a6
Reviewed-on: https://dart-review.googlesource.com/72100
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-08-30 10:20:18 +00:00
Konstantin Shcheglov 5b9a42de29 Store code ranges for formal parameters.
Change-Id: I022e5140869c7007c28109a4dfda3914b34c4725
Reviewed-on: https://dart-review.googlesource.com/71184
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-22 17:40:58 +00:00
Dan Rubel ad6029c608 Update fasta parser to split ">>=" when parsing type var
Change-Id: Id60da00165ef1c7d9128985ccadef06f62637a24
Reviewed-on: https://dart-review.googlesource.com/70181
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-16 01:04:46 +00:00
Dan Rubel 4eb4d75270 Remove unused event parameter
Change-Id: I097886cae93204d671a3aca4caaafea8d117989d
Reviewed-on: https://dart-review.googlesource.com/70180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-16 01:04:46 +00:00
Dan Rubel 825df975a0 Revise fasta type arg/param parsing to ignore "<".endGroup
The scanner associates '<' with '>' and '>>',
but the parser cannot use '<'.endToken/endGroup reliably
and wastes time updating that token's endToken/endGroup field.

This CL updates type info parsing to ignore '<'.endGroup
and step through the token stream (which it has to do anyway),
for improved parsing.

This CL causes a handful of existing tests to fail (marked as @failingTest)
and test failures will be addressed in a subsequent CL.

Change-Id: I788e9a74cd2891f98f44bba15d5669febfec6c64
Reviewed-on: https://dart-review.googlesource.com/70001
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-15 22:16:40 +00:00
Dan Rubel 9619e2cd77 Remove unused fasta parser methods and event parameter
Change-Id: I0bf050a475ad3548342307027d14aba4badf468e
Reviewed-on: https://dart-review.googlesource.com/69620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-13 16:42:12 +00:00
danrubel c3f5c07a47 Simple type argument parsing fixes and more tests
This fixes some of the event tokens when parsing simple type arguments
with '>>' or '>=', and organizes and adds more tests.
In addition, this addresses a comment in
https://dart-review.googlesource.com/c/sdk/+/69261

Change-Id: I16e3a5360ac2e62dd1853df946b88611ff099d94
Reviewed-on: https://dart-review.googlesource.com/69360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-10 18:58:32 +00:00
danrubel 8e2141f1cf Fix parsing typedefs with <T>=
This is the first CL of several needed to fix typedef parsing
when there is no space between the type parameters and the `=`.

  typedef F<T>= T Function(T);

* Fix some typedef parsing failures
* Add new consts for simple type var ending with ">>" and ">="
* Update computeType and computeTypeParamOrArg to return new consts
* Extract splitGtEq/GtGt/GtGtEq from splitEndGroup
* Hide internal TypeInfo and TypeParamOrArgInfo consts

Change-Id: Ice550f5b15df1f3cad616a2a342644974f14d8ee
Reviewed-on: https://dart-review.googlesource.com/69261
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-10 15:09:21 +00:00
danrubel fea8cb1473 Revise order of type variable declaration events
As of this CL, events for type variable declarations occur
in the following order:

* beginTypeVariables
* beginTypeVariable for each type variable in the declaration
* handleTypeVariablesDefined
* endTypeVariable for eah type variable in the declaration
* endTypeVariables

Revising the order of events facilitate removing the hack
in BodyBuilder.beginTypeVariables in a future CL.

This is another slice of https://dart-review.googlesource.com/c/sdk/+/57661
so that it can be landed in a more incremental fashion.

Change-Id: Ief0ad766c12f1ca9d53a8ec8d3c08b41166b2897
Reviewed-on: https://dart-review.googlesource.com/61940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-06-22 19:47:46 +00:00
danrubel e9bc3352e0 Replace and remove parseType
Change-Id: Id276165dbe6c7168d4156fd755f3f32c835d93af
Reviewed-on: https://dart-review.googlesource.com/61321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-06-21 22:01:05 +00:00
danrubel 8419090c8c Cleanup type variable event sequence
This is another step towards cleanup and improved recovery when parsing
type variables in fasta.

* call listener.handleIdentifier before beginTypeVariable

This is a slice of https://dart-review.googlesource.com/c/sdk/+/57661
so that it can be landed in a more incremental fashion.

Change-Id: I9cc483636f0b0f3168b92981695334c18bdfedfb
Reviewed-on: https://dart-review.googlesource.com/61320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-06-20 20:50:34 +00:00
Dan Rubel daee781179 Revise beginTypeVariable event in event sequence
This is the first CL in a series aimed at removing the need to reparse type variables in
https://github.com/dart-lang/sdk/blob/master/pkg/front_end/lib/src/fasta/kernel/body_builder.dart#L3669
and ultimately improving recovery by removing parseType.

* Move calls to listener.beginTypeVariable after parsing metadata and identifier
* Pass variable name via beginTypeVariable rather than via handleIdentifier
* Add additional check in test for issue 31846

Change-Id: I983b9d17675fc899c83df69fa1777059903e3f52
Reviewed-on: https://dart-review.googlesource.com/58300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-06-05 15:11:00 +00:00
Peter von der Ahé b3bae4262d Fix a batch of long lines
Change-Id: I9ae610f7e6e588ecec961af9ea72dcf6ee1751b7
Reviewed-on: https://dart-review.googlesource.com/57506
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-05-31 12:25:22 +00:00
Dan Rubel b7336ab443 Improve field type argument recovery
This CL improves recovery when parsing field type arguments
and adds more tests for parsing type parameters and type arguments.

Change-Id: Ib6ee4081f898d0421d90a66de84d686206a06a8f
Reviewed-on: https://dart-review.googlesource.com/56682
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-29 16:30:46 +00:00
danrubel b4699ae795 Improve type parameter and type argument recovery
This improves recovery when parsing type arguments in
* top level fields and functions
* class members

and when parsing type parameters in
* top level functions
* class declaration
* class methods

Change-Id: I7dbb520d6bb39c0d13b27698658dafe580f2b16c
Reviewed-on: https://dart-review.googlesource.com/56681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-05-26 02:25:53 +00:00
danrubel 544863fe68 Remove the no-op rewriter tests
Change-Id: I416ee350e1e7346493a3c4df3616f11d3b637d7c
Reviewed-on: https://dart-review.googlesource.com/56680
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-26 02:25:53 +00:00
Dan Rubel 137942aca5 Implement TypeParamOrArgInfo.parseVariables
This CL is the next step in replacing parseType and improving recovery.
It introduces a new parseVariables method for parsing type parameters
(aka type variables) method in addition to improving recovery in the
parseArguments method.

Change-Id: I4049528152a7c731771d7a8145e5f79729165d79
Reviewed-on: https://dart-review.googlesource.com/55301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-05-16 11:44:08 +00:00
Dan Rubel 64754764b1 Update computeType to call computeTypeParamOrArg
This is another step to replacing parseType with computeType
and improving recovery when parsing types and type arguments.

This adds a new computeTypeParamOrArg utility which returns
one of a couple constants for common situations or an instance
of ComplexTypeParamOrArg. The computeType function and
some places in ComplexTypeInfo class have been updated to use
this new method, but there are additional places that will be
tackled in subsequent methods.

Change-Id: I7012b65580e9dbc74b9424456262aa3c0367f48b
Reviewed-on: https://dart-review.googlesource.com/53641
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-05-04 13:38:07 +00:00
Dan Rubel 73768a5342 General TypeInfo and IdentifierContext cleanup
* Assert computeType and TypeInfo.skipType do not modify the token stream
* Rename TokenInfoTest to TypeInfoTest
* Move skipMetadata to util.dart
* Address comments in https://dart-review.googlesource.com/c/sdk/+/53300

Change-Id: Id2dbe54c5bc688db268e18b0a491367115f7b091
Reviewed-on: https://dart-review.googlesource.com/53640
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-03 16:38:24 +00:00
Dan Rubel 313b5bd191 Rename TypeInfo subclasses and constants
Rename the TypeInfo constants and related constants in preparation
for refactoring and improving type argument and type parameter parsing.

Change-Id: I5a741ee06f373800973942c233490fe83916e39c
Reviewed-on: https://dart-review.googlesource.com/52140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-20 16:07:39 +00:00
danrubel 10b441b16b Improve conditional import expression recovery
This improves recovery when parsing conditional import expressions
by repositioning the synthetic closing ')' that was inserted by the
scanner in a less than optimal location.

This approach relies on the beforeSynthetic field being set correctly.
While the scanner still sets the 'next' and 'beforeSynthetic' fields
directly for efficiency, most other functions which update an existing
token stream have been revised to call 'setNext()' rather than setting
the 'next' field directly. This ensures that the 'beforeSynthetic' field
will be correctly updated.

Change-Id: Id631fd600c64d1feaf00593acb74a7070e354f07
Reviewed-on: https://dart-review.googlesource.com/52120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-20 13:58:50 +00:00
Dan Rubel 499b6ba4cf Improve fasta parser computeType recovery
This CL improves recovery when a type is required to interpret
"Foo.", ".", and ".Foo" as malformed prefixed type references.
When a type is *not* required, each of the above are still interpreted
as no-type-reference.

Change-Id: Ia20caa8619821d24c5b16fd0015cee03987ee2a6
Reviewed-on: https://dart-review.googlesource.com/51900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-19 16:08:49 +00:00
Dan Rubel 8e812ddaa5 Pass modifiers in beginFormalParameters event
This CL updates the beginFormalParameters event to include
the covariant and const/final/var modifiers, and cleans up
a number of unused classes and methods including:

* the original implementation of ModifierContext/Recovery
* handleModifier and handleModifiers events

Change-Id: Ie89a202d17872fba85cd1a477091472a8d2d223b
Reviewed-on: https://dart-review.googlesource.com/51380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-17 20:27:37 +00:00
Dan Rubel e9616da13e Cleanup TypeInfo
This CL cleans up the TypeInfo library including:
* moving ComplexTypeInfo to type_info_impl.dart
* splitting up and enhancing the tests
* adding a new ensureTypeOrVoid method for use in a subsequent CL

Change-Id: I2d13f74152f8c4eb2e8b3ee504f108225cfa60eb
Reviewed-on: https://dart-review.googlesource.com/51080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-13 09:25:47 +00:00
Dan Rubel c502578096 Replace skipTypeReferenceOpt with computeType
... and also address comment in
https://dart-review.googlesource.com/c/sdk/+/49340

Change-Id: Ie9bcea39bd2b9c0199c92647b2a5ae0240276c1e
Reviewed-on: https://dart-review.googlesource.com/49561
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-05 09:56:16 +00:00
Dan Rubel 6180f12ccf Update parsing as/is expressions to use computeType
This introduces a new TypeInfo.ensureType method which recovers
when a type is required but there is no type.

Change-Id: Ie9080864f814329bc7a7dcdf73440fd184e9e0f8
Reviewed-on: https://dart-review.googlesource.com/47944
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-03-23 17:58:59 +00:00
Dan Rubel 8630c69c9f Add typeInfo expression accessor
Change-Id: I1d97bb6b64a09f44182677d691b0c3c78c22ec6f
Reviewed-on: https://dart-review.googlesource.com/47060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-03-21 14:21:09 +00:00
Dan Rubel 0175f24b25 Assert errors during TypeInfo.parseType
... and Address comments in
https://dart-review.googlesource.com/c/sdk/+/46561

Change-Id: Ic3a183d83a4afea2e759e371306b6eb2b3c6ba6a
Reviewed-on: https://dart-review.googlesource.com/46600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-14 21:00:41 +00:00
Dan Rubel 3be356e96d Improve TypeInfo recovery when missing a comma
Change-Id: Iac7093e7ac71e20f15ece29a4cda75630b167253
Reviewed-on: https://dart-review.googlesource.com/46561
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-03-14 18:13:48 +00:00
Dan Rubel 983e7b3662 Update TypeInfo to correctly parse "T<void>"
Change-Id: I2fe4d1c36c52a599d9d80809d88562657100dcdf
Reviewed-on: https://dart-review.googlesource.com/46480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-03-14 14:54:35 +00:00
danrubel f5ec1143ab Reorganize TypeInfo tests
Change-Id: I03306fcb2a91546931aef3056be36a43e983822a
Reviewed-on: https://dart-review.googlesource.com/46380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-03-13 23:54:10 +00:00
Dan Rubel ff9591d2d3 Extract computeType from parseType for better recovery
This CL extracts the core logic out of parseType into a new computeType
function. This enables the TypeContinuation logic in parseType to be
moved into the callers of parseType so that recovery can be improved.

Change-Id: Ibded6f5eacfeaccdc6c56e234b305596d9582a92
Reviewed-on: https://dart-review.googlesource.com/45760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-03-13 14:49:59 +00:00
Brian Wilkerson fcfdb8a4d5 Replace TokenStreamRewriter.insertToken with insertTokenAfter
Change-Id: I110099eaf0db7f4b09a8225ffaf674e132ce3d43
Reviewed-on: https://dart-review.googlesource.com/28260
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-12-11 21:24:53 +00:00
Brian Wilkerson d522e93a56 Convert replaceToken to accept the token before the token to be replaced
Change-Id: Ibcb730cb500f35352a88394d3ec49e27f23e6cdd
Reviewed-on: https://dart-review.googlesource.com/26340
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-05 18:22:02 +00:00
Brian Wilkerson 7f720c266d Prepare to convert replaceToken
Change-Id: I1d2f9f16f49dd9edae179463eba068c34e365e5e
Reviewed-on: https://dart-review.googlesource.com/26020
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-04 17:50:26 +00:00
Brian Wilkerson 32385ee32e Address comments from CL 15200
Change-Id: I7a478686d2b721272ba178cc906f62af98c5891c
Reviewed-on: https://dart-review.googlesource.com/15620
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-10-20 16:58:09 +00:00
Brian Wilkerson b7bdf60c92 Remove Parser.firstToken and cleanup TokenStreamRewriter
Change-Id: I812215872c6d06fc86336c47e17f73617ff9936c
Reviewed-on: https://dart-review.googlesource.com/15200
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-19 21:47:57 +00:00
Brian Wilkerson 332c0b9d6c Introduce replacement for TokenStreamRewriter.insertTokenBefore
Change-Id: I821fbc0f938395cc0dd1583a82e3f9ca74bbcf2a
Reviewed-on: https://dart-review.googlesource.com/14660
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-18 20:08:22 +00:00
Aske Simon Christensen 8a2a9e4622 Reland "Error on setter having not exactly one parameter"
Rewrite setter with invalid parameters into one with one parameter
and a body throwing a compile-time error.

Some analyzer tests fail until we sort out the expected form of the
generated kernel code in situations like this. This is tracked in
https://github.com/dart-lang/sdk/issues/31096

Closes https://github.com/dart-lang/sdk/issues/31069
Original CL: https://dart-review.googlesource.com/13080

Change-Id: I432240c33d6daf0ec6bfe2b73c609ab4762cda8c
Reviewed-on: https://dart-review.googlesource.com/14381
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2017-10-17 13:16:30 +00:00
Martin Kustermann 25dc42f5d8 Revert "Error on setter having not exactly one parameter"
This reverts commit 4bb83e9311
This reverts commit f1b07b2789.

Reason for revert on analyzer bots:

    Analyzing pkg/analyzer...
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:625:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:625:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:626:13 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:635:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:635:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:636:13 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:645:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:645:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:646:13 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:655:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:655:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:656:13 • undefined_identifier
    12 errors found.

Change-Id: Ie2035bf40e50c48f85b514c7a3786141cd0f2453
Reviewed-on: https://dart-review.googlesource.com/14061
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-10-16 16:32:13 +00:00
Aske Simon Christensen f1b07b2789 Error on setter having not exactly one parameter
Rewrite setter with invalid parameters into one with one parameter
and a body throwing a compile-time error.

Some analyzer tests fail until we sort out the expected form of the
generated kernel code in situations like this. This is tracked in
https://github.com/dart-lang/sdk/issues/31096

Closes https://github.com/dart-lang/sdk/issues/31069
Change-Id: I65033709813671ecb933e6a4dc00d1ff3b504661
Reviewed-on: https://dart-review.googlesource.com/13080
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2017-10-16 15:07:49 +00:00
Bob Nystrom 0947675d6d Migrate the language tests up to arithmetic_test.
This technically steals a few tests from the previous batch that spans
corelib and language, but I wanted to start from the top of the language
tests.

Removed application_test and application_negative_test because they are
useless and the latter has never actually worked correctly since the day
it was transliterated from the long-defunct application file syntax.

R=bkonyi@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/2984443003 .
2017-07-19 20:30:21 -07:00
danrubel bf2b3e7061 modifiy insertTokenBefore to return the inserted token
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2970983003 .
2017-07-05 15:50:08 -04: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
Peter von der Ahé f1b7a97744 Move testing.json and status files to more natural locations.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2957623002 .
2017-06-23 14:27:53 +02:00
Dan Rubel 54d6e3a1c5 cleanup fasta token classes
* replace fasta.SymbolToken --> analyzer.Token
* replace fasta.BeginGroupToken --> analyzer.BeginToken
* replace fasta.SymbolToken.eof --> analyzer.Token.eof

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2899043006 .
2017-05-25 07:26:50 -04: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