Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Fix a number of issues. #140

Merged
merged 3 commits into from
Oct 16, 2017
Merged

Conversation

matanlurey
Copy link
Contributor

@matanlurey matanlurey commented Oct 14, 2017

Closes dart-lang/tools#857.
Closes dart-lang/tools#858.
Closes dart-lang/tools#859.
Closes dart-lang/tools#860.
Closes dart-lang/tools#861.

This API already exists internally, so I'm skipping tests until we are back in sync - I won't release this as 2.0.0-alpha+3 before adding test coverage, though. EDIT: Added tests anyway.

Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -39,15 +39,89 @@ abstract class Expression implements Spec {
return new BinaryExpression._(toExpression(), other, '&&');
}

/// This expression preceding by `await`.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: "preceded"

}

/// Return `{other} = {this}`.
Expression assign(Expression other) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, a.assign(b) reads way too much like a = b. Maybe flip the logic and make it {this} = {other}?

Or perhaps rename to assignTo? Although not sure that helps much.

);
}

/// Return `{other} ??= {this}`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same issue as the one with assign.

);
}

/// May be overriden to support other types implementing [Expression].
/// Returns a const instance of this expression with a named constructor.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure what this does. Could you provide an example (and add it to the dartdoc)? Specifically, I'm not aware of many kinds of expressions that you can invoke with a named constructor, i.e. only references to classes. Perhaps this method should be moved to Reference?

);
}

/// This expression preceding by `return`.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: preceded

@matanlurey
Copy link
Contributor Author

Going to fix some of the comments in the next CL.

@matanlurey matanlurey merged commit 709b663 into dart-archive:master Oct 16, 2017
@matanlurey matanlurey deleted the update-to-google branch October 16, 2017 17:35
mosuem pushed a commit to dart-lang/tools that referenced this pull request Oct 25, 2024
* Fix a number of issues.

* OK, add some tests.

* Dartfmt.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
3 participants