[latex3-commits] [git/LaTeX3-latex3-latex3] master: Make an important parsing internal support floating point tuples (a02c9ab)

Bruno Le Floch bruno at le-floch.fr
Sun Feb 25 17:20:29 CET 2018


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

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

commit a02c9ab5e4ddd2176ec3109a3074408a00aa9115
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Sun Feb 25 11:20:29 2018 -0500

    Make an important parsing internal support floating point tuples


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

a02c9ab5e4ddd2176ec3109a3074408a00aa9115
 l3kernel/l3fp-parse.dtx |   28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/l3kernel/l3fp-parse.dtx b/l3kernel/l3fp-parse.dtx
index 541d8f1..4d8fba7 100644
--- a/l3kernel/l3fp-parse.dtx
+++ b/l3kernel/l3fp-parse.dtx
@@ -2069,7 +2069,7 @@
 %
 % \subsection{Main functions}
 %
-% \begin{macro}[EXP]{\@@_parse:n}
+% \begin{macro}[EXP]{\@@_parse:n, \@@_parse_o:n}
 % \begin{macro}[EXP]{\@@_parse_after:ww}
 %   Start an \cs{exp:w} expansion so that \cs{@@_parse:n} expands
 %   in two steps.  The \cs{@@_parse_operand:Nw} function performs
@@ -2090,25 +2090,27 @@
         \@@_parse_expand:w #1
         \s_@@_mark \@@_parse_infix_end:N
       \s_@@_stop
+    \exp_end:
   }
 \cs_new:Npn \@@_parse_after:ww
-    #1@ \@@_parse_infix_end:N \s_@@_stop
-  { \exp_end: #1 }
-%    \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}[EXP]{\@@_parse_o:n}
-% ^^A todo: optimize, comment, make it work for arrays.
-%    \begin{macrocode}
+    #1@ \@@_parse_infix_end:N \s_@@_stop #2 { #2 #1 }
 \cs_new:Npn \@@_parse_o:n #1
   {
-    \exp_after:wN \exp_after:wN
-    \exp_after:wN \@@_exp_after_o:w
-      \@@_parse:n {#1}
+    \exp:w
+      \exp_after:wN \@@_parse_after:ww
+      \exp:w
+        \@@_parse_operand:Nw \c_@@_prec_end_int
+        \@@_parse_expand:w #1
+        \s_@@_mark \@@_parse_infix_end:N
+      \s_@@_stop
+    {
+      \exp_end_continue_f:w
+      \@@_exp_after_any_f:nw { \exp_after:wN \exp_stop_f: }
+    }
   }
 %    \end{macrocode}
 % \end{macro}
+% \end{macro}
 %
 % \begin{macro}[EXP]{\@@_parse_operand:Nw}
 % \begin{macro}[EXP]{\@@_parse_continue:NwN}





More information about the latex3-commits mailing list