Commit Graph

8 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
Michael Thomsen 9cca0f733a Use terms which are not divisive
Based on guidance in https://developers.google.com/style/inclusive-documentation

Related to https://github.com/dart-lang/sdk/issues/42247

Change-Id: Iaed8db465ae6a78cce3688b695287898c36e4734
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150623
Auto-Submit: Michael Thomsen <mit@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-06-10 11:04:37 +00:00
Jens Johansen 3660b9ecc7 [parser] New syntax for null aware index (2nd try)
This reverts commit bc4893a3b3.

The previous attempt failed because when we check if something is a
conditional expression we used a rewriter that didn't actually rewrite.
This further down the line (still checking if we can parse the expression)
results in errors occurring (that wouldn't have occurred if the rewrite
had happened) and the conclusion was thus that it wasn't a conditional
expression and we parsed it as a null-aware index operator (which gave
errors because it wasn't).

This 2nd try solves it by having a rewriter that actually rewrites,
but then allows to undo the rewrites after we're done parsing.

Change-Id: Ide3c0d6a870d4dc18b6d9475b0227d93c733dc7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136624
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-26 13:31:52 +00:00
Jens Johansen 2b94bd678d [CFE] Fix renames from test to suite and move of parser
Change-Id: Ica6b0acd8fe6acd32b4a6776cb3203cef8ff7210
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124990
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-13 09:26:47 +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
Johnni Winther c8ff1b0c21 [cfe] Add BlockKind to parse/begin/endBlock
... and use this to computed AssignedVariables data for try statements

Change-Id: I235575b055cb89b553baf0ac728d9954d8d0aaa6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123251
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-10-29 09:17:06 +00:00
Jens Johansen d374ff8cbc [parser] Allow parser test to add trace to output for easier debugging
With this, once can for instance run
out/ReleaseX64/dart pkg/front_end/test/parser_test.dart -DupdateExpectations=true -Dtrace=true -- parser_test/nnbd/nullCheckOnIndex
and from the output see where stuff was called, e.g.

beginFormalParameters((, MemberKind.TopLevelMethod) (package:front_end/src/fasta/parser/parser.dart:1227:14)

and

       parseGetterOrFormalParameters(f, f, false, MemberKind.TopLevelMethod) (package:front_end/src/fasta/parser/parser.dart:2484:13)
         parseFormalParameters(f, MemberKind.TopLevelMethod) (package:front_end/src/fasta/parser/parser.dart:1153:15)
           parseFormalParametersRest((, MemberKind.TopLevelMethod) (package:front_end/src/fasta/parser/parser.dart:1216:12)
             listener: beginFormalParameters((, MemberKind.TopLevelMethod) (package:front_end/src/fasta/parser/parser.dart:1227:14)

This output should obviouslys not be committed, but is great for debugging.

Change-Id: I42db55ff928bde783d652b6338b54e6dba1550db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121326
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-11 14:05:16 +00:00
Jens Johansen 0242dea803 [CFE] Amend parser test framework to include intertwined output
Add expect file that includes both listener trace and actual parser trace.

Change-Id: I7fe1a13429b80ac4ce315f8b9248ab984644fd14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119331
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-01 06:53:02 +00:00