diff options
author | Raiki Tamura <tamaron1203@gmail.com> | 2022-11-16 17:15:24 +0900 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-02-21 12:36:51 +0100 |
commit | 0ef795c3278e35cdd274f22bb0ab9783a983af57 (patch) | |
tree | 6d66e92f7ecc2d42449c5489f9460ff358dfbf1e /gcc/rust/util/rust-optional.h | |
parent | 78c70a50f7441d909f9cc3f23c6e970a1d7f1612 (diff) | |
download | gcc-0ef795c3278e35cdd274f22bb0ab9783a983af57.zip gcc-0ef795c3278e35cdd274f22bb0ab9783a983af57.tar.gz gcc-0ef795c3278e35cdd274f22bb0ab9783a983af57.tar.bz2 |
gccrs: Improve lexer dump
gcc/rust/ChangeLog:
* lex/rust-lex.cc (Lexer::Lexer): Add `dump_lex` boolean flag.
(Lexer::skip_token): Dump tokens if flag is enabled.
(Lexer::dump_and_skip): New function.
* lex/rust-lex.h: Include optional.h and declare functions.
* parse/rust-parse-impl.h (Parser::debug_dump_lex_output): Remove old
unused function.
* parse/rust-parse.h: Likewise.
* rust-session-manager.cc (Session::compile_crate): Pass lexer dump
option to lexer.
(Session::dump_lex): New function.
* util/rust-optional.h: Add missing constructor.
Signed-off-by: Raiki Tamura <tamaron1203@gmail.com>
Diffstat (limited to 'gcc/rust/util/rust-optional.h')
-rw-r--r-- | gcc/rust/util/rust-optional.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-optional.h b/gcc/rust/util/rust-optional.h index eba3a78..d734982 100644 --- a/gcc/rust/util/rust-optional.h +++ b/gcc/rust/util/rust-optional.h @@ -194,6 +194,7 @@ private: public: Optional (const Optional &other) = default; Optional (Optional &&other) = default; + Optional &operator= (Optional &&other) = default; static Optional<T &> some (T &value) { |