]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: libproc_macro: Add member functions to Literal
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 11 Apr 2023 14:24:09 +0000 (16:24 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:34:10 +0000 (18:34 +0100)
commitaae0830fbf1cfeb8f0014e15c2cd2cad54c31afe
tree93aad874c0f2c97a82a5fab6260b1c042439c0e3
parenta79920c2d6d998bff506edbff6c06ebb3c7888c1
gccrs: libproc_macro: Add member functions to Literal

Add some member functions to the Literal structure as well as named
constructors.

libgrust/ChangeLog:

* libproc_macro/literal.cc (Literal__string): Add call
to named constructor.
(Literal__byte_string): Likewise.
(Literal::make_unsigned): Add function.
(Literal::make_signed): Add function.
(Literal::clone): Likewise.
(Literal::make_u8): Likewise.
(Literal::make_u16): Likewise.
(Literal::make_u32): Likewise.
(Literal::make_u64): Likewise.
(Literal::make_i8): Likewise.
(Literal::make_i16): Likewise.
(Literal::make_i32): Likewise.
(Literal::make_i64): Likewise.
(Literal::make_string): Likewise.
(Literal::make_byte_string): Likewise.
(Literal::make_f32): Likewise.
(Literal::make_f64): Likewise.
(make_char): Likewise.
(Literal::make_char): Likewise.
(make_usize): Likewise.
(Literal::make_usize): Likewise.
(make_isize): Likewise.
(Literal::make_isize): Likewise.
* libproc_macro/literal.h: Add prototypes.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
libgrust/libproc_macro/literal.cc
libgrust/libproc_macro/literal.h