]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: Vala: Flag strings on which the method 'printf' is used as c-format.
authorBruno Haible <bruno@clisp.org>
Thu, 30 Nov 2023 16:16:36 +0000 (17:16 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 30 Nov 2023 16:32:48 +0000 (17:32 +0100)
commit7e55e5495222fb561be3ac3f7aa36e1f88eac1de
tree90d2e2f65c84b13123eb1f83822c8d75385bb44f
parentef9a0aa385b1cd11c06575a3c5291330f99364d0
xgettext: Vala: Flag strings on which the method 'printf' is used as c-format.

* gettext-tools/src/x-vala.c (token_type_semicolon): New enum item.
(phase3_get): Recognize semicolon tokens.
(phase4_pushback, phase4_pushback_length): New variables.
(phase4_get): Renamed from x_vala_lex. Handle pushback.
(phase4_unget, x_vala_lex, x_vala_unlex): New functions.
(extract_balanced): Handle method invocations .printf and .vprintf. Return when
a semicolon was seen.
(extract_vala): Initialize phase4_pushback_length.
* gettext-tools/tests/xgettext-vala-6: Add tests for printf used as method.
* gettext-tools/tests/xgettext-vala-7: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
* NEWS: Mention the change.
NEWS
gettext-tools/src/x-vala.c
gettext-tools/tests/Makefile.am
gettext-tools/tests/xgettext-vala-6
gettext-tools/tests/xgettext-vala-7 [new file with mode: 0755]