Closed itchyny closed 2 years ago
This PR fixes %= operator. Also adds test for all arithmetic assignment operators.
%=
❯ jq -c '.[] %= 2' <<< '[1,2,3]' [1,0,1] ❯ xq -c '.[] %= 2' <<< '[1,2,3]' Error: compile query Caused by: ParseError(UnrecognizedToken(Loc { line: 0, col: 5, byte_idx: 5 }, "Eq", ["\"(\"", "\"+\"", "\"-\"", "\".\"", "\"..\"", "\"[\"", "\"break\"", "\"def\"", "\"false\"", "\"foreach\"", "\"if\"", "\"label\"", "\"null\"", "\"reduce\"", "\"true\"", "\"try\"", "\"{\"", "FieldStr", "Format", "IdentifierNonKeywordStr", "ModuleIdentifierStr", "ModuleVariableStr", "Number", "StringStart", "TryNoCatch", "VariableStr"])) ❯ xq --version xq 0.2.2-867924f3feb34b21e41363c38603dd7b739c8666
Awesome, thank you!
This PR fixes
%=
operator. Also adds test for all arithmetic assignment operators.