[latex3-commits] [git/LaTeX3-latex3-latex3] master: Implement \peek_analysis_map_inline:n (e529d2b4a)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Dec 3 17:27:34 CET 2020


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

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

commit e529d2b4abaced52b63882900598e44e86a87952
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Tue Jul 14 16:01:28 2020 +0200

    Implement \peek_analysis_map_inline:n


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

e529d2b4abaced52b63882900598e44e86a87952
 l3kernel/l3tl-analysis.dtx | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/l3kernel/l3tl-analysis.dtx b/l3kernel/l3tl-analysis.dtx
index 59b41d349..d5114a5e8 100644
--- a/l3kernel/l3tl-analysis.dtx
+++ b/l3kernel/l3tl-analysis.dtx
@@ -99,6 +99,30 @@
 %   made by the \meta{inline function} remain in effect after the loop.
 % \end{function}
 %
+% \begin{function}[added = 2020-07-14]{\peek_analysis_map_inline:n}
+%   \begin{syntax}
+%     \cs{peek_analysis_map_inline:n} \Arg{inline function}
+%   \end{syntax}
+%   Applies the \meta{inline function} to each individual \meta{token}
+%   in the input stream that follows.  The \meta{inline function}
+%   receives three arguments as explained above.  As all other mappings
+%   the mapping is done at the current group level, \emph{i.e.}~any
+%   local assignments made by the \meta{inline function} remain in
+%   effect after the loop.  The tokens are removed from the input
+%   stream.  The loop can be stopped by \cs{peek_analysis_map_break:}.
+%   Within the code, \cs{l_peek_token} is set equal (as a token, not a
+%   token list) to the token under consideration.
+% \end{function}
+%
+% \begin{function}[added = 2020-07-14]{\peek_analysis_map_break:, \peek_analysis_map_break:n}
+%   \begin{syntax}
+%     \cs{peek_analysis_map_inline:n} |{| \dots{} \cs{peek_analysis_map_break:n} \Arg{code} |}|
+%   \end{syntax}
+%   Stops the \cs{peek_analysis_map_inline:n} loop from seeking more
+%   tokens, and inserts \meta{code} in the input stream (empty for
+%   \cs{peek_analysis_map_break:}).
+% \end{function}
+%
 % \end{documentation}
 %
 % \begin{implementation}





More information about the latex3-commits mailing list.