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-alpha+8

  • Add support for async, sync, sync* functions
  • Add support for ann expression to asAwait, asYield, asYieldStar
  • Add toExportBuilder and toImportBuilder to types and references

Closes dart-lang/tools#964
Closes dart-lang/tools#965

CHANGELOG.md Outdated
@@ -1,3 +1,9 @@
## 1.0.0-alpha+8
Copy link
Contributor

Choose a reason for hiding this comment

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

+9 :)

}

/// Various types of modifiers for methods.
class MethodModifier implements ValidMethodMember {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are things like static and final considered modifiers? I'm also wondering if package:meta should be supported out-of-the-box (as a separate feature request probably), for things like @protected and @mustCallSuper.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't believe so (I am just copying analyzer terminology though)

/// Creates a new [MethodBuilder].
factory MethodBuilder(
String name, {
MethodModifier modifier,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can a method have multiple modifiers? I'm not terribly versed in the Dart terminology, but in Java private, protected, static, final, etc are all considered "modifiers" and can be combined.

Copy link
Contributor

Choose a reason for hiding this comment

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

static final or static const are valid

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are just async/sync/* variant modifiers, since there are other ways to set them.

(And you can't just add static anywhere in Dart)

Acknowledged.

pubspec.yaml Outdated
@@ -1,5 +1,5 @@
name: code_builder
version: 1.0.0-alpha+7
version: 1.0.0-alpha+8
Copy link
Contributor

Choose a reason for hiding this comment

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

+9

);
});

test('should emit an async* method', () {
Copy link
Contributor

Choose a reason for hiding this comment

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

async* is not complete without a await for/in :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For loops/while loops in a future PR :)

@matanlurey matanlurey merged commit c6e69c6 into dart-archive:master Dec 20, 2016
@matanlurey matanlurey deleted the new_features branch December 20, 2016 05:57
mosuem pushed a commit to dart-lang/tools that referenced this pull request Oct 25, 2024
…ode_builder#46)

* Various changes.

* Update presubmit.

* Add async, await, yield

* .

* .

* Update CHANGELOG.md

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add support for async/await Add toExportBuilder to ReferenceBuilder

4 participants