+/* Break/Continue
+ */
+struct ast_breakcont : ast_expression
+{
+ bool is_continue;
+ unsigned int levels;
+};
+ast_breakcont* ast_breakcont_new(lex_ctx_t ctx, bool iscont, unsigned int levels);
+
+/* Switch Statements
+ *
+ * A few notes about this: with the original QCVM, no real optimization
+ * is possible. The SWITCH instruction set isn't really helping a lot, since
+ * it only collapes the EQ and IF instructions into one.
+ * Note: Declaring local variables inside caseblocks is normal.
+ * Since we don't have to deal with a stack there's no unnatural behaviour to
+ * be expected from it.
+ * TODO: Ticket #20
+ */
+struct ast_switch_case {
+ ast_expression *value; /* #20 will replace this */
+ ast_expression *code;
+};
+
+struct ast_switch : ast_expression
+{
+ ast_expression *operand;
+ std::vector<ast_switch_case> cases;
+};
+
+ast_switch* ast_switch_new(lex_ctx_t ctx, ast_expression *op);
+
+/* Label nodes
+ *
+ * Introduce a label which can be used together with 'goto'
+ */
+struct ast_label : ast_expression
+{
+ const char *name;
+ ir_block *irblock;
+ std::vector<ast_goto*> gotos;
+
+ /* means it has not yet been defined */
+ bool undefined;
+};
+
+ast_label* ast_label_new(lex_ctx_t ctx, const char *name, bool undefined);
+
+/* GOTO nodes
+ *
+ * Go to a label, the label node is filled in at a later point!
+ */
+struct ast_goto : ast_expression
+{
+ const char *name;
+ ast_label *target;
+ ir_block *irblock_from;
+};
+
+ast_goto* ast_goto_new(lex_ctx_t ctx, const char *name);
+void ast_goto_set_label(ast_goto*, ast_label*);
+
+/* STATE node
+ *
+ * For frame/think state updates: void foo() [framenum, nextthink] {}
+ */
+struct ast_state : ast_expression
+{
+ ast_expression *framenum;
+ ast_expression *nextthink;
+};
+ast_state* ast_state_new(lex_ctx_t ctx, ast_expression *frame, ast_expression *think);
+void ast_state_delete(ast_state*);