]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: dump: Output escaped character values
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Mon, 10 Jul 2023 11:47:37 +0000 (13:47 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:49:36 +0000 (18:49 +0100)
commit0830ce0813e8fcac793b210ce2715712b109ce2c
treed7b7e7973c6203c034980de59f68952dad99d8df
parentded9de82c10f8783a4f2ec52d2930bad07b32468
gccrs: dump: Output escaped character values

Output escaped character values instead of their raw values in string.

gcc/rust/ChangeLog:

* lex/rust-token.cc (escape_special_chars): Add a function that
escape a given string.
(Token::as_string): Add call to escape function for string/char
representations.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/lex/rust-token.cc