32 #ifndef _QORE_QORESPLICEOPERATORNODE_H
34 #define _QORE_QORESPLICEOPERATORNODE_H
36 class QoreSpliceOperatorNode :
public LValueOperatorNode {
38 QoreValue lvalue_exp, offset_exp, length_exp, new_exp;
39 const QoreTypeInfo* returnTypeInfo =
nullptr;
45 DLLLOCAL ~QoreSpliceOperatorNode() {
52 DLLLOCAL
virtual void parseInitImpl(
QoreValue& val, LocalVar* oflag,
int pflag,
int& lvids,
const QoreTypeInfo*& typeInfo);
54 DLLLOCAL
virtual const QoreTypeInfo *getTypeInfo()
const {
55 return returnTypeInfo;
59 DLLLOCAL QoreSpliceOperatorNode(
const QoreProgramLocation* loc,
62 LValueOperatorNode(loc),
63 lvalue_exp(n_lvalue_exp),
64 offset_exp(n_offset_exp),
65 length_exp(n_length_exp),
74 DLLLOCAL
virtual const char *getTypeName()
const {
75 return splice_str.getBuffer();
78 DLLLOCAL
virtual bool hasEffect()
const {
82 DLLLOCAL
virtual QoreOperatorNode* copyBackground(
ExceptionSink *xsink)
const {
83 ValueHolder n_lv(copy_value_and_resolve_lvar_refs(lvalue_exp, xsink), xsink);
86 ValueHolder n_of(copy_value_and_resolve_lvar_refs(offset_exp, xsink), xsink);
89 ValueHolder n_ln(copy_value_and_resolve_lvar_refs(length_exp, xsink), xsink);
92 ValueHolder n_nw(copy_value_and_resolve_lvar_refs(new_exp, xsink), xsink);
95 return new QoreSpliceOperatorNode(get_runtime_location(), n_lv.release(), n_of.release(), n_ln.release(), n_nw.release());