diff options
author | Mark Wielaard <mark@klomp.org> | 2021-07-25 14:12:42 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2021-07-25 14:54:13 +0200 |
commit | df2b3b15dc95d5d74f6a630ee84296fb5b76c03f (patch) | |
tree | cefadc8af71ae3c09ff21b59e873ffffe1430adc /gcc/rust/rust-backend.h | |
parent | 314b62ec787abdf320fcca8ceb09b8c9bcf72512 (diff) | |
download | gcc-df2b3b15dc95d5d74f6a630ee84296fb5b76c03f.zip gcc-df2b3b15dc95d5d74f6a630ee84296fb5b76c03f.tar.gz gcc-df2b3b15dc95d5d74f6a630ee84296fb5b76c03f.tar.bz2 |
Support byte and byte string literals
A byte literal is an u8 created as a ascii char or hex escape
e.g. b'X'. A byte string literal is a string created from ascii or
hex chars. bytes are represented as u8 and byte strings as str (with
just ascii < 256 chars), but it should really be &'static [u8; n].
Diffstat (limited to 'gcc/rust/rust-backend.h')
-rw-r--r-- | gcc/rust/rust-backend.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/rust/rust-backend.h b/gcc/rust/rust-backend.h index 35271b6..1dd4aba 100644 --- a/gcc/rust/rust-backend.h +++ b/gcc/rust/rust-backend.h @@ -332,6 +332,9 @@ public: virtual Bexpression *string_constant_expression (const std::string &val) = 0; // Get a char literal + virtual Bexpression *char_constant_expression (char c) = 0; + + // Get a char literal virtual Bexpression *wchar_constant_expression (wchar_t c) = 0; // Return an expression for the boolean value VAL. |