983: support remainder assignment operator r=matklad a=JeanMertz

`%=` was returning errors for me, turns out it wasn't added as a valid assignment operation.

I'm not sure what the best location would be to add a test for this. Please let me know and I'll add one.

Co-authored-by: Jean Mertz <jean@mertz.fm>
This commit is contained in:
bors[bot] 2019-03-17 14:34:14 +00:00
commit 91e7a3b6f2
3 changed files with 218 additions and 0 deletions

View file

@ -154,6 +154,7 @@ fn current_op(p: &Parser) -> (u8, Op) {
(PLUS, EQ) => return (1, Op::Composite(PLUSEQ, 2)),
(MINUS, EQ) => return (1, Op::Composite(MINUSEQ, 2)),
(STAR, EQ) => return (1, Op::Composite(STAREQ, 2)),
(PERCENT, EQ) => return (1, Op::Composite(PERCENTEQ, 2)),
(SLASH, EQ) => return (1, Op::Composite(SLASHEQ, 2)),
(PIPE, EQ) => return (1, Op::Composite(PIPEEQ, 2)),
(AMP, EQ) => return (1, Op::Composite(AMPEQ, 2)),