summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty46
1 files changed, 20 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty
index d45f996bdc4..6f82415d186 100644
--- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty
+++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3tl-analysis.sty
@@ -91,32 +91,6 @@
\group_align_safe_end:
\group_end:
}
-\cs_new_protected:Npn \tl_set_analysis:Nn #1#2
- {
- \tl_analysis:n {#2}
- \tl_set_eq:NN #1 \g_tl_analysis_result_tl
- }
-\cs_new_protected:Npn \tl_set_analysis_from_str:Nn #1#2
- {
- \str_gset_other:Nn \g_tl_analysis_result_tl {#2}
- \tl_set:Nx #1
- {
- \exp_after:wN \tl_analysis_from_str_loop:N
- \g_tl_analysis_result_tl \prg_map_break:
- \prg_break_point:n { }
- }
- }
-\group_begin:
- \char_set_catcode_other:N A
- \char_set_catcode_other:N C
- \cs_new_protected:Npn \tl_analysis_from_str_loop:N #1
- {
- #1 \s_tl
- \if_charcode:w #1 ~ A \else: C \fi:
- \int_value:w `#1 \s_tl
- \tl_analysis_from_str_loop:N
- }
-\group_end:
\cs_new_protected:Npn \tl_analysis_setup:n #1
{
\int_set_eq:NN \tex_escapechar:D \c_minus_one
@@ -363,6 +337,26 @@
32 \s_tl
\tl_analysis_ii_loop:w #1 ;
}
+\cs_new_protected:Npn \tl_analysis_map_inline:nn #1
+ {
+ \tl_analysis:n {#1}
+ \int_gincr:N \g_prg_map_int
+ \exp_args:Nc \tl_analysis_map_inline_aux:Nn
+ { tl_analysis_map_inline_ \int_use:N \g_prg_map_int :wNw }
+ }
+\cs_new_protected:Npn \tl_analysis_map_inline_aux:Nn #1#2
+ {
+ \cs_gset_protected:Npn #1 ##1 \s_tl ##2 ##3 \s_tl
+ {
+ \use_none:n ##2
+ #2
+ #1
+ }
+ \exp_after:wN #1
+ \g_tl_analysis_result_tl
+ \s_tl { ? \prg_map_break: } \s_tl
+ \prg_break_point:n { \int_gdecr:N \g_prg_map_int }
+ }
\cs_new_protected:Npn \tl_show_analysis:N #1
{
\exp_args:No \tl_analysis:n {#1}