diff options
author | Karl Berry <karl@freefriends.org> | 2011-01-11 23:19:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-01-11 23:19:23 +0000 |
commit | 7bd702012caa7bf7f4c360eacb814e65773e38e0 (patch) | |
tree | 876d8b8ff7baa069560c1614e0dab49d20e74726 /Master/texmf-dist/tex | |
parent | 62764a821e78856fc5c6db6525928247bc194581 (diff) |
xpackages 2126 (10jan11)
git-svn-id: svn://tug.org/texlive/trunk@21031 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty index 7d4cbcba4ec..f2c04ee2d9c 100644 --- a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty +++ b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty @@ -57,7 +57,7 @@ %% ----------------------------------------------------------------------- %% \RequirePackage{l3names} -\GetIdInfo$Id: xparse.dtx 2073 2010-10-13 07:48:20Z joseph $ +\GetIdInfo$Id: xparse.dtx 2125 2011-01-09 15:24:39Z joseph $ {Generic document command parser} \ProvidesExplPackage {\filename}{\filedate}{\fileversion}{\filedescription} @@ -944,6 +944,43 @@ } } \cs_new_eq:NN \xparse_exp_set:cpx \cs_set_nopar:cpx +\cs_new_protected:Npn \parse_get_arg_spec:N #1 { + \cs_if_exist:cTF { l_parse_ \token_to_str:N #1 _arg_spec_tl } + { + \tl_set_eq:Nc \ArgumentSpecification + { l_parse_ \token_to_str:N #1 _arg_spec_tl } + } + { + \msg_kernel_error:nx { unknown-document-command } + { \token_to_str:N #1 } + } +} +\cs_new_protected:Npn \parse_get_arg_spec:n #1 { + \cs_if_exist:cTF { l_parse_ #1 _arg_spec_tl } + { \tl_set_eq:Nc \ArgumentSpecification { l_parse_ #1 _arg_spec_tl } } + { \msg_kernel_error:nx { unknown-document-environment } {#1} } +} +\tl_new:N \ArgumentSpecification +\cs_new_protected:Npn \parse_show_arg_spec:N #1 { + \cs_if_exist:cTF { l_parse_ \token_to_str:N #1 _arg_spec_tl } + { + \tl_set_eq:Nc \ArgumentSpecification + { l_parse_ \token_to_str:N #1 _arg_spec_tl } + \tl_show:N \ArgumentSpecification + } + { + \msg_kernel_error:nx { unknown-document-command } + { \token_to_str:N #1 } + } +} +\cs_new_protected:Npn \parse_show_arg_spec:n #1 { + \cs_if_exist:cTF { l_parse_ #1 _arg_spec_tl } + { + \tl_set_eq:Nc \ArgumentSpecification { l_parse_ #1 _arg_spec_tl } + \tl_show:N \ArgumentSpecification + } + { \msg_kernel_error:nx { unknown-document-environment } {#1} } +} \msg_kernel_new:nnnn { xparse } { command-already-defined } { Command~'#1'~already~defined! } { @@ -1120,6 +1157,10 @@ \cs_new_eq:NN \ReverseBoolean \_xparse_bool_reverse:N \cs_new_eq:NN \SplitArgument \_xparse_split_argument:nnn \cs_new_eq:NN \SplitList \_xparse_split_list:nn +\cs_new_eq:NN \GetDocumentCommandArgSpec \parse_get_arg_spec:N +\cs_new_eq:NN \GetDocumentEnvironmmentArgSpec \parse_get_arg_spec:n +\cs_new_eq:NN \ShowDocumentCommandArgSpec \parse_show_arg_spec:N +\cs_new_eq:NN \ShowDocumentEnvironmentArgSpec \parse_show_arg_spec:n \endinput %% %% End of file `xparse.sty'. |