[latex3-commits] [git/LaTeX3-latex3-latex3] scan-quark: Replace quarks by scan marks in xtemplate (cf5c37d87)

PhelypeOleinik tex.phelype at gmail.com
Sat Mar 21 04:23:32 CET 2020


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

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

commit cf5c37d8710ff816e44058f35959adadd2a7178b
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date:   Sat Mar 21 00:23:32 2020 -0300

    Replace quarks by scan marks in xtemplate


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

cf5c37d8710ff816e44058f35959adadd2a7178b
 l3packages/xtemplate/xtemplate.dtx | 49 ++++++++++++++++++++++++++++----------
 1 file changed, 36 insertions(+), 13 deletions(-)

diff --git a/l3packages/xtemplate/xtemplate.dtx b/l3packages/xtemplate/xtemplate.dtx
index 2236b30f9..2c5b88dab 100644
--- a/l3packages/xtemplate/xtemplate.dtx
+++ b/l3packages/xtemplate/xtemplate.dtx
@@ -858,6 +858,29 @@
 %    \end{macrocode}
 % \end{variable}
 %
+% \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{variable}{\q_@@_nil}
+%   Internal quarks.
+%    \begin{macrocode}
+\quark_new:N \q_@@_nil
+%    \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}[pTF]{\@@_if_nil:n}
+%   Branching quark conditional.
+%    \begin{macrocode}
+\__kernel_quark_conditional_generate:NNnn \@@_if_nil:N
+  \q_@@_nil { @@ } { F }
+%    \end{macrocode}
+% \end{macro}
+%
 % \subsection{Variant of prop functions}
 %
 % \begin{macro}[TF]{\prop_get:NoN}
@@ -1300,7 +1323,7 @@
           {
             \tl_clear:N \l_@@_key_name_tl
             \exp_after:wN \@@_split_keytype_aux:w
-              \l_@@_tmp_tl \q_stop
+              \l_@@_tmp_tl \s_@@_stop
           }
       }
       {
@@ -1311,7 +1334,7 @@
 \use:x
   {
     \cs_new_protected:Npn \exp_not:N \@@_split_keytype_aux:w
-      ##1 \token_to_str:N : ##2 \exp_not:N \q_stop
+      ##1 \token_to_str:N : ##2 \exp_not:N \s_@@_stop
       {
         \tl_put_right:Nx \exp_not:N \l_@@_key_name_tl
           { \exp_not:N \tl_to_str:n {##1} }
@@ -1319,7 +1342,7 @@
           {
             \tl_put_right:Nn \exp_not:N \l_@@_key_name_tl
               { \token_to_str:N : }
-            \exp_not:N \@@_split_keytype_aux:w ##2 \exp_not:N \q_stop
+            \exp_not:N \@@_split_keytype_aux:w ##2 \exp_not:N \s_@@_stop
           }
           {
             \exp_not:N \tl_if_empty:NTF \exp_not:N \l_@@_key_name_tl
@@ -1357,7 +1380,7 @@
         \tl_if_in:nnT {#1} {##1}
           {
             \cs_set:Npn \@@_split_keytype_arg_aux:w
-              ####1 ##1 ####2 \q_stop
+              ####1 ##1 ####2 \s_@@_stop
               {
                 \tl_if_empty:nT {####1}
                   {
@@ -1366,7 +1389,7 @@
                     \seq_map_break:
                   }
               }
-            \@@_split_keytype_arg_aux:w #1 \q_stop
+            \@@_split_keytype_arg_aux:w #1 \s_@@_stop
           }
       }
     \seq_map_function:NN \c_@@_keytypes_arg_seq
@@ -1374,7 +1397,7 @@
   }
 \cs_generate_variant:Nn \@@_split_keytype_arg:n { o }
 \cs_new:Npn \@@_split_keytype_arg_aux:n #1 { }
-\cs_new:Npn \@@_split_keytype_arg_aux:w #1 \q_stop { }
+\cs_new:Npn \@@_split_keytype_arg_aux:w #1 \s_@@_stop { }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -1628,7 +1651,7 @@
               }
               {
                 \tl_if_in:nnTF {#1} { global }
-                  { \@@_parse_vars_elt_aux:w #1 \q_stop }
+                  { \@@_parse_vars_elt_aux:w #1 \s_@@_stop }
                   {
                     \msg_error:nnx { xtemplate } { bad-variable }
                       { \tl_to_str:n {#1} }
@@ -1637,7 +1660,7 @@
           }
       }
   }
-\cs_new_protected:Npn \@@_parse_vars_elt_aux:w #1 global #2 \q_stop
+\cs_new_protected:Npn \@@_parse_vars_elt_aux:w #1 global #2 \s_@@_stop
   {
     \tl_if_empty:nTF {#1}
       {
@@ -2060,10 +2083,10 @@
     \bool_set_false:N \l_@@_global_bool
     \tl_if_in:onT \l_@@_var_tl { global }
       {
-        \exp_after:wN \@@_find_global_aux:w \l_@@_var_tl \q_stop
+        \exp_after:wN \@@_find_global_aux:w \l_@@_var_tl \s_@@_stop
       }
   }
-\cs_new_protected:Npn \@@_find_global_aux:w  #1 global #2 \q_stop
+\cs_new_protected:Npn \@@_find_global_aux:w  #1 global #2 \s_@@_stop
   {
     \tl_set:Nn \l_@@_var_tl {#2}
     \bool_set_true:N \l_@@_global_bool
@@ -2377,16 +2400,16 @@
       \l_@@_value_tl
       {
         \exp_after:wN \@@_key_to_value_auxii:w \l_@@_value_tl
-          \q_mark global \q_nil \q_stop
+          \s_@@_mark global \q_@@_nil \s_@@_stop
       }
       {
         \msg_error:nnx { xtemplate } { unknown-attribute }
           { \l_@@_tmp_tl }
       }
   }
-\cs_new_protected:Npn \@@_key_to_value_auxii:w #1 global #2#3 \q_stop
+\cs_new_protected:Npn \@@_key_to_value_auxii:w #1 global #2#3 \s_@@_stop
   {
-    \quark_if_nil:NF #2
+    \@@_if_nil:NF #2
       { \tl_set:Nn \l_@@_value_tl {#2} }
   }
 %    \end{macrocode}





More information about the latex3-commits mailing list.