32 #ifndef _QORE_QORESQUAREBRACKETSOPERATORNODE_H
33 #define _QORE_QORESQUAREBRACKETSOPERATORNODE_H
35 class QoreSquareBracketsOperatorNode :
public QoreBinaryOperatorNode<>,
public FunctionalOperator {
38 DLLLOCAL QoreSquareBracketsOperatorNode(
const QoreProgramLocation* loc,
QoreValue left,
QoreValue right) : QoreBinaryOperatorNode<>(loc, left, right) {
41 DLLLOCAL
virtual const QoreTypeInfo* getTypeInfo()
const {
45 DLLLOCAL
virtual QoreOperatorNode* copyBackground(
ExceptionSink *xsink)
const {
46 return copyBackgroundExplicit<QoreSquareBracketsOperatorNode>(xsink);
54 const QoreTypeInfo* typeInfo =
nullptr;
56 bool rhs_list_range =
false;
58 DLLLOCAL
void parseCheckValueTypes(
const QoreParseListNode* pln);
59 DLLLOCAL
void parseCheckValueTypes(
const QoreListNode* ln);
63 DLLLOCAL
virtual void parseInitImpl(
QoreValue& val, LocalVar* oflag,
int pflag,
int& lvids,
const QoreTypeInfo*& typeInfo);
65 DLLLOCAL
virtual FunctionalOperatorInterface* getFunctionalIteratorImpl(FunctionalValueType& value_type,
ExceptionSink* xsink)
const;
71 class QoreFunctionalSquareBracketsOperator :
public FunctionalOperatorInterface {
74 : leftValue(*lhs, lhs.isTemp(), xsink),
80 DLLLOCAL
virtual ~QoreFunctionalSquareBracketsOperator() {}
84 DLLLOCAL
virtual const QoreTypeInfo* getValueTypeImpl()
const;
92 class QoreFunctionalSquareBracketsComplexOperator :
public FunctionalOperatorInterface {
95 : leftValue(*lhs, lhs.isTemp(), xsink),
100 DLLLOCAL
virtual ~QoreFunctionalSquareBracketsComplexOperator() {}
104 DLLLOCAL
virtual const QoreTypeInfo* getValueTypeImpl()
const;
108 const QoreParseListNode* rightParseList;
110 std::unique_ptr<class QoreFunctionalRangeOperator> rangeIter;