[latex3-commits] [git/LaTeX3-latex3-latex3] scan-quark: Replace quarks by scan marks in l3candidates (0437ed60b)

PhelypeOleinik tex.phelype at gmail.com
Sat Mar 21 01:23:48 CET 2020


Repository : https://github.com/latex3/latex3
On branch  : scan-quark
Link       : https://github.com/latex3/latex3/commit/0437ed60bf8db944320ccb57273c586d3a6aa4f9

>---------------------------------------------------------------

commit 0437ed60bf8db944320ccb57273c586d3a6aa4f9
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date:   Fri Mar 20 21:23:48 2020 -0300

    Replace quarks by scan marks in l3candidates


>---------------------------------------------------------------

0437ed60bf8db944320ccb57273c586d3a6aa4f9
 l3kernel/l3candidates.dtx         | 41 ++++++++++++++++++++++++++-------------
 l3kernel/testfiles/m3quark001.tlg |  2 +-
 2 files changed, 29 insertions(+), 14 deletions(-)

diff --git a/l3kernel/l3candidates.dtx b/l3kernel/l3candidates.dtx
index e346f674a..fa325a657 100644
--- a/l3kernel/l3candidates.dtx
+++ b/l3kernel/l3candidates.dtx
@@ -1001,8 +1001,8 @@
 \cs_new:Npn \@@_expandable_error_module:nn #1#2
   {
     \exp_after:wN \exp_after:wN
-    \exp_after:wN \use_none_delimit_by_q_stop:w
-    \use:n { \::error ! ~ #2 : ~ #1 } \q_stop
+    \exp_after:wN \@@_use_none_delimit_by_s_stop:w
+    \use:n { \::error ! ~ #2 : ~ #1 } \s_@@_stop
   }
 %    \end{macrocode}
 % \end{macro}
@@ -1079,6 +1079,14 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{variable}{\s_@@_mark,\s_@@_stop}
+%   Internal scan marks.
+%    \begin{macrocode}
+\scan_new:N \s_@@_mark
+\scan_new:N \s_@@_stop
+%    \end{macrocode}
+% \end{variable}
+%
 % \begin{macro}[EXP, noTF]{\bool_case_true:n, \bool_case_false:n}
 % \begin{macro}{\@@_case:NnTF}
 % \begin{macro}{\@@_case_true:w, \@@_case_false:w, \@@_case_end:nw}
@@ -1104,7 +1112,7 @@
 \cs_new:Npn \@@_case:NnTF #1#2#3#4
   {
     \bool_if:NTF #1 \@@_case_true:w \@@_case_false:w
-    #2 #1 { } \q_mark {#3} \q_mark {#4} \q_stop
+    #2 #1 { } \s_@@_mark {#3} \s_@@_mark {#4} \s_@@_stop
   }
 \cs_new:Npn \@@_case_true:w #1#2
   {
@@ -1118,7 +1126,7 @@
       { \@@_case_false:w }
       { \@@_case_end:nw {#2} }
   }
-\cs_new:Npn \@@_case_end:nw #1#2#3 \q_mark #4#5 \q_stop
+\cs_new:Npn \@@_case_end:nw #1#2#3 \s_@@_mark #4#5 \s_@@_stop
   { \exp_end: #1 #4 }
 %    \end{macrocode}
 % \end{macro}
@@ -1131,6 +1139,13 @@
 %<@@=prop>
 %    \end{macrocode}
 %
+% \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{macro}[EXP]
 %   {\prop_rand_key_value:N, \prop_rand_key_value:c}
 % \begin{macro}[EXP]{\@@_rand_item:w}
@@ -1146,14 +1161,14 @@
       {
         \exp_after:wN \@@_rand_item:w
         \int_value:w \int_rand:nn { 1 } { \prop_count:N #1 }
-        #1 \q_stop
+        #1 \s_@@_stop
       }
   }
 \cs_generate_variant:Nn \prop_rand_key_value:N { c }
 \cs_new:Npn \@@_rand_item:w #1 \s_@@ \@@_pair:wn #2 \s_@@ #3
   {
     \int_compare:nNnF {#1} > 1
-      { \use_i_delimit_by_q_stop:nw { \exp_not:n { {#2} {#3} } } }
+      { \@@_use_i_delimit_by_s_stop:nw { \exp_not:n { {#2} {#3} } } }
     \exp_after:wN \@@_rand_item:w
     \int_value:w \int_eval:n { #1 - 1 } \s_@@
   }
@@ -1189,25 +1204,25 @@
 %   worrying about which is longer.
 %    \begin{macrocode}
 \cs_new:Npn \seq_mapthread_function:NNN #1#2#3
-  { \exp_after:wN \@@_mapthread_function:wNN #2 \q_stop #1 #3 }
-\cs_new:Npn \@@_mapthread_function:wNN \s_@@ #1 \q_stop #2#3
+  { \exp_after:wN \@@_mapthread_function:wNN #2 \s_@@_stop #1 #3 }
+\cs_new:Npn \@@_mapthread_function:wNN \s_@@ #1 \s_@@_stop #2#3
   {
-    \exp_after:wN \@@_mapthread_function:wNw #2 \q_stop #3
+    \exp_after:wN \@@_mapthread_function:wNw #2 \s_@@_stop #3
       #1 { ? \prg_break: } { }
     \prg_break_point:
   }
-\cs_new:Npn \@@_mapthread_function:wNw \s_@@ #1 \q_stop #2
+\cs_new:Npn \@@_mapthread_function:wNw \s_@@ #1 \s_@@_stop #2
   {
     \@@_mapthread_function:Nnnwnn #2
       #1 { ? \prg_break: } { }
-    \q_stop
+    \s_@@_stop
   }
-\cs_new:Npn \@@_mapthread_function:Nnnwnn #1#2#3#4 \q_stop #5#6
+\cs_new:Npn \@@_mapthread_function:Nnnwnn #1#2#3#4 \s_@@_stop #5#6
   {
     \use_none:n #2
     \use_none:n #5
     #1 {#3} {#6}
-    \@@_mapthread_function:Nnnwnn #1 #4 \q_stop
+    \@@_mapthread_function:Nnnwnn #1 #4 \s_@@_stop
   }
 \cs_generate_variant:Nn \seq_mapthread_function:NNN { Nc , c , cc }
 %    \end{macrocode}
diff --git a/l3kernel/testfiles/m3quark001.tlg b/l3kernel/testfiles/m3quark001.tlg
index f81dc8d87..ff7afccc7 100644
--- a/l3kernel/testfiles/m3quark001.tlg
+++ b/l3kernel/testfiles/m3quark001.tlg
@@ -89,7 +89,7 @@ already been used for a scan mark.
 \s__keys_stop \s__fp \s__fp_expr_mark \s__fp_expr_stop \s__fp_mark \s__fp_stop
 \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__tl
-\s__color_stop \s__text_stop \s__foo .
+\s__color_stop \s__text_stop \s__bool_mark \s__bool_stop \s__foo .
 ============================================================
 ============================================================
 TEST 14: Use none until s__stop (expect nothing)





More information about the latex3-commits mailing list.