[latex3-commits] [git/LaTeX3-latex3-latex3] master: Remove undocumented \fp_function:Nw and \fp_new_function:Npn from l3kernel (3bcae69)

Bruno Le Floch bruno at le-floch.fr
Thu May 3 18:21:43 CEST 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/3bcae69300e5314a2541c10ab1faebd5ab3ee098

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

commit 3bcae69300e5314a2541c10ab1faebd5ab3ee098
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Thu May 3 18:19:18 2018 +0200

    Remove undocumented \fp_function:Nw and \fp_new_function:Npn from l3kernel


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

3bcae69300e5314a2541c10ab1faebd5ab3ee098
 l3kernel/l3fp-parse.dtx                            |  107 -------------------
 l3kernel/testfiles/m3expl001.luatex.tlg            |    8 --
 l3kernel/testfiles/m3expl001.ptex.tlg              |    8 --
 l3kernel/testfiles/m3expl001.tlg                   |    8 --
 l3kernel/testfiles/m3expl001.uptex.tlg             |    8 --
 l3kernel/testfiles/m3expl001.xetex.tlg             |    8 --
 l3kernel/testfiles/m3expl003.luatex.tlg            |    8 --
 l3kernel/testfiles/m3expl003.ptex.tlg              |    8 --
 l3kernel/testfiles/m3expl003.tlg                   |    8 --
 l3kernel/testfiles/m3expl003.uptex.tlg             |    8 --
 l3kernel/testfiles/m3expl003.xetex.tlg             |    8 --
 l3trial/l3check/l3check.dtx                        |    2 +-
 l3trial/l3fp-extras/l3fp-functions.dtx             |  109 +++++++++++++++++++-
 .../l3fp-extras/testfiles/m3fp-functions002.lvt    |    3 +-
 .../l3fp-extras/testfiles/m3fp-functions002.tlg    |    0
 15 files changed, 111 insertions(+), 190 deletions(-)

