32 #ifndef _QORE_SWITCHSTATEMENT_H 34 #define _QORE_SWITCHSTATEMENT_H 36 #include "qore/intern/AbstractStatement.h" 37 #include "qore/intern/StatementBlock.h" 41 DLLLOCAL
virtual bool isCaseNodeImpl()
const;
44 const QoreProgramLocation* loc;
47 CaseNode* next =
nullptr;
50 DLLLOCAL CaseNode(
const QoreProgramLocation* loc,
QoreValue v, StatementBlock* c,
bool def =
false) : loc(loc), val(v), code(c), def(def) {
53 DLLLOCAL
virtual ~CaseNode();
57 DLLLOCAL
virtual bool isDefault()
const {
61 DLLLOCAL
bool isCaseNode()
const;
64 class SwitchStatement :
public AbstractStatement {
66 CaseNode* head, *tail;
70 DLLLOCAL
virtual int parseInitImpl(LocalVar* oflag,
int pflag = 0);
74 LVList *lvars =
nullptr;
77 DLLLOCAL SwitchStatement(CaseNode* f);
78 DLLLOCAL
virtual ~SwitchStatement();
80 DLLLOCAL
void addCase(CaseNode* c);
83 DLLLOCAL
virtual bool hasFinalReturn()
const {
86 DLLLOCAL
virtual void parseCommit(
QoreProgram* pgm);
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:262
supports parsing and executing Qore-language code, reference counted, dynamically-allocated only ...
Definition: QoreProgram.h:126
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:46