pub fn fetchvalue<'a>(
v: Option<&'a mut value>,
pptr: &mut &str,
bracks: i32,
scanflags: i32,
) -> Option<&'a mut value>Expand description
Port of fetchvalue() from Src/params.c:2180.
Walks the parameter expression starting at *pptr, consuming
the identifier (or special-char like ?/#/$/!/@/*/
-) and updating *pptr to point past the name. Looks up the
param in paramtab and populates the Value’s pm/start/end/
scanflags fields.
Identifier, special-char and digit names are parsed and looked up.
Nameref resolution (the getnode vs getnode2 choice on
SCANPM_NONAMEREF, c:2227-2236), bracket subscripts (getindex at
c:2288) and the SCANPM_ARRONLY scanflags promotion for hash/array
params are handled. C’s fetchvalue has no separate nameref-slice
path; getparamnode (c:570-575) resolves references through
resolve_nameref.