Commit Graph

19 Commits

Author SHA1 Message Date
Johnni Winther 34fb48bb8a [kernel,front_end] Migrate first wave of pkg/kernel and pkg/front_end
Migrates libraries dependent only on already migrated libraries.

Change-Id: I0e85ee8dbc2afce031b92e0009e71c206a55af28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179502
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-01-18 15:40:21 +00:00
Johnni Winther 00c2962db8 [cfe+analyzer] Move messages, scanner and parser to package:_fe_analyzer_shared
Change-Id: I4fa87aee65f30a9868a6cf8f0342591869ece7ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123663
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-01 09:37:57 +00:00
danrubel 6bd64ff8b2 cleanup StringScanner references
Change-Id: Ic75305c7a76860c5b96032d4f8c8fff695006f22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106004
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-06-14 13:39:47 +00:00
Peter von der Ahé 52bd3d9159 Complain about use of deprecated members
Change-Id: I76a66cb143027bed83fe6df3c5f19c8a7879a4ca
Reviewed-on: https://dart-review.googlesource.com/c/91926
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-02-05 09:09:04 +00:00
Dan Rubel 21edbbbac6 Add spread collection token to scanner
Change-Id: I1932d7c7fa6daba244ad2d93ddc7e2de18100fee
Reviewed-on: https://dart-review.googlesource.com/c/89600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-01-15 16:42:39 +00:00
Aske Simon Christensen 8427d53a4d Extra precedence level in parser to distinguish postfix operators and selectors
Fixes https://github.com/dart-lang/sdk/issues/31185

Change-Id: I77d617f6abd367d857741d04cf47571ea7492c6a
Reviewed-on: https://dart-review.googlesource.com/56111
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2018-05-23 16:13:55 +00:00
Dan Rubel 2b681b2149 Disable scanning of &&= and ||= assignment operators
Fix https://github.com/dart-lang/sdk/issues/30340

Change-Id: Id27f37af9805ca09deaa3c6252817e3d9a926216
Reviewed-on: https://dart-review.googlesource.com/17361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-31 18:51:24 +00:00
Brian Wilkerson bf6f398ef8 Make minus a valid prefix operator
Change-Id: Id741a5b1c753f564b54b4fd3d47cd90162a182c9
Reviewed-on: https://dart-review.googlesource.com/15660
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-10-20 21:06:29 +00:00
Brian Wilkerson 1e48c3f4d1 Recover from having an index operator with no expression
Change-Id: Ic4a6abcc95f61da047053398804bfe947565de88
Reviewed-on: https://dart-review.googlesource.com/11680
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-11 18:00:30 +00:00
Dan Rubel dff793d05f update lazy assignment operators
and remove scanLazyAssignmentOperators flag

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2903063003 .
2017-05-24 17:05:02 -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
Dan Rubel 3347169016 cleanup TokenType var names
* rename TokenType info --> type
* rename fasta Token.info --> Token.type

R=paulberry@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2872453004 .
2017-05-08 12:43:08 -04:00
Dan Rubel e0e892008a remove TokenType.KEYWORD
Breaking change to be landed after all existing callsites
have been converted to use the new API.

This is part 2 of https://codereview.chromium.org/2842643004/

* make Keyword extend TokenType
* make TokenType.AS be the same object as Keyword.AS
* make TokenType.IS be the same object as Keyword.IS
* remove TokenType.KEYWORD
* remove unnecessary Keyword.info method

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2848493003 .
2017-05-08 11:20:21 -04:00
Dan Rubel 684065855f merge PrecedenceInfo into TokenType and update all refs
* replace PrecedenceInfo *_INFO with TokenType.*
* remove outdated PrecedenceInfo tests
* delete unused precedence_info.dart

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2832403002 .
2017-04-25 08:51:52 -04:00
Dan Rubel 54d131ebd9 merge fasta.PrecedenceInfo into analyzer.TokenType
* move precedence consts into analyzer token.dart
* move PrecedenceInfo.all to TokenType.all
* replace references to PrecedenceInfo with TokenType
* merge fasta.PrecedenceInfo into analyzer.TokenType

R=paulberry@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2837473002 .
2017-04-23 09:13:24 -04:00
Dan Rubel 99336edc79 fasta.BeginGroupToken implement analyzer.BeginToken
* fasta.BeginGroupToken implement analyzer.BeginToken
* update token translator initialization of head and tail EOF
* update fasta.Token value() and type accessor to match analyzer

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2762103003 .
2017-03-21 11:46:45 -04:00
danrubel 08402f5789 update fasta scanner to generate two types of comments
* replace fasta.COMMENT_INFO
  with fasta.SINGLE_LINE_COMMENT_INFO and fasta.MULTI_LINE_COMMENT_INFO
  so that it matches analyzer scanner output

* added test for fasta.isUserDefinableOperator

R=ahe@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2757153002 .
2017-03-20 15:12:28 -04:00
danrubel e93ad0d4fc fasta.Token implement analyzer.Token
* fasta.Token implements analyzer.Token
* cleanup and improve PrecedenceInfo tests

R=ahe@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2757113002 .
2017-03-20 14:06:06 -04:00
danrubel 8bef633d3f fasta.PrecedenceInfo implement analyzer.TokenType
This updates PrecedenceInfo to implement TokenType
so that fasta.Token.type can return info for the token type.

In addition, the TokenType consts are now reference the corresponding
PrecedenceInfo consts so that parsing using either scanner will result
in token types that are identical.

R=ahe@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2758113002 .
2017-03-20 13:40:59 -04:00