Module: Y2R::AST::Ruby::Priority
- Defined in:
- lib/y2r/ast/ruby.rb
Overview
Operator priorities.
Note the table is incomplete (because the AST is incomplete).
Constant Summary collapse
- ATOMIC =
atomic expressions (e.g. literals)
15
- UNARY =
!, ~, + (unary)
14
- POWER =
**
13
- UNARY_MINUS =
-
(unary)
-
12
- MULTIPLY =
*, /, %
11
- ADD =
+, -
10
- SHIFT =
<<, >>
9
- BITWISE_AND =
&
8
- BITWISE_OR =
|, ^
7
- COMPARE =
>, >=, <, <=
6
- EQUAL =
<=>, ==, ===, !=, =~, !~
5
- LOGICAL_AND =
&&
4
- LOGICAL_OR =
||
3
- TERNARY =
? :
2
- ASSIGNMENT =
1
- NONE =
lowest priority, nothing needs to be in parens
0