diff options
author | badumbatish <tanghocle456@gmail.com> | 2024-07-20 00:44:26 -0700 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-17 16:35:53 +0100 |
commit | 29873023eddd5b1a71fec048431cb90186e23704 (patch) | |
tree | 12dbb68a5a002af4d5302776cdadc09b4123c093 /gcc/rust/ast/rust-fmt.cc | |
parent | af969f521be3f46bbd22e701b4d82e3065b4ecb9 (diff) | |
download | gcc-29873023eddd5b1a71fec048431cb90186e23704.zip gcc-29873023eddd5b1a71fec048431cb90186e23704.tar.gz gcc-29873023eddd5b1a71fec048431cb90186e23704.tar.bz2 |
gccrs: Added options for ParseMode
gcc/rust/ChangeLog:
* ast/rust-fmt.cc (Pieces::collect):
Added options for ParseMode
* ast/rust-fmt.h (collect_pieces): Likewise.
(struct Pieces): Likewise.
* expand/rust-macro-builtins-format-args.cc (MacroBuiltin::format_args_handler):
Likewise.
libgrust/ChangeLog:
* libformat_parser/generic_format_parser/src/lib.rs: Likewise.
* libformat_parser/src/bin.rs: Likewise.
* libformat_parser/src/lib.rs: Likewise.
Diffstat (limited to 'gcc/rust/ast/rust-fmt.cc')
-rw-r--r-- | gcc/rust/ast/rust-fmt.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/rust/ast/rust-fmt.cc b/gcc/rust/ast/rust-fmt.cc index cc48c2e..a29c820 100644 --- a/gcc/rust/ast/rust-fmt.cc +++ b/gcc/rust/ast/rust-fmt.cc @@ -29,9 +29,11 @@ ffi::RustHamster::to_string () const } Pieces -Pieces::collect (const std::string &to_parse, bool append_newline) +Pieces::collect (const std::string &to_parse, bool append_newline, + ffi::ParseMode parse_mode) { - auto handle = ffi::collect_pieces (to_parse.c_str (), append_newline); + auto handle + = ffi::collect_pieces (to_parse.c_str (), append_newline, parse_mode); // this performs multiple copies, can we avoid them maybe? // TODO: Instead of just creating a vec of, basically, `ffi::Piece`s, we |