ctf, ir: escape and unescape enumeration FT labels starting with `_`
This is a solution to work with TSDL 1.8 which asks identifiers starting
with `_` to be named without the `_` for viewing and analysis purposes.
Since a variant FT can refer to an enumeration FT tag which also has its
labels starting with `_`, we systematically remove leading `_` in
enumeration FT labels too.
For example:
enum {
_salut,
hello,
__zoom,
_integer,
} tag;
variant <tag> {
A _salut;
B hello;
C __zoom;
D _integer;
} var;
Once in CTF IR, the equivalent is:
enum {
salut,
hello,
_zoom,
integer,
} tag;
variant <tag> {
A salut;
B hello;
C _zoom;
D integer;
} var;
Once back to TSDL (through CTF writer), it is:
enum {
salut,
hello,
__zoom,
_integer,
} tag;
variant <tag> {
A salut;
B hello;
C __zoom;
D _integer;
} var;
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.026555 seconds and 4 git commands to generate.