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

[Truffle] Fix optional assignment specs #4355

Merged
merged 4 commits into from Dec 2, 2016

Conversation

nirvdrum
Copy link
Contributor

@nirvdrum nirvdrum commented Dec 2, 2016

This fixes all the remaining optional variable assignment specs. I think what I did makes sense, but I'd appreciate at least another pair of eyes looking over the changes.

@jruby/truffle

@nirvdrum nirvdrum added this to the truffle-dev milestone Dec 2, 2016
return visitOpAsgnAndNode(node, node.getFirstNode().accept(this), node.getSecondNode().accept(this));
}

private RubyNode visitOpAsgnAndNode(ParseNode node, RubyNode lhs, RubyNode rhs) {
Copy link
Member

Choose a reason for hiding this comment

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

I think it's clearer to give it another name like translateOpAsgnAndNode.


default: {
final RubySourceSection sourceSection = translate(node.getPosition());
final RubyCallNodeParameters callParameters = new RubyCallNodeParameters(context, sourceSection.toSourceSection(source), lhs, node.getOperator(), null, new RubyNode[] { rhs }, false, true, false, false, false);
Copy link
Member

Choose a reason for hiding this comment

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

There is a slightly shorter version if the last 3 boolean are false for RubyCallNodeParameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I missed that.

@nirvdrum nirvdrum merged commit d94afea into truffle-head Dec 2, 2016
@nirvdrum nirvdrum deleted the truffle-fix-optional-assignment-specs branch December 2, 2016 22:21
@enebo enebo added this to the Non-Release milestone Dec 7, 2017
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

4 participants