diff options
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 | ||||
-rw-r--r-- | gcc/rust/rust-session-manager.cc | 2 |
4 files changed, 22 insertions, 15 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 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 diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc index 54660a8..4c6eed9 100644 --- a/gcc/rust/rust-session-manager.cc +++ b/gcc/rust/rust-session-manager.cc @@ -444,7 +444,7 @@ Session::compile_crate (const char *filename) "manner by passing the following flag:\n\n" "`-frust-incomplete-and-experimental-compiler-do-not-use`\n\nor by " "defining the following environment variable (any value will " - "do)\n\nGCCRS_INCOMPLETE_AND_EXPERIMENTAL_COMPILER_DO_NOT_USE\n\nFor" + "do)\n\nGCCRS_INCOMPLETE_AND_EXPERIMENTAL_COMPILER_DO_NOT_USE\n\nFor " "cargo-gccrs, this means passing\n\n" "GCCRS_EXTRA_FLAGS=\"-frust-incomplete-and-experimental-compiler-do-not-" "use\"\n\nas an environment variable."); |