Fix assignment priority

The assignment operator is lower priority than any other binary
operator.

Otherwise the following:

```tiger
a := b | c
```

Would be parsed as:

```tiger
(a := b) | c
```

Instead of the expected:

```tiger
a := (b | c)
```
This commit is contained in:
Bruno BELANYI 2022-06-04 20:41:23 +02:00
parent 869b0bf79a
commit 21172e21e7
4 changed files with 1223 additions and 1203 deletions

View file

@ -0,0 +1,16 @@
================================================================================
Assignment precedence
================================================================================
a := b | c
--------------------------------------------------------------------------------
(source_file
(assignment_expression
(identifier)
(operator)
(binary_expression
(identifier)
(operator)
(identifier))))