Modify the AST rewriting phase to transform `SimpleIdentifier` and `PrefixedIdentifier` nodes into `TypeLiteral` nodes when they resolve to a type (such as classes, type aliases, `dynamic`, or `Never`) and appear within a value expression slot. This change ensures a more consistent AST representation where type references used as values are distinct from other identifiers. Key changes include: - Generating `isInValueExpressionSlot` methods for AST nodes to identify valid contexts for type literals. - Updating `AstRewriteVisitor` to perform the conversion. - Adjusting constant evaluation, completion, and linter rules to support `TypeLiteral` nodes in expression contexts. - Adding comprehensive resolution tests for type literals in assignments, conditionals, loops, and other structures. Change-Id: I248481dc9c940dfc0cbea4950b918d2e0a3d9bb6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/479780 Reviewed-by: Samuel Rawlins <srawlins@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
A framework for building plugins for the analysis server.
Warning
This package is for legacy support and is not recommended for new plugin development.
For modern plugin implementations, use the
analysis_server_pluginpackage instead.See its documentation for the latest architecture and examples.
Usage
Note: The plugin support is not currently available for general use.
Plugins are written in Dart and are run in the same VM as the analysis server. The analysis server runs each plugin in a separate isolate and communicates with the plugin using a plugin API. This API is similar to the API used by the analysis server to communicate with clients.
Plugins are automatically discovered and run by the analysis server.
This package contains support code to make it easier to write a plugin. There is a tutorial describing how to use the support in this package.
Support
Post issues and feature requests on the issue tracker.
Questions and discussions are welcome at the Dart Analyzer Discussion Group.
License
See the LICENSE file.