32 #ifndef _QORE_ABSTRACTSTATEMENT_H
34 #define _QORE_ABSTRACTSTATEMENT_H
42 #define PF_RETURN_VALUE_IGNORED (1 << 0)
43 #define PF_BACKGROUND (1 << 1)
44 #define PF_RETHROW_OK (1 << 2)
45 #define PF_FOR_ASSIGNMENT (1 << 3)
46 #define PF_CONST_EXPRESSION (1 << 4)
47 #define PF_TOP_LEVEL (1 << 5)
48 #define PF_BREAK_OK (1 << 6)
49 #define PF_CONTINUE_OK (1 << 7)
50 #define PF_NO_TOP_LEVEL_LVARS (1 << 8)
59 class qore_program_private_base;
61 class AbstractStatement {
63 const QoreProgramLocation* loc;
64 hashdecl ParseWarnOptions pwo;
66 DLLLOCAL AbstractStatement(qore_program_private_base* p);
68 DLLLOCAL AbstractStatement(
const QoreProgramLocation* loc);
69 DLLLOCAL AbstractStatement(
int sline,
int eline);
70 DLLLOCAL
virtual ~AbstractStatement();
73 DLLLOCAL
int parseInit(QoreParseContext& parse_context);
75 DLLLOCAL
void finalizeBlock(
int sline,
int eline);
77 DLLLOCAL
bool getBreakpointFlag()
const {
78 return breakpointFlag;
83 DLLLOCAL
virtual bool endsBlock()
const {
89 DLLLOCAL
virtual bool isParseDeclaration()
const {
94 DLLLOCAL
virtual bool isDeclaration()
const {
98 DLLLOCAL
virtual bool hasFinalReturn()
const {
102 DLLLOCAL
virtual void parseCommit(
QoreProgram* pgm);
105 QoreBreakpointList_t* breakpoints =
nullptr;
106 volatile bool breakpointFlag =
false;
111 DLLLOCAL
virtual int parseInitImpl(QoreParseContext& parse_context) = 0;
113 friend class qore_program_private;
122 DLLLOCAL
void push_cvar(
const char* name);
123 DLLLOCAL
void pop_cvar();
124 DLLLOCAL LocalVar* pop_local_var(
bool set_unassigned =
false);
125 DLLLOCAL
int pop_local_var_get_id();
127 DLLLOCAL
void push_local_var(LocalVar* lv,
const QoreProgramLocation* loc);
139 DLLLOCAL LocalVar* push_local_var(
const char* name,
const QoreProgramLocation* loc,
const QoreTypeInfo* typeInfo,
140 int& err,
bool is_auto =
true,
int n_refs = 0,
int pflag = 0);
142 DLLLOCAL LocalVar* find_local_var(
const char* name,
bool &in_closure);
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
Class implementing breakpoint for debugging.
Definition: QoreProgram.h:1038
supports parsing and executing Qore-language code, reference counted, dynamically-allocated only
Definition: QoreProgram.h:127
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:275