Bruno BELANYI
21172e21e7
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) ```
17 lines
430 B
Plaintext
17 lines
430 B
Plaintext
================================================================================
|
|
Assignment precedence
|
|
================================================================================
|
|
|
|
a := b | c
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(assignment_expression
|
|
(identifier)
|
|
(operator)
|
|
(binary_expression
|
|
(identifier)
|
|
(operator)
|
|
(identifier))))
|