front_end 0.1.26

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 [dartanalyzer][analyzercli] command-line tool to analyze their Dart code.

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

Note: The APIs in this package are in an early state; developers should be careful about depending on this package. In particular, there is no semver contract for release versions of this package. Please depend directly on individual versions.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  front_end: ^0.1.26

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

Popularity:
Describes how popular the package is relative to other packages. [more]
97
Health:
Code health derived from static analysis. [more]
1
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
50
Overall:
Weighted score of the above. [more]
59
Learn more about scoring.

We analyzed this package on Nov 4, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No libraries.

Health suggestions

Fix lib/src/fasta/kernel/expression_generator.dart. (-61.61 points)

Analysis of lib/src/fasta/kernel/expression_generator.dart reported 191 hints, including:

line 136 col 65: Use = to separate a named parameter from its default value.

line 146 col 24: Use = to separate a named parameter from its default value.

line 151 col 18: Use = to separate a named parameter from its default value.

line 152 col 23: Use = to separate a named parameter from its default value.

line 154 col 23: Use = to separate a named parameter from its default value.

Fix lib/src/scanner/token.dart. (-49.68 points)

Analysis of lib/src/scanner/token.dart reported 137 hints, including:

line 34 col 1: Prefer using /// for doc comments.

line 39 col 3: Prefer using /// for doc comments.

line 44 col 3: Prefer using /// for doc comments.

line 64 col 3: Prefer using /// for doc comments.

line 72 col 1: Prefer using /// for doc comments.

Fix lib/src/fasta/scanner/abstract_scanner.dart. (-19.39 points)

Analysis of lib/src/fasta/scanner/abstract_scanner.dart reported 43 hints, including:

line 49 col 3: Prefer using /// for doc comments.

line 76 col 3: Prefer using /// for doc comments.

line 85 col 3: Prefer using /// for doc comments.

line 94 col 3: Prefer using /// for doc comments.

line 99 col 3: Prefer using /// for doc comments.

Fix additional 90 files with analysis or formatting issues. (-236.57 points)

