Some orders in generators incorrect #4353
Labels
component: generators
help wanted
External contributions actively solicited
issue: bug
Describes why the code or behaviour is wrong
Milestone
Describe the bug
In the generators for library blocks, some of the
ORDER
enums used are incorrect.Context
We specify operator precedence (
ORDER
) in 2 types of places:Example of issues
In some cases, the mistake in order has no side effects or only causes extra parenthesis. These mistakes are only a problem for when looking at code for examples. This happens in the following instances:
ORDER_MEMBER
andORDER_FUNCTION_CALL
don't cause any side effects)In other cases, the mistake in order causes syntax error in specific edge cases. This can be very tricky to catch because there are a lot of valid combinations.
Expected behavior
Library blocks should use the correct order:
Current progress
Generator code reviewed/fixed (for all languages):
Additional context
Historically, there has been a lot of confusion with understanding the correct operator precedence to use when writing generator code. Part of what contributes to this confusion is that the value of the
ORDER
enums is inversely related to the strength (higher order and stronger precedence is a lower value).The text was updated successfully, but these errors were encountered: