[latex3-commits] [git/LaTeX3-latex3-latex3] scan-quark: Replace quarks by scan marks in l3debug (99325a68f)
PhelypeOleinik
tex.phelype at gmail.com
Sat Mar 21 02:14:37 CET 2020
Repository : https://github.com/latex3/latex3
On branch : scan-quark
Link : https://github.com/latex3/latex3/commit/99325a68f6808e0b50200539e18f88a9803eda4c
>---------------------------------------------------------------
commit 99325a68f6808e0b50200539e18f88a9803eda4c
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date: Fri Mar 20 22:14:37 2020 -0300
Replace quarks by scan marks in l3debug
>---------------------------------------------------------------
99325a68f6808e0b50200539e18f88a9803eda4c
l3kernel/l3debug.dtx | 48 ++++++++++++++++++++++++++++++++-------
l3kernel/testfiles/m3quark001.tlg | 2 +-
2 files changed, 41 insertions(+), 9 deletions(-)
diff --git a/l3kernel/l3debug.dtx b/l3kernel/l3debug.dtx
index 182fdb1f2..0db379cb0 100644
--- a/l3kernel/l3debug.dtx
+++ b/l3kernel/l3debug.dtx
@@ -131,6 +131,38 @@
\ProvidesExplFile{l3debug.def}{2019-04-06}{}{L3 Debugging support}
% \end{macrocode}
%
+% \begin{variable}{\s_@@_stop}
+% Internal scan marks.
+% \begin{macrocode}
+\scan_new:N \s_@@_stop
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}[EXP]{\@@_use_i_delimit_by_s_stop:nw}
+% Functions to gobble up to a scan mark.
+% \begin{macrocode}
+\cs_new:Npn \@@_use_i_delimit_by_s_stop:nw #1 #2 \s_@@_stop {#1}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{variable}{\q_@@_nil,\q_@@_stop}
+% Internal quarks.
+% \begin{macrocode}
+\quark_new:N \q_@@_recursion_tail
+\quark_new:N \q_@@_recursion_stop
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}[EXP]{\@@_if_recursion_tail_stop:N}
+% Functions to query recursion quarks.
+% \begin{macrocode}
+\__kernel_quark_test_generate:NNNn \@@_if_recursion_tail_stop:N
+ \q_@@_recursion_tail \q_@@_recursion_stop { @@ }
+\cs_new:Npn \@@_use_none_delimit_by_q_recursion_stop:w
+ #1 \q_@@_recursion_stop { }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\debug_on:n, \debug_off:n, \@@_all_on:, \@@_all_off:}
% \begin{macrocode}
\cs_set_protected:Npn \debug_on:n #1
@@ -314,9 +346,9 @@
{ \exp_args:NNf \@@_chk_var_scope_aux:Nn #1 { \cs_to_str:N #2 } }
\cs_new_protected:Npn \@@_chk_var_scope_aux:Nn #1#2
{
- \if:w _ \use_i:nn \use_i_delimit_by_q_stop:nw #2 ? ? \q_stop
+ \if:w _ \use_i:nn \@@_use_i_delimit_by_s_stop:nw #2 ? ? \s_@@_stop
\exp_after:wN \@@_chk_var_scope_aux:NNn
- \use_i_delimit_by_q_stop:nw #2 ? \q_stop
+ \@@_use_i_delimit_by_s_stop:nw #2 ? \s_@@_stop
#1 {#2}
\else:
\exp_args:Nc \@@_chk_var_scope_aux:NNn
@@ -489,16 +521,16 @@
\cs_new:Npn \@@_build_parm_text:n #1
{
\@@_arg_list_from_signature:nNN { 1 } \c_false_bool #1
- \q_recursion_tail \q_recursion_stop
+ \q_@@_recursion_tail \q_@@_recursion_stop
}
\cs_new:Npn \@@_build_arg_list:n #1
{
\@@_arg_list_from_signature:nNN { 1 } \c_true_bool #1
- \q_recursion_tail \q_recursion_stop
+ \q_@@_recursion_tail \q_@@_recursion_stop
}
\cs_new:Npn \@@_arg_list_from_signature:nNN #1 #2 #3
{
- \quark_if_recursion_tail_stop:N #3
+ \@@_if_recursion_tail_stop:N #3
\@@_arg_check_invalid:N #3
\bool_if:NT #2 { \@@_arg_if_braced:NT #3 { \use_none:n } }
\use:n { \c_hash_str \int_eval:n {#1} }
@@ -523,7 +555,7 @@
\exp_end:
}
\cs_new:Npn \@@_parm_terminate:w
- { \exp_after:wN \use_none_delimit_by_q_recursion_stop:w \exp:w }
+ { \exp_after:wN \@@_use_none_delimit_by_q_recursion_stop:w \exp:w }
\prg_new_conditional:Npnn \@@_arg_if_braced:N #1 { T }
{ \exp_args:Nf \@@_arg_if_braced:n { \@@_get_base_form:N #1 } }
\cs_new:Npn \@@_arg_if_braced:n #1
@@ -649,7 +681,7 @@
####2 \tl_to_str:n { -> }
####3 \c_backslash_str \tl_to_str:n { __debug_ }
\cs_to_str:N #1
- ####4 \exp_not:N \q_mark
+ ####4 \exp_not:N \s_@@_stop
{
\exp_not:N \exp_args:Nx \exp_not:N \tex_scantokens:D
{
@@ -663,7 +695,7 @@
}
}
}
- \exp_after:wN \@@_tmp:w \cs_meaning:N #1 \q_mark
+ \exp_after:wN \@@_tmp:w \cs_meaning:N #1 \s_@@_stop
}
% \end{macrocode}
% Some functions, however, won't work with the signature reading setup
diff --git a/l3kernel/testfiles/m3quark001.tlg b/l3kernel/testfiles/m3quark001.tlg
index 09ef8947f..4107c42f3 100644
--- a/l3kernel/testfiles/m3quark001.tlg
+++ b/l3kernel/testfiles/m3quark001.tlg
@@ -90,7 +90,7 @@ already been used for a scan mark.
\s__fp_invalid \s__fp_underflow \s__fp_overflow \s__fp_division \s__fp_exact
\s__fp_tuple \s__sort_mark \s__sort_stop \s__sort_scan_stop \s__str \s__tl
\s__color_stop \s__text_stop \s__bool_mark \s__bool_stop \s__deprecation_mark
-\s__deprecation_stop \s__expl_stop \s__foo .
+\s__deprecation_stop \s__expl_stop \s__debug_stop \s__foo .
============================================================
============================================================
TEST 14: Use none until s__stop (expect nothing)
More information about the latex3-commits
mailing list.