Resolve exported foreign calls through checked declarations and preserve canonical capability ownership in IR 70. Emit cyclic native interface types before includes, preserve contextual scoped callbacks and parenthesize captured slice bases. Regenerate all 89 bootstrap roots and current reference pages. Local validation: 269/269 retained checks with zero reuse; bootstrap update and independent 89-root fixed points; full native Harmony desktop compilation and link.
104 lines
2.6 KiB
C
104 lines
2.6 KiB
C
/* Generated by zi2c from compiler_statement.zi. */
|
|
#ifndef ZIRAN_COMPILER_STATEMENT_H
|
|
#define ZIRAN_COMPILER_STATEMENT_H
|
|
|
|
#include <stdbool.h>
|
|
#include "zir_string_types.h"
|
|
#ifndef ZIRAN_TYPE_FORWARD_LoopKind
|
|
#define ZIRAN_TYPE_FORWARD_LoopKind
|
|
typedef int32_t LoopKind;
|
|
#endif
|
|
#ifndef ZIRAN_TYPE_FORWARD_LoopHeader
|
|
#define ZIRAN_TYPE_FORWARD_LoopHeader
|
|
typedef struct LoopHeader LoopHeader;
|
|
#endif
|
|
#ifndef ZIRAN_TYPE_FORWARD_NamedWhile
|
|
#define ZIRAN_TYPE_FORWARD_NamedWhile
|
|
typedef struct NamedWhile NamedWhile;
|
|
#endif
|
|
#ifndef ZIRAN_TYPE_FORWARD_LoopControl
|
|
#define ZIRAN_TYPE_FORWARD_LoopControl
|
|
typedef struct LoopControl LoopControl;
|
|
#endif
|
|
#ifndef ZIRAN_TYPE_FORWARD_ControlError
|
|
#define ZIRAN_TYPE_FORWARD_ControlError
|
|
typedef int32_t ControlError;
|
|
#endif
|
|
#ifndef ZIRAN_TYPE_FORWARD_ControlLine
|
|
#define ZIRAN_TYPE_FORWARD_ControlLine
|
|
typedef struct ControlLine ControlLine;
|
|
#endif
|
|
#ifndef ZIRAN_TYPE_FORWARD_CompileHeader
|
|
#define ZIRAN_TYPE_FORWARD_CompileHeader
|
|
typedef struct CompileHeader CompileHeader;
|
|
#endif
|
|
#include "compiler_scan.h"
|
|
#include "compiler_source.h"
|
|
#include "compiler_text.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
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 */
|