[latex3-commits] [l3svn] r6904 - Check that embellishments are all distinct.
noreply at latex-project.org
noreply at latex-project.org
Sun Feb 12 18:23:11 CET 2017
Author: bruno
Date: 2017-02-12 18:23:10 +0100 (Sun, 12 Feb 2017)
New Revision: 6904
Modified:
trunk/l3packages/xparse/testfiles/xparse004.luatex.tlg
trunk/l3packages/xparse/testfiles/xparse004.lvt
trunk/l3packages/xparse/testfiles/xparse004.tlg
trunk/l3packages/xparse/xparse.dtx
Log:
Check that embellishments are all distinct.
Modified: trunk/l3packages/xparse/testfiles/xparse004.luatex.tlg
===================================================================
--- trunk/l3packages/xparse/testfiles/xparse004.luatex.tlg 2017-02-12 16:59:39 UTC (rev 6903)
+++ trunk/l3packages/xparse/testfiles/xparse004.luatex.tlg 2017-02-12 17:23:10 UTC (rev 6904)
@@ -456,6 +456,31 @@
.................................................
. LaTeX info: "xparse/define-command"
.
+. Defining command \foo with sig. 'e{__}' on line ....
+.................................................
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!
+! LaTeX error: "xparse/bad-arg-spec"
+!
+! Bad argument specification 'e{__}' for command '\foo'.
+!
+! See the LaTeX3 documentation for further information.
+!
+! For immediate help type H <return>.
+!...............................................
+l. ... }
+|'''''''''''''''''''''''''''''''''''''''''''''''
+| This is a coding error.
+|
+| The argument specification provided was not valid: one or more mandatory
+| pieces of information were missing.
+|
+| LaTeX will ignore this entire definition.
+|...............................................
+> \foo=undefined.
+.................................................
+. LaTeX info: "xparse/define-command"
+.
. Defining command \foo with sig. '+>{\ReverseBoolean }' on line ....
.................................................
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -1021,7 +1046,7 @@
.
. Redefining command \foo with sig.
. '+D<>{####}+G{####}+t*+E{_^}{{1####}{2####}}+l+m+R(){####}+u{...}+v' on line
-. 231.
+. 233.
.................................................
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
@@ -1111,7 +1136,7 @@
. LaTeX info: "xparse/redefine-command"
.
. Redefining command \foo with sig. 'E{_^}{{##2}{##3}}E{*+}{{##1}}m' on line
-. 265.
+. 267.
.................................................
{{\C }{-NoValue-}}{\E }|{\C }{-NoValue-}|\E
{\A }{\E }|{{\A }{\E }}{-NoValue-}|\E
@@ -1144,7 +1169,7 @@
. LaTeX info: "xparse/redefine-command"
.
. Redefining command \foobar with sig. 'D<>{##2}O{##4##1}mO{##3##5}m' on line
-. 280.
+. 282.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
@@ -1546,7 +1571,7 @@
. LaTeX info: "xparse/redefine-command"
.
. Redefining command \foo with sig. 'E{^_}{{##2}{\DO WN}}O{####}m' on line
-. 379.
+. 381.
.................................................
({##}{\DO WN})(##)(\A )
({\A }{\DO WN})(\A )(\B )
Modified: trunk/l3packages/xparse/testfiles/xparse004.lvt
===================================================================
--- trunk/l3packages/xparse/testfiles/xparse004.lvt 2017-02-12 16:59:39 UTC (rev 6903)
+++ trunk/l3packages/xparse/testfiles/xparse004.lvt 2017-02-12 17:23:10 UTC (rev 6904)
@@ -133,6 +133,8 @@
\cs_log:N \foo
\DeclareDocumentCommand \foo { + >{\ReverseBoolean} } { }
\cs_log:N \foo
+ \DeclareDocumentCommand \foo { e { _ _ } } { }
+ \cs_log:N \foo
\DeclareExpandableDocumentCommand \foo { + >{\ReverseBoolean} } { }
\cs_log:N \foo
}
Modified: trunk/l3packages/xparse/testfiles/xparse004.tlg
===================================================================
--- trunk/l3packages/xparse/testfiles/xparse004.tlg 2017-02-12 16:59:39 UTC (rev 6903)
+++ trunk/l3packages/xparse/testfiles/xparse004.tlg 2017-02-12 17:23:10 UTC (rev 6904)
@@ -456,6 +456,31 @@
.................................................
. LaTeX info: "xparse/define-command"
.
+. Defining command \foo with sig. 'e{__}' on line ....
+.................................................
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!
+! LaTeX error: "xparse/bad-arg-spec"
+!
+! Bad argument specification 'e{__}' for command '\foo'.
+!
+! See the LaTeX3 documentation for further information.
+!
+! For immediate help type H <return>.
+!...............................................
+l. ... }
+|'''''''''''''''''''''''''''''''''''''''''''''''
+| This is a coding error.
+|
+| The argument specification provided was not valid: one or more mandatory
+| pieces of information were missing.
+|
+| LaTeX will ignore this entire definition.
+|...............................................
+> \foo=undefined.
+.................................................
+. LaTeX info: "xparse/define-command"
+.
. Defining command \foo with sig. '+>{\ReverseBoolean }' on line ....
.................................................
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -1021,7 +1046,7 @@
.
. Redefining command \foo with sig.
. '+D<>{####}+G{####}+t*+E{_^}{{1####}{2####}}+l+m+R(){####}+u{...}+v' on line
-. 231.
+. 233.
.................................................
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
@@ -1111,7 +1136,7 @@
. LaTeX info: "xparse/redefine-command"
.
. Redefining command \foo with sig. 'E{_^}{{##2}{##3}}E{*+}{{##1}}m' on line
-. 265.
+. 267.
.................................................
{{\C }{-NoValue-}}{\E }|{\C }{-NoValue-}|\E
{\A }{\E }|{{\A }{\E }}{-NoValue-}|\E
@@ -1144,7 +1169,7 @@
. LaTeX info: "xparse/redefine-command"
.
. Redefining command \foobar with sig. 'D<>{##2}O{##4##1}mO{##3##5}m' on line
-. 280.
+. 282.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
@@ -1546,7 +1571,7 @@
. LaTeX info: "xparse/redefine-command"
.
. Redefining command \foo with sig. 'E{^_}{{##2}{\DO WN}}O{####}m' on line
-. 379.
+. 381.
.................................................
({##}{\DO WN})(##)(\A )
({\A }{\DO WN})(\A )(\B )
Modified: trunk/l3packages/xparse/xparse.dtx
===================================================================
--- trunk/l3packages/xparse/xparse.dtx 2017-02-12 16:59:39 UTC (rev 6903)
+++ trunk/l3packages/xparse/xparse.dtx 2017-02-12 17:23:10 UTC (rev 6904)
@@ -185,7 +185,7 @@
% \emph{value}. If a key is not present, |-NoValue-| is returned.
% The returned data is a token list comprising one braced entry per key,
% ordered as for the key list in the argument specification. Given as
-% \texttt{e}\marg{tokens}.
+% \texttt{e}\marg{tokens}. All \meta{tokens} must be distinct.
% \emph{This is an experimental type}.
% \item[E] As for \texttt{e} but returns one or more \meta{defaults}
% if values are not given: \texttt{E}\marg{tokens}\marg{defaults}. See
@@ -1631,6 +1631,7 @@
% \@@_normalize_type_G:w,
% \@@_normalize_type_t:w,
% }
+% \begin{macro}[aux]{\@@_normalize_E_unique_check:w}
% Optional argument types. Check that all required data is present
% (and consists of single tokens if applicable) and check for
% forbidden types for expandable commands. For \texttt{E}-type
@@ -1655,12 +1656,21 @@
\quark_if_recursion_tail_stop_do:nn {#2} { \@@_bad_arg_spec:wn }
\tl_if_blank:nT {#1} { \@@_bad_arg_spec:wn }
\tl_map_function:nN {#1} \@@_single_token_check:n
+ \@@_normalize_E_unique_check:w #1 \q_nil \q_stop
\int_compare:nNnT { \tl_count:n {#2} } > { \tl_count:n {#1} }
{ \@@_bad_arg_spec:wn }
\tl_put_right:Nn \l_@@_arg_spec_tl { E {#1} {#2} }
\tl_put_right:Nn \l_@@_last_delimiters_tl {#1}
\@@_normalize_arg_spec_loop:n
}
+\cs_new_protected:Npn \@@_normalize_E_unique_check:w #1#2 \q_stop
+ {
+ \quark_if_nil:NF #1
+ {
+ \tl_if_in:nnT {#2} {#1} { \@@_bad_arg_spec:wn }
+ \@@_normalize_E_unique_check:w #2 \q_stop
+ }
+ }
\cs_new_protected:Npn \@@_normalize_type_G:w #1
{
\quark_if_recursion_tail_stop_do:nn {#1} { \@@_bad_arg_spec:wn }
@@ -1679,6 +1689,7 @@
}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}
% {
More information about the latex3-commits
mailing list