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

refactor: AssignOp::UpdateWithAssignOp::MathUpdate, Ast::UpdateMathAst::MathUpdate #143

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

bb010g
Copy link

@bb010g bb010g commented Dec 17, 2023

Note

This PR is a patch stack on top of #142, which should be read first. Do not squash these commits.

Rename UpdateWith & UpdateMath to MathUpdate, as mentioned in #142.

Additionally, extract LogicOp, which already partially exists in the definition of Ast::Logic (Logic(Id, bool, Id)).

validated with `cargo +1.63 check -p jaq-syn`.
prepare for testing the alternative update-assignment operator on the
`null` input value.
jq calls this the "alternative update-assignment operator".

note that jq documents the alternation operator as an arithmetic
operator and that jaq does not internally represent the alternation
operator as a math operator.

jq 1.6 considers chained `//=` operators without parentheses a syntax
error, like with `|=`; jaq allows chained `//=` operators by binding to
the right, at the same precedence as `|=`.
rename them to `MathUpdate` to be more consistent with other names.
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

1 participant