32 #ifndef _QORE_INTERN_PARSEREFERENCENODE_H
33 #define _QORE_INTERN_PARSEREFERENCENODE_H
35 #include "qore/intern/ParseNode.h"
37 class IntermediateParseReferenceNode;
39 class ParseReferenceNode :
public ParseNode {
44 DLLLOCAL ParseReferenceNode(
const QoreProgramLocation* loc,
QoreValue exp,
45 const QoreTypeInfo* typeInfo = referenceTypeInfo) : ParseNode(loc,
NT_PARSEREFERENCE, true, false),
46 lvexp(exp), typeInfo(typeInfo) {
57 str.
sprintf(
"parse reference expression (%p)",
this);
73 getAsString(*rv, foff, xsink);
78 DLLLOCAL
virtual const char* getTypeName()
const {
79 return "reference to lvalue";
82 DLLLOCAL
virtual const QoreTypeInfo* getTypeInfo()
const {
87 DLLLOCAL IntermediateParseReferenceNode* evalToIntermediate(
ExceptionSink* xsink)
const;
96 const QoreTypeInfo* typeInfo;
99 DLLLOCAL ~ParseReferenceNode() {
105 return evalToRef(xsink);
112 DLLLOCAL
virtual int parseInitImpl(
QoreValue& val, QoreParseContext& parse_context);
115 class IntermediateParseReferenceNode :
public ParseReferenceNode {
118 const void* lvalue_id;
119 const qore_class_private* cls;
128 DLLLOCAL IntermediateParseReferenceNode(
const QoreProgramLocation* loc,
QoreValue exp,
129 const QoreTypeInfo* typeInfo,
QoreObject* o,
const void* lvid,
const qore_class_private* n_cls);
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
the implementation of Qore's object data type, reference counted, dynamically-allocated only
Definition: QoreObject.h:60
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:93
DLLEXPORT int sprintf(const char *fmt,...)
this will concatentate a formatted string to the existing string according to the format string and t...
parse type: reference to a lvalue expression
Definition: ReferenceNode.h:45
const qore_type_t NT_PARSEREFERENCE
type value for ParseReferenceNode (private class)
Definition: node_types.h:80
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:275
DLLEXPORT void discard(ExceptionSink *xsink)
dereferences any contained AbstractQoreNode pointer and sets to 0; does not modify other values
DLLEXPORT QoreValue refSelf() const
references the contained value if type == QV_Node, returns itself