Skip to content

Commit

Permalink
Update l3packages to 2023-08-29
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Aug 29, 2023
1 parent aff7cd9 commit ad9b98b
Showing 1 changed file with 85 additions and 1 deletion.
86 changes: 85 additions & 1 deletion texmf/tex/latex/l3packages/xparse/xparse.sty
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}
}
\ExplSyntaxOff
\ProvidesExplPackage{xparse}{2023-02-01}{}
\ProvidesExplPackage{xparse}{2023-08-29}{}
{L3 Experimental document command parser}
\clist_new:N \l__cmd_options_clist
\DeclareOption* { \clist_put_right:NV \l__cmd_options_clist \CurrentOption }
Expand Down Expand Up @@ -210,6 +210,90 @@
\l__cmd_fn_tl
}
\cs_new_eq:NN \__cmd_expandable_grab_u:w \prg_do_nothing:
\cs_gset_protected:Npn \__cmd_get_arg_spec_error:N #1
{
\bool_set_false:N \l__cmd_environment_bool
\tl_set:Nn \l__cmd_fn_tl {#1}
\__cmd_get_arg_spec_error_aux:n { \cs_if_exist:NTF #1 }
}
\cs_gset_protected:Npn \__cmd_get_arg_spec_error:n #1
{
\bool_set_true:N \l__cmd_environment_bool
\str_set:Nx \l__cmd_environment_str {#1}
\__cmd_get_arg_spec_error_aux:n
{ \cs_if_exist:cTF { \l__cmd_environment_str } }
}
\cs_gset_protected:Npn \__cmd_get_arg_spec_error_aux:n #1
{
#1
{
\msg_error:nnx { cmd } { non-xparse }
{ \__cmd_environment_or_command: }
}
{
\msg_error:nnx { cmd } { unknown }
{ \__cmd_environment_or_command: }
}
}
\cs_gset_protected:Npn \__cmd_get_arg_spec:NTF #1#2#3
{
\__kernel_cmd_if_xparse:NTF #1
{
\tl_set:Nx \ArgumentSpecification { \tl_item:Nn #1 { 2 } }
#2
}
{#3}
}
\tl_clear_new:N \ArgumentSpecification
\cs_gset_protected:Npn \__cmd_get_arg_spec:N #1
{
\__cmd_get_arg_spec:NTF #1 { }
{ \__cmd_get_arg_spec_error:N #1 }
}
\cs_gset_protected:Npn \__cmd_get_arg_spec:n #1
{
\exp_args:Nc \__cmd_get_arg_spec:NTF
{ environment~ \tl_to_str:n {#1} }
{ }
{ \__cmd_get_arg_spec_error:n {#1} }
}
\cs_gset_protected:Npn \__cmd_show_arg_spec:N #1
{
\__cmd_get_arg_spec:NTF #1
{ \tl_show:N \ArgumentSpecification }
{ \__cmd_get_arg_spec_error:N #1 }
}
\cs_gset_protected:Npn \__cmd_show_arg_spec:n #1
{
\exp_args:Nc \__cmd_get_arg_spec:NTF
{ environment~ \tl_to_str:n {#1} }
{ \tl_show:N \ArgumentSpecification }
{ \__cmd_get_arg_spec_error:n {#1} }
}
\cs_gset_protected:Npn \GetDocumentCommandArgSpec #1
{
\__cmd_check_definable:nNT {#1} \GetDocumentCommandArgSpec
{ \__cmd_get_arg_spec:N #1 }
}
\cs_gset_eq:NN \GetDocumentEnvironmentArgSpec \__cmd_get_arg_spec:n
\cs_gset_protected:Npn \ShowDocumentCommandArgSpec #1
{
\__cmd_check_definable:nNT {#1} \ShowDocumentCommandArgSpec
{ \__cmd_show_arg_spec:N #1 }
}
\cs_gset_eq:NN \ShowDocumentEnvironmentArgSpec \__cmd_show_arg_spec:n
\msg_set:nnnn { cmd } { non-xparse }
{ \str_uppercase:n #1~not~defined~using~xparse. }
{
You~have~asked~for~the~argument~specification~for~the~#1,~
but~this~was~not~defined~using~xparse.
}
\msg_set:nnnn { cmd } { unknown }
{ Unknown~document~#1. }
{
You~have~asked~for~the~argument~specification~for~the~#1,~
but~it~is~not~defined.
}
%%
%%
%% End of file `xparse.sty'.

0 comments on commit ad9b98b

Please sign in to comment.