diff --git a/l3kernel/l3fp-parse.dtx b/l3kernel/l3fp-parse.dtx
index 9a0f8a2..489f2f1 100644
--- a/l3kernel/l3fp-parse.dtx
+++ b/l3kernel/l3fp-parse.dtx
@@ -2812,113 +2812,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Candidate: defining new \pkg{l3fp} functions}
-%
-% \begin{macro}[EXP]{\fp_function:Nw}
-%   Parse the argument of the function~|#1| using
-%   \cs{@@_parse_operand:Nw} with a precedence of~$16$, and pass the
-%   function and argument to \cs{@@_function_apply:nw}.
-%    \begin{macrocode}
-\cs_new:Npn \fp_function:Nw #1
-  {
-    \exp_after:wN \@@_function_apply:nw
-    \exp_after:wN #1
-    \exp:w
-      \@@_parse_operand:Nw \c_@@_prec_func_int \@@_parse_expand:w
-  }
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\fp_new_function:Npn}
-% \begin{macro}{\@@_new_function:NNnnn, \@@_new_function:Ncfnn}
-% \begin{macro}{\@@_function_args:Nwn}
-%   Save the code provided by the user in the control sequence
-%   |\__fp_user_#1|.  Define |#1| to call \cs{@@_function_apply:nw}
-%   after parsing one operand using \cs{@@_parse_operand:Nw} with
-%   precedence~$16$.  The auxiliary \cs{@@_function_args:Nwn} receives
-%   the user function and the number of arguments (half of the number of
-%   tokens in the parameter text~|#2|), followed by the operand (as a
-%   token list of floating points).  It checks the number of arguments,
-%   and applies the user function to the arguments (without the outer
-%   brace group).
-%    \begin{macrocode}
-\cs_new_protected:Npn \fp_new_function:Npn #1#2#
-  {
-    \@@_new_function:Ncfnn #1
-      { @@_user_ \cs_to_str:N #1 }
-      { \int_eval:n { \tl_count:n {#2} / 2 } }
-      {#2}
-  }
-\cs_new_protected:Npn \@@_new_function:NNnnn #1#2#3#4#5
-  {
-    \cs_new:Npn #1
-      {
-        \exp_after:wN \@@_function_apply:nw \exp_after:wN
-          {
-            \exp_after:wN \@@_function_args:Nwn
-            \exp_after:wN #2
-            \int_value:w #3 \exp_after:wN ; \exp_after:wN
-          }
-        \exp:w
-          \@@_parse_operand:Nw \c_@@_prec_func_int \@@_parse_expand:w
-      }
-    \cs_new:Npn #2 #4 {#5}
-  }
-\cs_generate_variant:Nn \@@_new_function:NNnnn { Ncf }
-\cs_new:Npn \@@_function_args:Nwn #1#2; #3
-  {
-    \int_compare:nNnTF { \tl_count:n {#3} } = {#2}
-      { #1 #3 }
-      {
-        \__kernel_msg_expandable_error:nnnnn
-          { kernel } { fp-num-args } { #1() } {#2} {#2}
-        \c_nan_fp
-      }
-  }
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP]
-%   {
-%     \@@_function_apply:nw,
-%     \@@_function_store:wwNwnn,
-%     \@@_function_store_end:wnnn
-%   }
-%   The auxiliary \cs{@@_function_apply:nw} is called after parsing an
-%   operand, so it receives some code~|#1|, then the operand ending
-%   with~|@|, then a function such as \cs{@@_parse_infix_+:N} (but not
-%   always of this form, see comparisons for instance).  Package the
-%   operand (an array) into a token list with floating point items: this
-%   is the role of \cs{@@_function_store:wwNwnn} and
-%   \cs{@@_function_store_end:wnnn}.  Then apply \cs{@@_parse:n} to the
-%   code~|#1| followed by a brace group with this token list.  This
-%   results in a floating point result, which is then correctly parsed
-%   as the next operand of whatever was looking for one.  The trailing
-%   \cs{s_@@_mark} is used as a special infix operator to indicate that
-%   the next token has already gone through \cs{@@_parse_infix:NN}.
-%    \begin{macrocode}
-\cs_new:Npn \@@_function_apply:nw #1#2 @
-  {
-    \@@_parse:n
-      {
-        \@@_function_store:wwNwnn #2
-          \s_@@_mark \@@_function_store:wwNwnn ;
-          \s_@@_mark \@@_function_store_end:wnnn
-        \s_@@_stop { } { } {#1}
-      }
-    \s_@@_mark
-  }
-\cs_new:Npn \@@_function_store:wwNwnn
-    #1; #2 \s_@@_mark #3#4 \s_@@_stop #5#6
-  { #3 #2 \s_@@_mark #3#4 \s_@@_stop { #5 #6 } { { #1; } } }
-\cs_new:Npn \@@_function_store_end:wnnn
-    #1 \s_@@_stop #2#3#4
-  { #4 {#2} }
-%    \end{macrocode}
-% \end{macro}
-%
 % ^^A end[todo]
 %
 % \subsection{Messages}
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index 6d20d4c..be0aaa5 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -3692,14 +3692,6 @@ Defining \__fp_tuple_map_o:nw on line ...
 Defining \__fp_tuple_map_loop_o:nw on line ...
 Defining \__fp_tuple_mapthread_o:nww on line ...
 Defining \__fp_tuple_mapthread_loop_o:nw on line ...
-Defining \fp_function:Nw on line ...
-Defining \fp_new_function:Npn on line ...
-Defining \__fp_new_function:NNnnn on line ...
-Defining \__fp_new_function:Ncfnn on line ...
-Defining \__fp_function_args:Nwn on line ...
-Defining \__fp_function_apply:nw on line ...
-Defining \__fp_function_store:wwNwnn on line ...
-Defining \__fp_function_store_end:wnnn on line ...
 Defining message LaTeX/kernel/fp-deprecated on line ...
 Defining message LaTeX/kernel/unknown-fp-word on line ...
 Defining message LaTeX/kernel/fp-missing on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index 87588df..313461c 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -3946,14 +3946,6 @@ Defining \__fp_tuple_map_o:nw on line ...
 Defining \__fp_tuple_map_loop_o:nw on line ...
 Defining \__fp_tuple_mapthread_o:nww on line ...
 Defining \__fp_tuple_mapthread_loop_o:nw on line ...
-Defining \fp_function:Nw on line ...
-Defining \fp_new_function:Npn on line ...
-Defining \__fp_new_function:NNnnn on line ...
-Defining \__fp_new_function:Ncfnn on line ...
-Defining \__fp_function_args:Nwn on line ...
-Defining \__fp_function_apply:nw on line ...
-Defining \__fp_function_store:wwNwnn on line ...
-Defining \__fp_function_store_end:wnnn on line ...
 Defining message LaTeX/kernel/fp-deprecated on line ...
 Defining message LaTeX/kernel/unknown-fp-word on line ...
 Defining message LaTeX/kernel/fp-missing on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 9d80104..951b7ba 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -3946,14 +3946,6 @@ Defining \__fp_tuple_map_o:nw on line ...
 Defining \__fp_tuple_map_loop_o:nw on line ...
 Defining \__fp_tuple_mapthread_o:nww on line ...
 Defining \__fp_tuple_mapthread_loop_o:nw on line ...
-Defining \fp_function:Nw on line ...
-Defining \fp_new_function:Npn on line ...
-Defining \__fp_new_function:NNnnn on line ...
-Defining \__fp_new_function:Ncfnn on line ...
-Defining \__fp_function_args:Nwn on line ...
-Defining \__fp_function_apply:nw on line ...
-Defining \__fp_function_store:wwNwnn on line ...
-Defining \__fp_function_store_end:wnnn on line ...
 Defining message LaTeX/kernel/fp-deprecated on line ...
 Defining message LaTeX/kernel/unknown-fp-word on line ...
 Defining message LaTeX/kernel/fp-missing on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index 6010072..f61d01f 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -3946,14 +3946,6 @@ Defining \__fp_tuple_map_o:nw on line ...
 Defining \__fp_tuple_map_loop_o:nw on line ...
 Defining \__fp_tuple_mapthread_o:nww on line ...
 Defining \__fp_tuple_mapthread_loop_o:nw on line ...
-Defining \fp_function:Nw on line ...
-Defining \fp_new_function:Npn on line ...
-Defining \__fp_new_function:NNnnn on line ...
-Defining \__fp_new_function:Ncfnn on line ...
-Defining \__fp_function_args:Nwn on line ...
-Defining \__fp_function_apply:nw on line ...
-Defining \__fp_function_store:wwNwnn on line ...
-Defining \__fp_function_store_end:wnnn on line ...
 Defining message LaTeX/kernel/fp-deprecated on line ...
 Defining message LaTeX/kernel/unknown-fp-word on line ...
 Defining message LaTeX/kernel/fp-missing on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index f9ed97d..ad98e1f 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -3691,14 +3691,6 @@ Defining \__fp_tuple_map_o:nw on line ...
 Defining \__fp_tuple_map_loop_o:nw on line ...
 Defining \__fp_tuple_mapthread_o:nww on line ...
 Defining \__fp_tuple_mapthread_loop_o:nw on line ...
-Defining \fp_function:Nw on line ...
-Defining \fp_new_function:Npn on line ...
-Defining \__fp_new_function:NNnnn on line ...
-Defining \__fp_new_function:Ncfnn on line ...
-Defining \__fp_function_args:Nwn on line ...
-Defining \__fp_function_apply:nw on line ...
-Defining \__fp_function_store:wwNwnn on line ...
-Defining \__fp_function_store_end:wnnn on line ...
 Defining message LaTeX/kernel/fp-deprecated on line ...
 Defining message LaTeX/kernel/unknown-fp-word on line ...
 Defining message LaTeX/kernel/fp-missing on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 6d20d4c..be0aaa5 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -3692,14 +3692,6 @@ Defining \__fp_tuple_map_o:nw on line ...
 Defining \__fp_tuple_map_loop_o:nw on line ...
 Defining \__fp_tuple_mapthread_o:nww on line ...
 Defining \__fp_tuple_mapthread_loop_o:nw on line ...
-Defining \fp_function:Nw on line ...
-Defining \fp_new_function:Npn on line ...
-Defining \__fp_new_function:NNnnn on line ...
-Defining \__fp_new_function:Ncfnn on line ...
-Defining \__fp_function_args:Nwn on line ...
-Defining \__fp_function_apply:nw on line ...
-Defining \__fp_function_store:wwNwnn on line ...
-Defining \__fp_function_store_end:wnnn on line ...
 Defining message LaTeX/kernel/fp-deprecated on line ...
 Defining message LaTeX/kernel/unknown-fp-word on line ...
 Defining message LaTeX/kernel/fp-missing on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index 87588df..313461c 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -3946,14 +3946,6 @@ Defining \__fp_tuple_map_o:nw on line ...
 Defining \__fp_tuple_map_loop_o:nw on line ...
 Defining \__fp_tuple_mapthread_o:nww on line ...
 Defining \__fp_tuple_mapthread_loop_o:nw on line ...
-Defining \fp_function:Nw on line ...
-Defining \fp_new_function:Npn on line ...
-Defining \__fp_new_function:NNnnn on line ...
-Defining \__fp_new_function:Ncfnn on line ...
-Defining \__fp_function_args:Nwn on line ...
-Defining \__fp_function_apply:nw on line ...
-Defining \__fp_function_store:wwNwnn on line ...
-Defining \__fp_function_store_end:wnnn on line ...
 Defining message LaTeX/kernel/fp-deprecated on line ...
 Defining message LaTeX/kernel/unknown-fp-word on line ...
 Defining message LaTeX/kernel/fp-missing on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 9d80104..951b7ba 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -3946,14 +3946,6 @@ Defining \__fp_tuple_map_o:nw on line ...
 Defining \__fp_tuple_map_loop_o:nw on line ...
 Defining \__fp_tuple_mapthread_o:nww on line ...
 Defining \__fp_tuple_mapthread_loop_o:nw on line ...
-Defining \fp_function:Nw on line ...
-Defining \fp_new_function:Npn on line ...
-Defining \__fp_new_function:NNnnn on line ...
-Defining \__fp_new_function:Ncfnn on line ...
-Defining \__fp_function_args:Nwn on line ...
-Defining \__fp_function_apply:nw on line ...
-Defining \__fp_function_store:wwNwnn on line ...
-Defining \__fp_function_store_end:wnnn on line ...
 Defining message LaTeX/kernel/fp-deprecated on line ...
 Defining message LaTeX/kernel/unknown-fp-word on line ...
 Defining message LaTeX/kernel/fp-missing on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index 6010072..f61d01f 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -3946,14 +3946,6 @@ Defining \__fp_tuple_map_o:nw on line ...
 Defining \__fp_tuple_map_loop_o:nw on line ...
 Defining \__fp_tuple_mapthread_o:nww on line ...
 Defining \__fp_tuple_mapthread_loop_o:nw on line ...
-Defining \fp_function:Nw on line ...
-Defining \fp_new_function:Npn on line ...
-Defining \__fp_new_function:NNnnn on line ...
-Defining \__fp_new_function:Ncfnn on line ...
-Defining \__fp_function_args:Nwn on line ...
-Defining \__fp_function_apply:nw on line ...
-Defining \__fp_function_store:wwNwnn on line ...
-Defining \__fp_function_store_end:wnnn on line ...
 Defining message LaTeX/kernel/fp-deprecated on line ...
 Defining message LaTeX/kernel/unknown-fp-word on line ...
 Defining message LaTeX/kernel/fp-missing on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index f9ed97d..ad98e1f 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -3691,14 +3691,6 @@ Defining \__fp_tuple_map_o:nw on line ...
 Defining \__fp_tuple_map_loop_o:nw on line ...
 Defining \__fp_tuple_mapthread_o:nww on line ...
 Defining \__fp_tuple_mapthread_loop_o:nw on line ...
-Defining \fp_function:Nw on line ...
-Defining \fp_new_function:Npn on line ...
-Defining \__fp_new_function:NNnnn on line ...
-Defining \__fp_new_function:Ncfnn on line ...
-Defining \__fp_function_args:Nwn on line ...
-Defining \__fp_function_apply:nw on line ...
-Defining \__fp_function_store:wwNwnn on line ...
-Defining \__fp_function_store_end:wnnn on line ...
 Defining message LaTeX/kernel/fp-deprecated on line ...
 Defining message LaTeX/kernel/unknown-fp-word on line ...
 Defining message LaTeX/kernel/fp-missing on line ...
diff --git a/l3trial/l3check/l3check.dtx b/l3trial/l3check/l3check.dtx
index 3ab9306..4936a5f 100644
--- a/l3trial/l3check/l3check.dtx
+++ b/l3trial/l3check/l3check.dtx
@@ -1869,7 +1869,7 @@
 %
 % \subsubsection{\pkg{l3fp}}
 %
-% |\fp_function:Nn|, |\fp_new_function:Npn|, |\fp_if_exist:(N/c)|(TF),
+% |\fp_if_exist:(N/c)|(TF),
 % |\fp_compare:nNn|(TF), |\fp_(do_until/do_while/until_do/while_do):nNnn|
 % |\fp_to_(scientific/decimal/tl/dim/int):N|, |\fp_use:N|,
 %
diff --git a/l3trial/l3fp-extras/l3fp-functions.dtx b/l3trial/l3fp-extras/l3fp-functions.dtx
index 9be5a5f..00d22d4 100644
--- a/l3trial/l3fp-extras/l3fp-functions.dtx
+++ b/l3trial/l3fp-extras/l3fp-functions.dtx
@@ -1,6 +1,6 @@
 % \iffalse
 %
-%% File l3fp-functions.dtx (C) Copyright 2012-2017 The LaTeX3 Project
+%% File l3fp-functions.dtx (C) Copyright 2012-2018 The LaTeX3 Project
 %
 % It may be distributed and/or modified under the conditions of the
 % LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -65,6 +65,113 @@
 %<@@=fp>
 %    \end{macrocode}
 %
+% \subsection{Previously in \pkg{l3fp}: defining new \pkg{l3fp} functions}
+%
+% \begin{macro}[EXP]{\fp_function:Nw}
+%   Parse the argument of the function~|#1| using
+%   \cs{@@_parse_operand:Nw} with a precedence of~$16$, and pass the
+%   function and argument to \cs{@@_function_apply:nw}.
+%    \begin{macrocode}
+\cs_new:Npn \fp_function:Nw #1
+  {
+    \exp_after:wN \@@_function_apply:nw
+    \exp_after:wN #1
+    \exp:w
+      \@@_parse_operand:Nw \c_@@_prec_func_int \@@_parse_expand:w
+  }
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fp_new_function:Npn}
+% \begin{macro}{\@@_new_function:NNnnn, \@@_new_function:Ncfnn}
+% \begin{macro}{\@@_function_args:Nwn}
+%   Save the code provided by the user in the control sequence
+%   |\__fp_user_#1|.  Define |#1| to call \cs{@@_function_apply:nw}
+%   after parsing one operand using \cs{@@_parse_operand:Nw} with
+%   precedence~$16$.  The auxiliary \cs{@@_function_args:Nwn} receives
+%   the user function and the number of arguments (half of the number of
+%   tokens in the parameter text~|#2|), followed by the operand (as a
+%   token list of floating points).  It checks the number of arguments,
+%   and applies the user function to the arguments (without the outer
+%   brace group).
+%    \begin{macrocode}
+\cs_new_protected:Npn \fp_new_function:Npn #1#2#
+  {
+    \@@_new_function:Ncfnn #1
+      { @@_user_ \cs_to_str:N #1 }
+      { \int_eval:n { \tl_count:n {#2} / 2 } }
+      {#2}
+  }
+\cs_new_protected:Npn \@@_new_function:NNnnn #1#2#3#4#5
+  {
+    \cs_new:Npn #1
+      {
+        \exp_after:wN \@@_function_apply:nw \exp_after:wN
+          {
+            \exp_after:wN \@@_function_args:Nwn
+            \exp_after:wN #2
+            \int_value:w #3 \exp_after:wN ; \exp_after:wN
+          }
+        \exp:w
+          \@@_parse_operand:Nw \c_@@_prec_func_int \@@_parse_expand:w
+      }
+    \cs_new:Npn #2 #4 {#5}
+  }
+\cs_generate_variant:Nn \@@_new_function:NNnnn { Ncf }
+\cs_new:Npn \@@_function_args:Nwn #1#2; #3
+  {
+    \int_compare:nNnTF { \tl_count:n {#3} } = {#2}
+      { #1 #3 }
+      {
+        \__kernel_msg_expandable_error:nnnnn
+          { kernel } { fp-num-args } { #1() } {#2} {#2}
+        \c_nan_fp
+      }
+  }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[EXP]
+%   {
+%     \@@_function_apply:nw,
+%     \@@_function_store:wwNwnn,
+%     \@@_function_store_end:wnnn
+%   }
+%   The auxiliary \cs{@@_function_apply:nw} is called after parsing an
+%   operand, so it receives some code~|#1|, then the operand ending
+%   with~|@|, then a function such as \cs{@@_parse_infix_+:N} (but not
+%   always of this form, see comparisons for instance).  Package the
+%   operand (an array) into a token list with floating point items: this
+%   is the role of \cs{@@_function_store:wwNwnn} and
+%   \cs{@@_function_store_end:wnnn}.  Then apply \cs{@@_parse:n} to the
+%   code~|#1| followed by a brace group with this token list.  This
+%   results in a floating point result, which is then correctly parsed
+%   as the next operand of whatever was looking for one.  The trailing
+%   \cs{s_@@_mark} is used as a special infix operator to indicate that
+%   the next token has already gone through \cs{@@_parse_infix:NN}.
+%    \begin{macrocode}
+\cs_new:Npn \@@_function_apply:nw #1#2 @
+  {
+    \@@_parse:n
+      {
+        \@@_function_store:wwNwnn #2
+          \s_@@_mark \@@_function_store:wwNwnn ;
+          \s_@@_mark \@@_function_store_end:wnnn
+        \s_@@_stop { } { } {#1}
+      }
+    \s_@@_mark
+  }
+\cs_new:Npn \@@_function_store:wwNwnn
+    #1; #2 \s_@@_mark #3#4 \s_@@_stop #5#6
+  { #3 #2 \s_@@_mark #3#4 \s_@@_stop { #5 #6 } { { #1; } } }
+\cs_new:Npn \@@_function_store_end:wnnn
+    #1 \s_@@_stop #2#3#4
+  { #4 {#2} }
+%    \end{macrocode}
+% \end{macro}
+%
 % \subsection{Declaring functions}
 %
 % \begin{macro}{\fp_new_function:n}
diff --git a/l3kernel/testfiles/m3fp-func001.lvt b/l3trial/l3fp-extras/testfiles/m3fp-functions002.lvt
similarity index 96%
rename from l3kernel/testfiles/m3fp-func001.lvt
rename to l3trial/l3fp-extras/testfiles/m3fp-functions002.lvt
index 3ce4c9b..3cbd836 100644
--- a/l3kernel/testfiles/m3fp-func001.lvt
+++ b/l3trial/l3fp-extras/testfiles/m3fp-functions002.lvt
@@ -1,11 +1,12 @@
 %
-% Copyright (C) 2013-2015 LaTeX3 Project
+% Copyright (C) 2013-2015,2018 LaTeX3 Project
 %
 
 \documentclass{minimal}
 \input{regression-test}
 
 \RequirePackage[check-declarations,log-functions]{expl3}
+\RequirePackage{l3fp-extras}
 
 \begin{document}
 \START
diff --git a/l3kernel/testfiles/m3fp-func001.tlg b/l3trial/l3fp-extras/testfiles/m3fp-functions002.tlg
similarity index 100%
rename from l3kernel/testfiles/m3fp-func001.tlg
rename to l3trial/l3fp-extras/testfiles/m3fp-functions002.tlg





More information about the latex3-commits mailing list