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

Resolve issue #56. #175

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Resolve issue #56. #175

wants to merge 1 commit into from

Conversation

akeizer
Copy link

@akeizer akeizer commented Nov 14, 2016

Adds new error that fires on compile of left/right associativity ambiguousness. Includes test to check change.

Solution involves finding parent for the appropriate line, passing it in and making a check that verifies the case where there is a left/right associativity issue as per the issue #56.

I'm part of the UW group.

…ight associativity ambiguousness. Includes test to check change
Copy link
Contributor

@pdubroy pdubroy left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this -- I'm going to discuss it with Alex tonight and get back to you. I'm still not 100% sure this is the right way to solve it, but having this PR will make the discussion easier, since we now have a concrete solution to consider.

' | B\n' +
' B = "117"\n' +
'}');
t.fail('Expected an exception to be thrown');
Copy link
Contributor

Choose a reason for hiding this comment

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

The more idiomatic way to ensure an exception is thrown is to use t.throws(): https://github.com/substack/tape#tthrowsfn-expected-msg

// no-op
};

pexprs.Alt.prototype.assertProperAssociativity = function(ruleName) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You might as well just group all of the no-op versions together.

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.

2 participants