aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse/rust-parse-impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/parse/rust-parse-impl.h')
-rw-r--r--gcc/rust/parse/rust-parse-impl.h29
1 files changed, 19 insertions, 10 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h
index 86124ee..62c39f6 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -102,16 +102,25 @@ enum binding_powers
LBP_CLOSURE = LBP_RETURN, // unary prefix operators
#if 0
- // rust precedences
- PREC_CLOSURE = -40, // used for closures
- PREC_JUMP = -30, // used for break, continue, return, and yield
- PREC_RANGE = -10, // used for range (although weird comment in rustc about this)
- PREC_BINOP = FROM_ASSOC_OP,
- // used for binary operators mentioned below - also cast, colon (type), assign, assign_op
- PREC_PREFIX = 50, // used for box, address_of, let, unary (again, weird comment on let)
- PREC_POSTFIX = 60, // used for await, call, method call, field, index, try, inline asm, macro invocation
- PREC_PAREN = 99, // used for array, repeat, tuple, literal, path, paren, if, while, for, 'loop', match, block, try block, async, struct
- PREC_FORCE_PAREN = 100,
+ // rust precedences
+ // used for closures
+ PREC_CLOSURE = -40,
+ // used for break, continue, return, and yield
+ PREC_JUMP = -30,
+ // used for range (although weird comment in rustc about this)
+ PREC_RANGE = -10,
+ // used for binary operators mentioned below - also cast, colon (type),
+ // assign, assign_op
+ PREC_BINOP = FROM_ASSOC_OP,
+ // used for box, address_of, let, unary (again, weird comment on let)
+ PREC_PREFIX = 50,
+ // used for await, call, method call, field, index, try,
+ // inline asm, macro invocation
+ PREC_POSTFIX = 60,
+ // used for array, repeat, tuple, literal, path, paren, if,
+ // while, for, 'loop', match, block, try block, async, struct
+ PREC_PAREN = 99,
+ PREC_FORCE_PAREN = 100,
#endif
// lowest priority