dart-sdk/pkg/front_end
Srujan Gaddam 3b294fdab2 [dart:js_interop] Add isA helper
Closes https://github.com/dart-lang/sdk/issues/54138

Adds a helper to do better type-checks so that users don't
accidentally using is checks or have to manually do the right
typeof or instanceof checks. In order to do this, there is
some refactoring to make ExportCreator a SharedInteropTransformer
(as it's shared across all backends) so that we can reuse an
existing visitor. In the same class, we remove unnecessary setting
of parent pointers. We should clean up the fileOffsets as well,
but dart2js verifies that those are set, so we keep them as is
for now. Also adds some static errors for edge cases.

CoreLibraryReviewExempt: Helper for web-specific library.
Change-Id: I34d818ada1349b69afd15d170d3fafa0460f65fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347225
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-01-25 18:52:45 +00:00
..
benchmarks
lib/src [dart:js_interop] Add isA helper 2024-01-25 18:52:45 +00:00
outline_extraction_testcases
parser_testcases [cfe] Report error on covariant in extension type methods 2023-12-15 09:13:07 +00:00
test [dart:js_interop] Add isA helper 2024-01-25 18:52:45 +00:00
testcases [dart:js_interop] Add isA helper 2024-01-25 18:52:45 +00:00
tool Revert "[cfe] Run fasta testing directly" 2024-01-10 11:46:47 +00:00
analysis_options.yaml
analysis_options_no_lints.yaml [cfe] Add CFE test for DartScope 2023-11-15 10:17:23 +00:00
error_recovery.yaml
LICENSE
messages.status [dart:js_interop] Add isA helper 2024-01-25 18:52:45 +00:00
messages.yaml [dart:js_interop] Add isA helper 2024-01-25 18:52:45 +00:00
OWNERS Also add global owners to CFE/VM packages 2023-11-27 14:35:52 +00:00
PRESUBMIT.py [build] Python 3.12 compatibility. 2023-12-12 18:19:35 +00:00
pubspec.yaml Enable private field promotion in pkg/front_end 2023-09-18 15:39:47 +00:00
README.md
testing.json [CFE] Remove unused fasta/sdk_test.dart 2024-01-16 13:18:57 +00:00
testing_with_lints.json Fix incorrect file reference in license headers 2023-09-18 06:44:08 +00:00

Front end for Dart

This package provides a low-level API for use by compiler back ends that wish to implement the Dart language. It is intended for eventual use by dev_compiler, dart2js, and the Dart VM. In addition, it will share implementation details with the analyzer package--this will be accomplished by having the analyzer package import (and re-export) parts of this package's private implementation.

End-users should use the dart analyze command-line tool to analyze their Dart code.

Integrators that want to write tools that analyze Dart code should use the analyzer package.

Note: A previous version of this package was published on pub.dev. It has now been marked DISCONTINUED as it is not intended for direct consumption, as per the notes above.