Upcast the value v
to the given type checking that v
if of a numeric type.
Upcast the value v
to the given type checking that v
if of a numeric type.
type to upcast to
upcasted value
Sets the source context of the v
instance only if it's empty (i.e.
Sets the source context of the v
instance only if it's empty (i.e. not set yet).
Set source context to all nodes missing source context in the given tree.
Set source context to all nodes missing source context in the given tree.
source context to set
AST where all nodes with missing source context are set to the given srcCtx
Assigns optional SourceContext to the value v
.
Assigns optional SourceContext to the value v
.
The is effectful operation changing state of v
.
the same instance of v
with the given source context assigned
Type casting methods for Value nodes. Each
asX
method casts the value to the correspondingX
type of node. No runtime checks are performed, so the caller should ensure that the value has the expected type.