Additional issues in the following files:

  • lib/src/base/errors.dart (36 hints)
  • lib/src/fasta/kernel/body_builder.dart (31 hints)
  • lib/src/fasta/type_inference/type_inferrer.dart (27 hints)
  • lib/src/fasta/scanner/token.dart (22 hints)
  • lib/src/scanner/reader.dart (18 hints)
  • lib/src/fasta/parser/parser.dart (17 hints)
  • lib/src/fasta/kernel/kernel_shadow_ast.dart (16 hints)
  • lib/src/fasta/source/source_library_builder.dart (15 hints)
  • lib/src/fasta/kernel/constant_evaluator.dart (14 hints)
  • lib/src/testing/id_testing_utils.dart (13 hints)
  • lib/src/fasta/kernel/forest.dart (12 hints)
  • lib/src/kernel_generator_impl.dart (12 hints)
  • lib/src/fasta/builder/class_builder.dart (11 hints)
  • lib/src/fasta/scanner/utf8_bytes_scanner.dart (11 hints)
  • lib/src/fasta/source/source_loader.dart (11 hints)
  • lib/src/fasta/kernel/type_algorithms.dart (10 hints)
  • lib/src/fasta/scope.dart (10 hints)
  • lib/src/fasta/util/link.dart (10 hints)
  • lib/src/testing/compiler_common.dart (10 hints)
  • lib/src/scanner/errors.dart (9 hints)
  • lib/src/fasta/builder/library_builder.dart (7 hints)
  • lib/src/fasta/kernel/inference_visitor.dart (7 hints)
  • lib/src/fasta/parser/identifier_context.dart (7 hints)
  • lib/src/testing/id_testing.dart (7 hints)
  • lib/src/testing/id_testing_helper.dart (7 hints)
  • lib/src/base/library_info.dart (5 hints)
  • lib/src/fasta/dill/dill_library_builder.dart (5 hints)
  • lib/src/fasta/flow_analysis/flow_analysis.dart (5 hints)
  • lib/src/fasta/incremental_compiler.dart (5 hints)
  • lib/src/base/processed_options.dart (4 hints)
  • lib/src/base/syntactic_entity.dart (4 hints)
  • lib/src/fasta/builder/declaration_builder.dart (4 hints)
  • lib/src/fasta/builder/type_variable_builder.dart (4 hints)
  • lib/src/fasta/kernel/collections.dart (4 hints)
  • lib/src/fasta/loader.dart (4 hints)
  • lib/src/fasta/scanner/string_scanner.dart (4 hints)
  • lib/src/fasta/type_inference/type_schema_environment.dart (4 hints)
  • lib/src/api_unstable/bazel_worker.dart (3 hints)
  • lib/src/fasta/builder/extension_builder.dart (3 hints)
  • lib/src/fasta/compiler_context.dart (3 hints)
  • lib/src/fasta/kernel/constant_int_folder.dart (3 hints)
  • lib/src/fasta/scanner/keyword_state.dart (3 hints)
  • lib/src/fasta/source/diet_listener.dart (3 hints)
  • lib/src/fasta/type_inference/type_schema_elimination.dart (3 hints)
  • lib/src/scanner/interner.dart (3 hints)
  • lib/src/testing/id.dart (3 hints)
  • lib/src/base/resolve_relative_uri.dart (2 hints)
  • lib/src/fasta/builder/mixin_application_builder.dart (2 hints)
  • lib/src/fasta/builder/procedure_builder.dart (2 hints)
  • lib/src/fasta/dill/dill_class_builder.dart (2 hints)
  • lib/src/fasta/fasta_codes.dart (2 hints)
  • lib/src/fasta/kernel/class_hierarchy_builder.dart (2 hints)
  • lib/src/fasta/kernel/transform_collections.dart (2 hints)
  • lib/src/fasta/kernel/utils.dart (2 hints)
  • lib/src/fasta/kernel/verifier.dart (2 hints)
  • lib/src/fasta/parser/listener.dart (2 hints)
  • lib/src/fasta/scanner.dart (2 hints)
  • lib/src/fasta/scanner/scanner_main.dart (2 hints)
  • lib/src/fasta/type_inference/type_constraint_gatherer.dart (2 hints)
  • lib/src/fasta/util/link_implementation.dart (2 hints)
  • lib/src/testing/id_extractor.dart (2 hints)
  • lib/src/api_prototype/compiler_options.dart (1 hint)
  • lib/src/api_prototype/file_system.dart (1 hint)
  • lib/src/api_prototype/kernel_generator.dart (1 hint)
  • lib/src/api_prototype/standard_file_system.dart (1 hint)
  • lib/src/api_prototype/summary_generator.dart (1 hint)
  • lib/src/api_unstable/dart2js.dart (1 hint)
  • lib/src/api_unstable/ddc.dart (1 hint)
  • lib/src/base/libraries_specification.dart (1 hint)
  • lib/src/compute_platform_binaries_location.dart (1 hint)
  • lib/src/fasta/builder/field_builder.dart (1 hint)
  • lib/src/fasta/builder/invalid_type_builder.dart (1 hint)
  • lib/src/fasta/dill/dill_loader.dart (1 hint)
  • lib/src/fasta/get_dependencies.dart (1 hint)
  • lib/src/fasta/import.dart (1 hint)
  • lib/src/fasta/kernel/expression_generator_helper.dart (1 hint)
  • lib/src/fasta/kernel/kernel_target.dart (1 hint)
  • lib/src/fasta/kernel/type_builder_computer.dart (1 hint)
  • lib/src/fasta/modifier.dart (1 hint)
  • lib/src/fasta/parser/assert.dart (1 hint)
  • lib/src/fasta/parser/type_info_impl.dart (1 hint)
  • lib/src/fasta/resolve_input_uri.dart (1 hint)
  • lib/src/fasta/scanner/io.dart (1 hint)
  • lib/src/fasta/source/outline_builder.dart (1 hint)
  • lib/src/fasta/source/stack_listener.dart (1 hint)
  • lib/src/fasta/ticker.dart (1 hint)
  • lib/src/fasta/type_inference/type_promotion.dart (1 hint)
  • lib/src/fasta/type_inference/type_schema.dart (1 hint)
  • lib/src/testing/annotated_code_helper.dart (1 hint)
  • lib/src/testing/features.dart (1 hint)

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (kernel).

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.2 <3.0.0
kernel 0.3.26 0.3.26 0.3.29
meta ^1.0.2 1.1.8
package_config ^1.1.0 1.1.0
Transitive dependencies
charcode 1.1.2
Dev dependencies
analyzer 0.38.4
args >=0.13.0 <2.0.0 1.5.2
build_integration
dart_style ^1.0.7
json_rpc_2 ^2.0.9
path ^1.3.9 1.6.4
test ^1.3.4
test_reflective_loader ^0.1.0
web_socket_channel ^1.0.4
yaml ^2.1.12