diff options
author | Karl Berry <karl@freefriends.org> | 2022-12-09 21:17:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-12-09 21:17:19 +0000 |
commit | 6b2822bb6f0b4665eb52c50c851f1fd8e41d2a90 (patch) | |
tree | 8a17230c983aea0ca72592cf8026fe9839b08497 /Master/texmf-dist/tex | |
parent | a9617b5e430950e064a7ef652ed7d3e649cd3b37 (diff) |
lt3rawobjects (9dec22)
git-svn-id: svn://tug.org/texlive/trunk@65230 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/lt3rawobjects/lt3rawobjects.sty | 90 |
1 files changed, 87 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/lt3rawobjects/lt3rawobjects.sty b/Master/texmf-dist/tex/latex/lt3rawobjects/lt3rawobjects.sty index 69941dd2660..2c9e25dcce3 100644 --- a/Master/texmf-dist/tex/latex/lt3rawobjects/lt3rawobjects.sty +++ b/Master/texmf-dist/tex/latex/lt3rawobjects/lt3rawobjects.sty @@ -26,7 +26,7 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3}[2022-04-10] -\ProvidesExplPackage{lt3rawobjects}{2022/11/27}{ 2.1.1 }{Objects and proxies in LaTeX3} +\ProvidesExplPackage{lt3rawobjects}{2022/12/09}{ 2.2 }{Objects and proxies in LaTeX3} \str_const:Nn \c_object_local_str {loc} \str_const:Nn \c_object_global_str {glo} \str_const:Nn \c_object_public_str {pub} @@ -37,6 +37,14 @@ \tl_to_str:n { #1 _ #2 } } +\cs_new:Nn \object_embedded_adr:nn + { + #1 \tl_to_str:n{ _SUB_ #2 } + } + +\cs_generate_variant:Nn \object_embedded_adr:nn{ Vn } + + \cs_new_protected:Nn \object_address_set:Nnn { \str_set:Nn #1 { #2 _ #3 } } @@ -66,7 +74,6 @@ \cs_generate_variant:Nn \__rawobjects_object_scovar:n { V } \cs_generate_variant:Nn \__rawobjects_object_visvar:n { V } - \prg_new_conditional:Nnn \object_if_exist:n { p, T, F, TF } { \cs_if_exist:cTF @@ -150,6 +157,24 @@ \prg_generate_conditional_variant:Nnn \object_if_private:n { V } { p, T, F, TF } +\cs_new:Nn \object_macro_adr:nn + { + #1 \tl_to_str:n{ _MACRO_ #2 } + } + +\cs_generate_variant:Nn \object_macro_adr:nn{ Vn } + +\cs_new:Nn \object_macro_use:nn + { + \use:c + { + \object_macro_adr:nn{ #1 }{ #2 } + } + } + +\cs_generate_variant:Nn \object_macro_use:nn{ Vn } + + \cs_new:Nn \__rawobjects_scope:n { \object_if_local:nTF { #1 } @@ -213,6 +238,7 @@ \cs_generate_variant:Nn \object_member_adr:nn { Vn } + \cs_new:Nn \object_member_type:nn { \object_rcmember_use:nnn { #1 } @@ -586,6 +612,7 @@ \str_const:Nx \c_proxy_address_str { \object_address:nn { rawobjects }{ proxy } } + \str_const:cn { \__rawobjects_object_modvar:V \c_proxy_address_str } { rawobjects } \str_const:cV { \__rawobjects_object_pxyvar:V \c_proxy_address_str } @@ -599,9 +626,16 @@ { \object_member_adr:Vnn \c_proxy_address_str { varlist }{ seq } } - { varlist } + { varlist, objlist } \object_newconst_str:Vnn \c_proxy_address_str { varlist_type }{ seq } +\object_newconst_str:Vnn \c_proxy_address_str { objlist_type }{ seq } + +\seq_const_from_clist:cn + { + \object_member_adr:Vnn \c_proxy_address_str { objlist }{ seq } + } + {} \prg_new_conditional:Nnn \object_if_proxy:n {p, T, F, TF} @@ -684,8 +718,23 @@ \object_ncmember_adr:nnn { #1 }{ ##1 _ type }{ str } } } + + \seq_map_inline:cn + { + \object_member_adr:nnn { #1 }{ objlist }{ seq } + } + { + \embedded_create:nvn + { #2 } + { + \object_ncmember_adr:nnn { #1 }{ ##1 _ proxy }{ str } + } + { ##1 } + } } +\cs_generate_variant:Nn \__rawobjects_create_anon:nnnNN { nnvcc } + \cs_new_protected:Nn \object_create:nnnNN { \__rawobjects_create_anon:nnnNN { #1 }{ \object_address:nn { #2 }{ #3 } } @@ -704,9 +753,28 @@ \str_gset:Nx #1 { \object_address:nn { #3 }{ #4 } } } +\cs_new_protected:Nn \embedded_create:nnn + { + \__rawobjects_create_anon:nnvcc { #2 } + { + \object_embedded_adr:nn + { #1 }{ #3 } + } + { + \__rawobjects_object_modvar:n{ #1 } + } + { + \__rawobjects_object_scovar:n{ #1 } + } + { + \__rawobjects_object_visvar:n{ #1 } + } + } + \cs_generate_variant:Nn \object_create:nnnNN { VnnNN } \cs_generate_variant:Nn \object_create_set:NnnnNN { NVnnNN, NnnfNN } \cs_generate_variant:Nn \object_create_gset:NnnnNN { NVnnNN, NnnfNN } +\cs_generate_variant:Nn \embedded_create:nnn { nvn, Vnn } \cs_new:Nn \__rawobjects_combine_aux:nnn @@ -808,6 +876,22 @@ \cs_generate_variant:Nn \proxy_push_member:nnn { Vnn } + +\cs_generate_variant:Nn \object_newconst_str:nnn { nnx } + +\cs_new_protected:Nn \proxy_push_embedded:nnn + { + \__rawobjects_force_scope:n { #1 } + \object_newconst_str:nnx { #1 }{ #2 _ proxy }{ #3 } + \seq_gput_left:cn + { + \object_member_adr:nnn { #1 }{ objlist }{ seq } + } + { #2 } + } + +\cs_generate_variant:Nn \proxy_push_embedded:nnn { Vnn } + \cs_new_protected:Nn \object_assign:nn { \seq_map_inline:cn |