diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3prop.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3kernel/l3prop.sty | 70 |
1 files changed, 27 insertions, 43 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty b/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty index eebc40c2520..c3878515e49 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/l3prop.sty @@ -46,7 +46,7 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3prop.dtx 2839 2011-09-17 20:18:23Z bruno $ +\GetIdInfo$Id: l3prop.dtx 3029 2011-12-06 22:47:30Z joseph $ {L3 Experimental property lists} %% \ProvidesExplPackage @@ -62,10 +62,10 @@ \cs_new_protected:Npn \prop_gclear:c #1 { \cs_gset_eq:cN {#1} \c_empty_prop } \cs_new_protected:Npn \prop_clear_new:N #1 { \cs_if_exist:NTF #1 { \prop_clear:N #1 } { \prop_new:N #1 } } -\cs_generate_variant:Nn \prop_clear_new:N {c} +\cs_generate_variant:Nn \prop_clear_new:N { c } \cs_new_protected:Npn \prop_gclear_new:N #1 { \cs_if_exist:NTF #1 { \prop_gclear:N #1 } { \prop_new:N #1 } } -\cs_new_eq:NN \prop_gclear_new:c \prop_gclear:c +\cs_generate_variant:Nn \prop_gclear_new:N { c } \cs_new_eq:NN \prop_set_eq:NN \tl_set_eq:NN \cs_new_eq:NN \prop_set_eq:Nc \tl_set_eq:Nc \cs_new_eq:NN \prop_set_eq:cN \tl_set_eq:cN @@ -74,7 +74,7 @@ \cs_new_eq:NN \prop_gset_eq:Nc \tl_gset_eq:Nc \cs_new_eq:NN \prop_gset_eq:cN \tl_gset_eq:cN \cs_new_eq:NN \prop_gset_eq:cc \tl_gset_eq:cc -\cs_set_protected:Npn \prop_split:NnTF #1#2 +\cs_new_protected:Npn \prop_split:NnTF #1#2 { \exp_args:NNo \prop_split_aux:NnTF #1 { \tl_to_str:n {#2} } } \cs_new_protected:Npn \prop_split_aux:NnTF #1#2 { @@ -86,7 +86,7 @@ } \cs_new:Npn \prop_split_aux:nnnn #1#2#3#4 { #3 #2 } \cs_new_protected:Npn \prop_split_aux:w { } -\cs_set_protected:Npn \prop_split:Nnn #1#2#3 +\cs_new_protected:Npn \prop_split:Nnn #1#2#3 { \prop_split:NnTF #1 {#2} {#3} @@ -187,21 +187,23 @@ \exp_last_unbraced:Noo \prop_if_in_aux:nwn { \tl_to_str:n {#2} } #1 \tl_to_str:n {#2} \q_prop { } - \q_recursion_tail \q_recursion_stop + \q_recursion_tail + \prg_break_point:n { } } \cs_new:Npn \prop_if_in_aux:nwn #1 \q_prop #2 \q_prop #3 { \str_if_eq:xxTF {#1} {#2} - { \prop_if_in_aux:Nw } + { \prop_if_in_aux:N } { \prop_if_in_aux:nwn {#1} } } -\cs_new:Npn \prop_if_in_aux:Nw #1 #2 \q_recursion_stop +\cs_new:Npn \prop_if_in_aux:N #1 { \if_meaning:w \q_prop #1 \prg_return_true: \else: \prg_return_false: \fi: + \prop_map_break: } \cs_generate_variant:Nn \prop_if_in_p:Nn { NV , No } \cs_generate_variant:Nn \prop_if_in_p:Nn { c , cV , co } @@ -231,7 +233,8 @@ \cs_new_nopar:Npn \prop_map_function:NN #1#2 { \exp_last_unbraced:NNo \prop_map_function_aux:Nwn #2 - #1 \q_recursion_tail \q_prop { } \q_recursion_stop + #1 \q_recursion_tail \q_prop { } + \prg_break_point:n { } } \cs_new:Npn \prop_map_function_aux:Nwn #1 \q_prop #2 \q_prop #3 { @@ -243,47 +246,27 @@ } \cs_generate_variant:Nn \prop_map_function:NN { Nc } \cs_generate_variant:Nn \prop_map_function:NN { c , cc } -\int_new:N \g_prop_map_inline_int \cs_new_protected:Npn \prop_map_inline:Nn #1#2 { - \int_gincr:N \g_prop_map_inline_int - \cs_gset:cpn { prop_map_inline_ \int_use:N \g_prop_map_inline_int :nn } + \int_gincr:N \g_prg_map_int + \cs_gset:cpn { prop_map_inline_ \int_use:N \g_prg_map_int :nn } ##1##2 {#2} - \prop_map_function:Nc #1 - { prop_map_inline_ \int_use:N \g_prop_map_inline_int :nn } - \int_gdecr:N \g_prop_map_inline_int + \exp_last_unbraced:Nco \prop_map_function_aux:Nwn + { prop_map_inline_ \int_use:N \g_prg_map_int :nn } + #1 + \q_recursion_tail \q_prop { } + \prg_break_point:n { \int_gdecr:N \g_prg_map_int } } \cs_generate_variant:Nn \prop_map_inline:Nn { c } -\cs_new_eq:NN \prop_map_break: \use_none_delimit_by_q_recursion_stop:w -\cs_new_eq:NN \prop_map_break:n \use_i_delimit_by_q_recursion_stop:nw -\tl_new:N \l_prop_show_tl +\cs_new_eq:NN \prop_map_break: \prg_map_break: +\cs_new_eq:NN \prop_map_break:n \prg_map_break:n \cs_new_protected_nopar:Npn \prop_show:N #1 { - \prop_if_empty:NTF #1 - { - \iow_term:x { Property~list~\token_to_str:N #1~is~empty } - \tl_show:n { } - } - { - \iow_term:x - { - Property~list~\token_to_str:N #1~ - contains~the~pairs~(without~outer~braces): - } - \tl_set:Nx \l_prop_show_tl - { \prop_map_function:NN #1 \prop_show_aux:nn } - \tl_show:n \exp_after:wN \exp_after:wN \exp_after:wN - { \exp_after:wN \prop_show_aux:w \l_prop_show_tl } - } - } -\cs_new:Npn \prop_show_aux:nn #1#2 - { - \iow_newline: > \c_space_tl \c_space_tl - \iow_char:N \{ #1 \iow_char:N \} - \c_space_tl \c_space_tl => \c_space_tl \c_space_tl - \iow_char:N \{ \exp_not:n {#2} \iow_char:N \} + \msg_aux_show:Nnx + #1 + { prop } + { \prop_map_function:NN #1 \msg_aux_show:nn } } -\cs_new:Npn \prop_show_aux:w #1 > ~ { } \cs_generate_variant:Nn \prop_show:N { c } \prg_new_protected_conditional:Npnn \prop_pop:NnN #1#2#3 { T , F , TF } { @@ -312,7 +295,8 @@ \cs_new:Npn \prop_map_tokens:Nn #1#2 { \exp_last_unbraced:Nno \prop_map_tokens_aux:nwn {#2} #1 - \q_recursion_tail \q_prop { } \q_recursion_stop + \q_recursion_tail \q_prop { } + \prg_break_point:n { } } \cs_new:Npn \prop_map_tokens_aux:nwn #1 \q_prop #2 \q_prop #3 { |