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

Added new interpreter rules for handling broadcast comparisons and logical operators #29

Merged
merged 1 commit into from Oct 21, 2020
Merged

Added new interpreter rules for handling broadcast comparisons and logical operators #29

merged 1 commit into from Oct 21, 2020

Conversation

ancorso
Copy link
Contributor

@ancorso ancorso commented Oct 21, 2020

Added rules and tests for handling the following comparisons and operators: .<=, .>=, .==, .&, .|

@ancorso ancorso requested a review from rcnlee October 21, 2020 14:15
@coveralls
Copy link

coveralls commented Oct 21, 2020

Coverage Status

Coverage increased (+0.5%) to 87.981% when pulling ae8a37d on ancorso:interpreter_addons into 45158fe on sisl:master.

@rcnlee
Copy link
Collaborator

rcnlee commented Oct 21, 2020

I think this is the best way to implement it at the moment. You can actually call .<=(x,y) like it's a regular function, but unfortunately you can't get a function pointer to it to put into the SymbolTable. Broadcasting like this (<=).(x,y) already works, but isn't as user-friendly as infix. Only infix notation is currently not supported because it parses to an Expr of a different form. I don't see a better to implement infix broadcast at the moment, so I'll go ahead and merge it. If we come across a more general way where we don't have to do individual checks, we can revisit.

Thanks Anthony!

@rcnlee rcnlee merged commit 8573b55 into sisl:master Oct 21, 2020
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