diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-12-10 08:58:58 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-01-04 16:37:55 +0100 |
commit | fd25c4fa72fe82f70a389b5c5ee50db0afe30471 (patch) | |
tree | d1c62a45e22f69abd90af6c03cfc5259bf99c340 /gcc | |
parent | 84a85305de56260ef9cea8116c05fa06d5e6f841 (diff) | |
download | gcc-fd25c4fa72fe82f70a389b5c5ee50db0afe30471.zip gcc-fd25c4fa72fe82f70a389b5c5ee50db0afe30471.tar.gz gcc-fd25c4fa72fe82f70a389b5c5ee50db0afe30471.tar.bz2 |
format: Fix git whitespace errors
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/lang.opt | 4 | ||||
-rw-r--r-- | gcc/rust/lex/rust-token.h | 2 | ||||
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 29 |
3 files changed, 21 insertions, 14 deletions
diff --git a/gcc/rust/lang.opt b/gcc/rust/lang.opt index 31c2740..65fb59c 100644 --- a/gcc/rust/lang.opt +++ b/gcc/rust/lang.opt @@ -7,12 +7,12 @@ ; the terms of the GNU General Public License as published by the Free ; Software Foundation; either version 3, or (at your option) any later ; version. -; +; ; GCC is distributed in the hope that it will be useful, but WITHOUT ANY ; WARRANTY; without even the implied warranty of MERCHANTABILITY or ; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ; for more details. -; +; ; You should have received a copy of the GNU General Public License ; along with GCC; see the file COPYING3. If not see ; <http://www.gnu.org/licenses/>. diff --git a/gcc/rust/lex/rust-token.h b/gcc/rust/lex/rust-token.h index 8f5be33..ae4bcfb 100644 --- a/gcc/rust/lex/rust-token.h +++ b/gcc/rust/lex/rust-token.h @@ -147,7 +147,6 @@ enum PrimitiveCoreType RS_TOKEN (INNER_DOC_COMMENT, "#![doc]") \ RS_TOKEN (OUTER_DOC_COMMENT, "#[doc]") \ /* have "weak" union and 'static keywords? */ \ - \ RS_TOKEN_KEYWORD (ABSTRACT, "abstract") /* unused */ \ RS_TOKEN_KEYWORD (AS, "as") \ RS_TOKEN_KEYWORD (ASYNC, "async") /* unused */ \ @@ -200,7 +199,6 @@ enum PrimitiveCoreType RS_TOKEN_KEYWORD (WHERE, "where") \ RS_TOKEN_KEYWORD (WHILE, "while") \ RS_TOKEN_KEYWORD (YIELD, "yield") /* unused */ \ - \ RS_TOKEN (LAST_TOKEN, "<last-token-marker>") // Contains all token types. Crappy implementation via x-macros. diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 864fb86..12aac54 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 |