/* Generated by zi2c from compiler_statement.zi. */ #ifndef ZIRAN_COMPILER_STATEMENT_H #define ZIRAN_COMPILER_STATEMENT_H #include #include "zir_string_types.h" #include "compiler_scan.h" #include "compiler_source.h" #include "compiler_text.h" #ifdef __cplusplus extern "C" { #endif typedef int32_t LoopKind; typedef struct LoopHeader LoopHeader; typedef struct NamedWhile NamedWhile; typedef struct LoopControl LoopControl; typedef int32_t ControlError; typedef struct ControlLine ControlLine; typedef struct CompileHeader CompileHeader; enum { LoopKind_Invalid = 0, LoopKind_Range = 1, LoopKind_Collection = 2, }; struct LoopHeader { LoopKind kind; String value_name; String index_name; String first; String last; String collection; bool reverse; bool pointer; bool c_style; }; struct NamedWhile { bool valid; String name; String condition; }; struct LoopControl { bool valid; String name; }; enum { ControlError_None = 0, ControlError_Condition = 1, }; struct ControlLine { ControlError error; String header; String inline_body; String queued_body; }; struct CompileHeader { int32_t kind; String condition; }; ControlLine compiler_statement_SplitControlLine(String source); CompileHeader compiler_statement_CompileCondition(String source); bool compiler_statement_CompileElse(String source); bool compiler_statement_StartsCompileCondition(String source); LoopHeader compiler_statement_ForHeader(String source, int64_t name_limit, int64_t text_limit); NamedWhile compiler_statement_WhileHeader(String source, int64_t name_limit, int64_t text_limit); LoopControl compiler_statement_ControlTarget(String source, bool continuation, int64_t name_limit); bool compiler_statement_Mentions(String source, String name); bool compiler_statement_Changes(String source, String name, bool assignment); bool compiler_statement_PlainName(String source); #ifdef __cplusplus } #endif #endif /* ZIRAN_COMPILER_STATEMENT_H */