Kaynağa Gözat

Precedence terminology (#3465)

josh11b 2 yıl önce
ebeveyn
işleme
fa07b52b8b

+ 3 - 2
toolchain/parse/testdata/operators/precedence_as.carbon

@@ -5,11 +5,12 @@
 // AUTOUPDATE
 
 fn F(n: i32) {
-  // Type operators and unary operators are lower precedence than `as`.
+  // Type operators and unary operators are higher precedence than `as`.
   -n as const i32;
   &n as i32*;
 
-  // `as` is lower precedence than relational comparisons and logical operators.
+  // `as` is higher precedence than relational comparisons and
+  // logical operators.
   if (1 as i32 < 2 as i32 and true as bool and false as bool) {}
 }
 

+ 1 - 1
toolchain/parse/testdata/operators/precedence_unary.carbon

@@ -6,7 +6,7 @@
 
 fn F(p: i32*) {
   // Numeric, bitwise, and bit-shift binary operators are lower precedence than
-  // Numeric and bitwise unary operators, which are lower precedence than
+  // numeric and bitwise unary operators, which are lower precedence than
   // dereference.
   -*p + ^*p;
   -*p | ^*p;