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

Add more operators to list of infixes #327

Merged
merged 8 commits into from
Oct 13, 2022
Merged

Conversation

gadenbuie
Copy link
Member

@gadenbuie gadenbuie commented Oct 13, 2022

Adds more operators to our list of infixes, increasing coverage to include everything listed in ?base::Syntax.

Fixes #326

pkgload::load_all()

ex <- mock_this_exercise(
  .user_code = "TRUE | FALSE",
  .solution_code = "FALSE & FALSE"
) 

grade_this({
  fail_if_code_feedback()
  pass()
})(ex)
#> <gradethis_graded: [Incorrect]
#>   I expected you to call `&` where you called `|`.
#> >

Copy link
Contributor

@rossellhayes rossellhayes left a comment

Choose a reason for hiding this comment

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

Looks good to me!

R/utils-assertions.R Show resolved Hide resolved
@rossellhayes
Copy link
Contributor

rossellhayes commented Oct 13, 2022

Oh, before merging let's also add :=. It's not listed in ?Syntax but it is parsed as an operator.
Added support for := in bdf8fac.

@gadenbuie gadenbuie merged commit 723fe65 into main Oct 13, 2022
@gadenbuie gadenbuie deleted the fix/326-more-operators branch October 13, 2022 19:59
@rossellhayes rossellhayes linked an issue Mar 20, 2023 that may be closed by this pull request
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.

Don't add parentheses to logical operators Improve identification of infix operators
2 participants