]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
xgettext: Vala: Recognize the '~' operator.
authorBruno Haible <bruno@clisp.org>
Sat, 27 Jul 2024 17:00:30 +0000 (19:00 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 27 Jul 2024 17:05:56 +0000 (19:05 +0200)
* gettext-tools/src/x-vala.c (phase3_get): Recognize '~' as operator.

gettext-tools/src/x-vala.c

index 1c503168e2a78e5e0a0487e4c071ed5e1c7915e9..cbcf6146b4a7d438d0d1f322ebff869061ffac83 100644 (file)
@@ -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 ();