summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3kernel/l3prop.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3prop.dtx')
-rw-r--r--macros/latex/contrib/l3kernel/l3prop.dtx66
1 files changed, 47 insertions, 19 deletions
diff --git a/macros/latex/contrib/l3kernel/l3prop.dtx b/macros/latex/contrib/l3kernel/l3prop.dtx
index 9cc9111f34..c586164260 100644
--- a/macros/latex/contrib/l3kernel/l3prop.dtx
+++ b/macros/latex/contrib/l3kernel/l3prop.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-05-05}
+% \date{Released 2020-05-11}
%
% \maketitle
%
@@ -617,6 +617,34 @@
% \end{macrocode}
% \end{variable}
%
+% \subsection{Internal auxiliaries}
+%
+% \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_@@_recursion_tail,\q_@@_recursion_stop}
+% Internal recursion 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}
+% \begin{macro}[EXP]{\@@_if_recursion_tail_stop:o}
+% Functions to query recursion quarks.
+% \begin{macrocode}
+\__kernel_quark_new_test:N \@@_if_recursion_tail_stop:n
+\cs_generate_variant:Nn \@@_if_recursion_tail_stop:n { o }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Allocation and initialisation}
%
% \begin{macro}[tested = m3prop001]{\prop_new:N, \prop_new:c}
@@ -718,9 +746,9 @@
% trailing~|=| that we added). For both splits trim spaces and call a
% function (first \cs{@@_from_keyval_key:w} then
% \cs{@@_from_keyval_value:w}), followed by the trimmed material,
-% \cs{q_nil}, the subsequent part of the item, and the trailing |=|'s
-% and \cs{q_stop}. After finding the \meta{key} just store it after
-% \cs{q_stop}. After finding the \meta{value} ignore completely empty
+% \cs{s_@@_mark}, the subsequent part of the item, and the trailing |=|'s
+% and \cs{s_@@_stop}. After finding the \meta{key} just store it after
+% \cs{s_@@_stop}. After finding the \meta{value} ignore completely empty
% items (both trailing~|=| were used as delimiters and all parts are
% empty); if the remaining part~|#2| consists exactly of the second
% trailing~|=| (namely there was exactly one |=|~in the item) then
@@ -754,27 +782,27 @@
\cs_new_protected:Npn \@@_from_keyval:n #1
{
\@@_from_keyval_loop:w \prg_do_nothing: #1 ,
- \q_recursion_tail , \q_recursion_stop
+ \q_@@_recursion_tail , \q_@@_recursion_stop
}
\cs_new_protected:Npn \@@_from_keyval_loop:w #1 ,
{
- \quark_if_recursion_tail_stop:o {#1}
+ \@@_if_recursion_tail_stop:o {#1}
\@@_from_keyval_split:Nw \@@_from_keyval_key:n
- #1 = = \q_stop {#1}
+ #1 = = \s_@@_stop {#1}
\@@_from_keyval_loop:w \prg_do_nothing:
}
\cs_new_protected:Npn \@@_from_keyval_split:Nw #1#2 =
{ \tl_trim_spaces_apply:oN {#2} #1 }
\cs_new_protected:Npn \@@_from_keyval_key:n #1
- { \@@_from_keyval_key:w #1 \q_nil }
-\cs_new_protected:Npn \@@_from_keyval_key:w #1 \q_nil #2 \q_stop
+ { \@@_from_keyval_key:w #1 \s_@@_mark }
+\cs_new_protected:Npn \@@_from_keyval_key:w #1 \s_@@_mark #2 \s_@@_stop
{
\@@_from_keyval_split:Nw \@@_from_keyval_value:n
- \prg_do_nothing: #2 \q_stop {#1}
+ \prg_do_nothing: #2 \s_@@_stop {#1}
}
\cs_new_protected:Npn \@@_from_keyval_value:n #1
- { \@@_from_keyval_value:w #1 \q_nil }
-\cs_new_protected:Npn \@@_from_keyval_value:w #1 \q_nil #2 \q_stop #3#4
+ { \@@_from_keyval_value:w #1 \s_@@_mark }
+\cs_new_protected:Npn \@@_from_keyval_value:w #1 \s_@@_mark #2 \s_@@_stop #3#4
{
\tl_if_empty:nF { #3 #1 #2 }
{
@@ -808,7 +836,7 @@
% \begin{quote}
% \cs{cs_set:Npn} \cs{@@_split_aux:w} |#1| \\
% \quad \cs{@@_pair:wn} \meta{key} \cs{s_@@} |#2| \\
-% \quad |#3| \cs{q_mark} |#4| |#5| \cs{q_stop} \\
+% \quad |#3| \cs{s_@@_mark} |#4| |#5| \cs{s_@@_stop} \\
% \quad |{| |#4| \Arg{true code} \Arg{false code} |}|
% \end{quote}
%
@@ -829,10 +857,10 @@
\cs_new_protected:Npn \@@_split_aux:NnTF #1#2#3#4
{
\cs_set:Npn \@@_split_aux:w ##1
- \@@_pair:wn #2 \s_@@ ##2 ##3 \q_mark ##4 ##5 \q_stop
+ \@@_pair:wn #2 \s_@@ ##2 ##3 \s_@@_mark ##4 ##5 \s_@@_stop
{ ##4 {#3} {#4} }
- \exp_after:wN \@@_split_aux:w #1 \q_mark \use_i:nn
- \@@_pair:wn #2 \s_@@ { } \q_mark \use_ii:nn \q_stop
+ \exp_after:wN \@@_split_aux:w #1 \s_@@_mark \use_i:nn
+ \@@_pair:wn #2 \s_@@ { } \s_@@_mark \use_ii:nn \s_@@_stop
}
\cs_new:Npn \@@_split_aux:w { }
% \end{macrocode}
@@ -1147,7 +1175,7 @@
% most often empty. When the \meta{key} is found in the list,
% \cs{@@_if_in:N} receives \cs{@@_pair:wn}, and if it is
% found as the extra item, the function receives
-% \cs{q_recursion_tail}, easily recognizable.
+% \cs{q_@@_recursion_tail}, easily recognizable.
%
% Here, \cs{prop_map_function:NN} is not sufficient for the mapping,
% since it can only map a single token, and cannot carry the key that
@@ -1157,7 +1185,7 @@
{
\exp_last_unbraced:Noo \@@_if_in:nwwn { \tl_to_str:n {#2} } #1
\@@_pair:wn \tl_to_str:n {#2} \s_@@ { }
- \q_recursion_tail
+ \q_@@_recursion_tail
\prg_break_point:
}
\cs_new:Npn \@@_if_in:nwwn #1#2 \@@_pair:wn #3 \s_@@ #4
@@ -1168,7 +1196,7 @@
}
\cs_new:Npn \@@_if_in:N #1
{
- \if_meaning:w \q_recursion_tail #1
+ \if_meaning:w \q_@@_recursion_tail #1
\prg_return_false:
\else:
\prg_return_true: