Skip to content

Commit

Permalink
Simplify some expansions
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Le Floch committed Dec 1, 2017
1 parent bf32250 commit bd9ea0f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 25 deletions.
21 changes: 8 additions & 13 deletions l3kernel/l3expan.dtx
Expand Up @@ -1612,19 +1612,14 @@
\exp_not:N \q_stop
\exp_not:N \fi:
}
\use:x
{
\cs_new_protected:Npn \exp_not:N \@@_generate_variant:ww
##1 \tl_to_str:n { ma } ##2 \exp_not:N \q_mark
}
{ \@@_generate_variant:wwNw #1 }
\use:x
{
\cs_new_protected:Npn \exp_not:N \@@_generate_variant:wwNw
##1 \tl_to_str:n { pr } ##2 \exp_not:N \q_mark
##3 ##4 \exp_not:N \q_stop
}
{ \cs_set_eq:NN \@@_tmp:w #3 }
\exp_last_unbraced:NNNNo
\cs_new_protected:Npn \@@_generate_variant:ww
#1 { \tl_to_str:n { ma } } #2 \q_mark
{ \@@_generate_variant:wwNw #1 }
\exp_last_unbraced:NNNNo
\cs_new_protected:Npn \@@_generate_variant:wwNw
#1 { \tl_to_str:n { pr } } #2 \q_mark #3 #4 \q_stop
{ \cs_set_eq:NN \@@_tmp:w #3 }
% \end{macrocode}
% \end{macro}
% \end{macro}
Expand Down
17 changes: 8 additions & 9 deletions l3kernel/l3fp-parse.dtx
Expand Up @@ -881,15 +881,14 @@
. \tl_to_str:n { pt } ; \exp_not:N \@@_parse_one_register_int:www
\exp_not:N \q_stop
}
\use:x
{
\cs_new:Npn \exp_not:N \@@_parse_one_register_auxii:wwwNw
##1 . ##2 \tl_to_str:n { pt } ##3 ; ##4##5 \exp_not:N \q_stop
{ ##4 ##1.##2; }
\cs_new:Npn \exp_not:N \@@_parse_one_register_mu:www
##1 \tl_to_str:n { mu } ; ##2 ;
{ \exp_not:N \@@_parse_one_register_dim:ww ##1 ; }
}
\exp_args:Nno \use:nn
{ \cs_new:Npn \@@_parse_one_register_auxii:wwwNw #1 . #2 }
{ \tl_to_str:n { pt } #3 ; #4#5 \q_stop }
{ #4 #1.#2; }
\exp_args:Nno \use:nn
{ \cs_new:Npn \@@_parse_one_register_mu:www #1 }
{ \tl_to_str:n { mu } ; #2 ; }
{ \@@_parse_one_register_dim:ww #1 ; }
\cs_new:Npn \@@_parse_one_register_int:www #1; #2.; #3;
{ \@@_parse:n { #1 e #3 } }
\cs_new:Npn \@@_parse_one_register_dim:ww #1; #2;
Expand Down
4 changes: 1 addition & 3 deletions l3kernel/l3skip.dtx
Expand Up @@ -1343,9 +1343,7 @@
\@@_compare:wNN #1 ? { = \@@_compare_end:w \else: } \q_stop
}
\exp_args:Nno \use:nn
{ \cs_new:Npn \@@_compare:wNN #1 }
{ \tl_to_str:n {pt} }
#2#3
{ \cs_new:Npn \@@_compare:wNN #1 } { \tl_to_str:n {pt} #2#3 }
{
\if_meaning:w = #3
\use:c { @@_compare_#2:w }
Expand Down

0 comments on commit bd9ea0f

Please sign in to comment.