Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #135.
Closes #136.
Closes #137.
Closes #138.
Closes #139.

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-lang:master Oct 16, 2017
@matanlurey matanlurey deleted the update-to-google branch October 16, 2017 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants