[latex3-commits] [l3svn] r6647 - Correct code comments of char_generate.

noreply at latex-project.org noreply at latex-project.org
Sun Aug 14 10:56:40 CEST 2016


Author: bruno
Date: 2016-08-14 10:56:40 +0200 (Sun, 14 Aug 2016)
New Revision: 6647

Modified:
   trunk/l3kernel/l3token.dtx
Log:
Correct code comments of char_generate.


Modified: trunk/l3kernel/l3token.dtx
===================================================================
--- trunk/l3kernel/l3token.dtx	2016-08-13 21:35:41 UTC (rev 6646)
+++ trunk/l3kernel/l3token.dtx	2016-08-14 08:56:40 UTC (rev 6647)
@@ -1419,7 +1419,7 @@
 \cs_new:Npn \__char_generate:nn #1#2
   {
     \exp:w \exp_after:wN
-      \@@_generate_aux:nnw \exp_after:wN 
+      \@@_generate_aux:nnw \exp_after:wN
         { \__int_value:w \__int_eval:w #1 \exp_after:wN }
           {#2} \exp_end:
   }
@@ -1457,7 +1457,7 @@
             \if_int_compare:w #1 < \c_zero       1 \fi:
             \if_int_compare:w #1 > \c_@@_max_int 1 \fi: \exp_stop_f:
             \__msg_kernel_expandable_error:nn { kernel }
-            { char-out-of-range }
+              { char-out-of-range }
           \else:
             \@@_generate_aux:nnw {#1} {#2}
           \fi:
@@ -1512,11 +1512,7 @@
 %   low-level conditional. There are a few things to notice here.
 %   As |^^L| is |\outer| we need to locally set it to avoid a problem.
 %   To get open/close braces into the list, they are set up using |\if_false:|
-%   pairing here and will later be |x|-type expanded into the desired form.
-%   For making spaces, there needs to be an |o|-type expansion of a |\use:n|
-%   (or some other tokenization) to avoid dropping the space. We also
-%   set up active tokens although they are (currently) filtered out by the
-%   interface layer (\tn{Ucharcat} cannot make active tokens).
+%   pairing and are then |x|-type expanded together into the desired form.
 %    \begin{macrocode}
       \int_const:Nn \c_@@_max_int { 255 }
       \tl_set:Nn \l_@@_tmp_tl { \exp_not:N \or: }
@@ -1550,6 +1546,12 @@
       \char_set_catcode_math_subscript:n { 0 }
       \tl_put_right:Nn \l_@@_tmp_tl { \or: ^^@ }
       \tl_put_right:Nn \l_@@_tmp_tl { \or: }
+%    \end{macrocode}
+%   For making spaces, there needs to be an |o|-type expansion of a |\use:n|
+%   (or some other tokenization) to avoid dropping the space. We also
+%   set up active tokens although they are (currently) filtered out by the
+%   interface layer (\tn{Ucharcat} cannot make active tokens).
+%    \begin{macrocode}
       \char_set_catcode_space:n { 0 }
       \tl_put_right:No \l_@@_tmp_tl { \use:n { \or: } ^^@ }
       \char_set_catcode_letter:n { 0 }
@@ -1561,10 +1563,10 @@
 %    \end{macrocode}
 %   Convert the above temporary list into a series of constant token
 %   lists, one for each character code, using \tn{tex_lowercase:D} to
-%   convert |^^@| in each case. The \texttt{x}-type expansion deals with
-%   the |\if_false:| stuff introduced earlier. This is done in three parts
-%   as |^^L| is awkward. Notice that at this stage |^^@| is active. In
-%   format mode this is not needed.
+%   convert |^^@| in each case. The \texttt{x}-type expansion ensures
+%   that \tn{tex_lowercase:D} receives the contents of the token list.
+%   In package mode, |^^L| is awkward hence this is done in three parts.
+%   Notice that at this stage |^^@| is active.
 %    \begin{macrocode}
       \cs_set_protected:Npn \@@_tmp:n #1
         {



More information about the latex3-commits mailing list