Function dfir_lang::process_singletons::postprocess_singletons
source ยท pub fn postprocess_singletons(
tokens: TokenStream,
resolved_idents: impl IntoIterator<Item = Ident>,
context: &Ident,
) -> Punctuated<Expr, Comma>
Expand description
Replaces singleton references #my_var
with the code needed to actually get the value inside.
tokens
- The tokens to update singleton references within.resolved_idents
- The contextStateHandle
varnames that correspond 1:1 and in the same order as the singleton references withintokens
(found in-order viapreprocess_singletons
).
Generates borrowing code (std::cell::RefCell::borrow_mut
). Use
postprocess_singletons_handles
for just the StateHandle
s.