Commit Graph

16 Commits

Author SHA1 Message Date
Jens Johansen c075d939e0 [parser/scanner] Remove ScannerConfig enableNonNullable
Change-Id: If6bfbb65a02ac1a4f5708ab9e8c4d66c19ecff86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403984
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-01-13 00:32:35 -08:00
Jens Johansen 5dfce919cd [parser/scanner] Remove ScannerConfig enableExtensionMethods
Extension methods can no longer be disabled. This CL removes the option
from the scanner config and the parser related specific recovery.
It also removes any specific (triggered) test of the functionality.
A follow-up CL will do the same for NNBD.

Change-Id: Ia385008e5ed1333fb37697b8fe424b8759bce198
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403581
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-01-13 00:32:25 -08:00
Johnni Winther 8df57398c9 [cfe] Move src/fasta/ subfolders to src/
Part of removing uses of 'fasta'.

TEST=existing

Change-Id: Ice027678e11b7da8c1a7e756a1e1c8c8284722bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372623
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2024-06-25 10:05:21 +00:00
Jens Johansen c543ceb96a [CFE] Small changes to direct-from-parser ast
Unrelated to anything. Done when I was trying something else that didn't
pan out.

Change-Id: Idd8e03fa142d3ec9d373956d3cc6163d828d4314
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368801
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-05-30 13:44:02 +00:00
Jens Johansen 8c1475c6c2 [CFE] Update parser ast and utils
Change-Id: I616b597826903dce4d4b38144eb8b729f5699bbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354229
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-04-25 08:55:59 +00:00
Lasse R.H. Nielsen 8a883fa54d Change : to = for default values in pkg.
Leaves some in parser test:
 pkg/front_end/parser_testcases/error_recovery/keyword_named_formal_parameter_prime.dart

TEST=Refactoring, covered by existing tests.

Change-Id: I7a83ef95df3cbd283878b3685b5c747bd89a1b16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256125
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-08-24 15:57:16 +00:00
Johnni Winther e1c9640279 [cfe] Rename direct_parser_ast files to parser_ast
Change-Id: I10ef96413f7f91704d0ca29d12ded2b034dc0406
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221326
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-11-26 12:51:46 +00:00
Johnni Winther 9788371d7d [cfe] Rename DirectParserASTContent to ParserAstNode
+ remove DirectParserASTContent prefix from subclasses.

Change-Id: I766a426ae9f9f1d43919abc27728535ba6e71e8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221324
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-11-26 12:43:04 +00:00
Jens Johansen ad6ffaab95 [CFE] First stab at prototype for textually extracting outlines
Change-Id: Ib84b47f0acb553cee6d891d7bbcf865f4a57a65a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221080
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-11-26 06:14:44 +00:00
Johnni Winther a6cc772b67 [cfe] Add always_declare_return_types lint
Change-Id: I206a7a8132b5ea79dc019acf5c2e0cd800307bcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212161
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-02 08:07:23 +00:00
Johnni Winther 3eac19026b [cfe] Add annotate_overrides lint
Change-Id: I90a6d5c7d64ed23acd94b9a8dda58d53da4fe8df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212041
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-09-01 16:24:16 +00:00
Johnni Winther e6e25ac7b0 [cfe] Migrate remaining front_end tools
Change-Id: I75f936734a89ec5858390d96be7a5cdc4a300891
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208402
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-08-04 08:49:51 +00:00
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
Jens Johansen c8105305ac [CFE] Improve direct parser ast
* Add specific classes with explicit arguments instead of storing
  everything in a map.
* Add helpers as extension methods.
* Include an (unused) example of using it.

This can most likely still be improved a lot usability-wise, but this
should be a step in the right direction.

Change-Id: I57fc6e7c1866e0647a019a9514dfe71b8e584d82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173726
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-26 11:54:25 +00:00
Jens Johansen 4fa2d6497b [CFE] Change ansi escape code visualization
Change-Id: Ib361ad439a8c2822dbe2c9351f020688bac48ca4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161170
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-09-01 13:03:01 +00:00
Jens Johansen 3a1f732c0f [parser] Make begin/end events always come in pairs
This CL:
* Changes the events so beginX and endX events always comes in pairs
  (though technically not right as some specific events can be beginX
  endY --- but in those cases it is at least documented and used in code
  that actually tests it).
  -> This entails adding some events and converting something from
    "beginX" to "handleX" instead.
* Adds a utility that can generate an AST of sorts directly from the
  parser via a listener using the begin/end matching (and knowing of the
  specific ones that doesn't match directly).
* Adds a test that checks that - at least for all tested (50,000+) files
  - the AST actually generate "correctly", i.e. matches up begin/ends
  and ends up with a single top entry "CompilationUnit".
* Adds a different visualization to the parser listener events by
  displaying the "AST directly from the parser" in a UI that can be
  navigated. The visualization may not be the best, but it's certainly
  a stepping stone.

Change-Id: I9b27f7bbf3be442adc92f357c7b3c46da6f84cf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159664
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-01 09:30:43 +00:00