mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 07:31:04 +01:00
Update precedence rules to match design. (#3081)
- Only allow assignment at the top level in an expression statement. - Allow both negation and complement as subexpressions of both bitwise and numeric operators. - Remove parsing support for postincrement and postdecrement. - Add parsing support for `as` operator. - Use the same ambient precedence for types and non-type expressions. --------- Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
This commit is contained in:
co-authored by
Chandler Carruth
parent
3cca175a57
commit
fc5a9541ce
@@ -4,9 +4,6 @@
|
||||
//
|
||||
// AUTOUPDATE
|
||||
|
||||
// CHECK:STDERR: fail_dereference_type.carbon:[[@LINE+9]]:8: Parentheses are required around this unary `*` operator.
|
||||
// CHECK:STDERR: var p: *i32;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_dereference_type.carbon:[[@LINE+6]]:8: Cannot dereference operand of non-pointer type `type`.
|
||||
// CHECK:STDERR: var p: *i32;
|
||||
// CHECK:STDERR: ^
|
||||
|
||||
Reference in New Issue
Block a user