]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: Java: Improve the support of the method .formatted().
authorBruno Haible <bruno@clisp.org>
Sat, 27 Jul 2024 14:32:16 +0000 (16:32 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 27 Jul 2024 15:28:14 +0000 (17:28 +0200)
commit1ff84af4b1b20413cc42244fcc9a9e941c773c25
tree2ee1e418182f25eeecee230ed6565f93bef3178b
parent1d449499cbadd2f6b484c5ca371d4e0e193584a1
xgettext: Java: Improve the support of the method .formatted().

* gettext-tools/src/x-java.c (enum token_type_ty): New enum items
token_type_conditional, token_type_colon, token_type_assign,
token_type_operator.
(phase5_get): Recognize all kinds of operators that may occur in expressions.
(extract_parenthesized): Invoke new_sub_region instead of inheriting_region.
Handle 'return' keyword specially. Invoke set_format_flag_on_region instead of
iterating through the region. When encountering an operator, close the
inner_region and open a new inner_region.
* gettext-tools/tests/xgettext-java-8: Add many more test cases.
gettext-tools/src/x-java.c
gettext-tools/tests/xgettext-java-8