[latex3-commits] [git/LaTeX3-latex3-latex3] scan-quark: No need to test for a colon: empty signature leads to a good error later (23c644568)
Bruno Le Floch
bruno at le-floch.fr
Wed May 6 23:53:44 CEST 2020
Repository : https://github.com/latex3/latex3
On branch : scan-quark
Link : https://github.com/latex3/latex3/commit/23c64456851aa97ab42aab642e42444546819736
>---------------------------------------------------------------
commit 23c64456851aa97ab42aab642e42444546819736
Author: Bruno Le Floch <bruno at le-floch.fr>
Date: Wed May 6 23:53:44 2020 +0200
No need to test for a colon: empty signature leads to a good error later
>---------------------------------------------------------------
23c64456851aa97ab42aab642e42444546819736
l3kernel/l3quark.dtx | 19 ++++++-------------
l3kernel/testfiles/m3quark002.tlg | 11 +++++------
2 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/l3kernel/l3quark.dtx b/l3kernel/l3quark.dtx
index 35d88c7d8..025f35d50 100644
--- a/l3kernel/l3quark.dtx
+++ b/l3kernel/l3quark.dtx
@@ -633,7 +633,8 @@
% \cs{q_nil} suffices.
%
% \begin{macro}{\@@_new_test:NNNn, \@@_new_test:Nccn,
-% \@@_new_test_aux:nnNNnnnn, \@@_new_test_choose:nNnnnn}
+% \@@_new_test_aux:nnNNnnnn}
+% \begin{macro}{\@@_new_conditional:Nnnn, \@@_new_conditional:Nxxn}
% \begin{macrocode}
\cs_new_protected:Npn \__kernel_quark_new_test:N #1
{ \@@_new_test_aux:Nx #1 { \@@_module_name:N #1 } }
@@ -676,21 +677,12 @@
\fi:
}
\cs_generate_variant:Nn \@@_new_conditional:Nnnn { Nxx }
-\cs_new_protected:Npn \@@_new_test_aux:nnNNnnnn #1 #2 #3 #4
+\cs_new_protected:Npn \@@_new_test_aux:nnNNnnnn #1 #2 #3 #4 #5
{
- \reverse_if:N \if_bool:N #3
- \__kernel_msg_error:nnx { kernel } { missing-colon }
- { \token_to_str:N #4 }
- \exp_after:wN \use_none:nnnnnnn
- \fi:
- \@@_new_test_choose:nNnnnn {#2} #4
- }
-\cs_new_protected:Npn \@@_new_test_choose:nNnnnn #1 #2 #3
- {
- \cs_if_exist_use:cTF { @@_new_#3_#1:Nnnn } { #2 }
+ \cs_if_exist_use:cTF { @@_new_#5_#2:Nnnn } { #4 }
{
\__kernel_msg_error:nnxx { kernel } { invalid-quark-function }
- { \token_to_str:N #2 } {#1}
+ { \token_to_str:N #4 } {#2}
\use_none:nnn
}
}
@@ -698,6 +690,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{
% \@@_new_test_n:Nnnn, \@@_new_test_nn:Nnnn,
diff --git a/l3kernel/testfiles/m3quark002.tlg b/l3kernel/testfiles/m3quark002.tlg
index ddd8973e2..50f7e82a0 100644
--- a/l3kernel/testfiles/m3quark002.tlg
+++ b/l3kernel/testfiles/m3quark002.tlg
@@ -85,14 +85,13 @@ This is a coding error.
LaTeX has been asked to create quark test function
'\__test_quark_if_recursion_tail_break:nnn' with signature 'nnn', but that
signature is not valid.
-! LaTeX3 Error: Function '\__test_quark_if_recursion_tail_break' contains no
-(LaTeX3) ':'.
+! LaTeX3 Error: Quark test function '\__test_quark_if_recursion_tail_break' is
+(LaTeX3) invalid.
For immediate help type H <return>.
...
l. ...}
This is a coding error.
-Code-level functions must contain ':' to separate the argument specification
-from the function name. This is needed when defining conditionals or variants,
-or when building a parameter text from the number of arguments of the
-function.
+LaTeX has been asked to create quark test function
+'\__test_quark_if_recursion_tail_break' with signature '', but that signature
+is not valid.
============================================================
More information about the latex3-commits
mailing list.