From: Bruno Haible Date: Sat, 27 Jul 2024 17:00:30 +0000 (+0200) Subject: xgettext: Vala: Recognize the '~' operator. X-Git-Tag: v0.23~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cacfa1915913efb630c46b51b2b220a8dd6ac392;p=thirdparty%2Fgettext.git xgettext: Vala: Recognize the '~' operator. * gettext-tools/src/x-vala.c (phase3_get): Recognize '~' as operator. --- diff --git a/gettext-tools/src/x-vala.c b/gettext-tools/src/x-vala.c index 1c503168e..cbcf6146b 100644 --- a/gettext-tools/src/x-vala.c +++ b/gettext-tools/src/x-vala.c @@ -393,7 +393,7 @@ enum token_type_ty token_type_assign, /* = += -= *= /= %= <<= >>= &= |= ^= */ token_type_return, /* return */ token_type_plus, /* + */ - token_type_arithmetic_operator, /* - * / % << >> & | ^ */ + token_type_arithmetic_operator, /* - * / % << >> & | ^ ~ */ token_type_equality_test_operator, /* == < > >= <= != */ token_type_logic_operator, /* ! && || */ token_type_comma, /* , */ @@ -1125,6 +1125,10 @@ phase3_get (token_ty *tp) return; } + case '~': + tp->type = last_token_type = token_type_arithmetic_operator; + return; + case '=': { int c2 = phase2_getc ();