Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Conversation

@matanlurey
Copy link
Contributor

1.0.0-beta+4

  • Renamed PartBuilder to PartOfBuilder.
  • Added a new class, PartBuilder, to represent part '...dart' directives.
  • Added the HasAnnotations interface to all library/part/directive builders.
  • Added asFactory and asConst to ConstructorBuilder.
  • Added ConstructorBuilder.redirectTo for a redirecting factory constructor.
  • Added a name getter to ReferenceBuilder.
  • Supplying an empty constructor name ('') is equivalent to null (default).

Closes dart-lang/tools#912
Closes dart-lang/tools#910
Closes dart-lang/tools#907

Partially addresses dart-lang/tools#966


/// Lazily builds a [PartDirective] AST when built.
class PartBuilder extends Object
with HasAnnotationsMixin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[optional] could be class PartBuilder extends HasAnnotationsMixin

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged. I like keeping it like this to ensure it stays mixin compatible.

ReferenceBuilder._(this._name, [this._importFrom]);

/// Name of the reference.
String get name => _name;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the field public instead, it is already final

_RedirectingConstructorBuilder(
this.name,
this.redirectToClass, {
this.asConst,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably have a default value, it's read without a null check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@matanlurey matanlurey removed the request for review from yjbanov March 1, 2017 03:58
@matanlurey matanlurey merged commit 9355e2d into dart-archive:master Mar 1, 2017
@matanlurey matanlurey deleted the new_features branch March 1, 2017 03:58
mosuem pushed a commit to dart-lang/tools that referenced this pull request Oct 25, 2024
* Add new features.

* More changes.

* Dartfmt.

* Yegors issue.

* Address feedback and merge.

* Oops.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants