Files
ziran/bootstrap/compiler_enum/compiler_enum.h
T

54 lines
1.1 KiB
C

/* Generated by zi2c from compiler_enum.zi. */
#ifndef ZIRAN_COMPILER_ENUM_H
#define ZIRAN_COMPILER_ENUM_H
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include "zir_slice.h"
#include "zir_string_types.h"
#include "compiler_text.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef ZIRAN_COMPILER_ENUM_H_PRIVATE
#define Minimum (-9223372036854775807 - 1)
#endif
#ifdef ZIRAN_COMPILER_ENUM_H_PRIVATE
#define Maximum 9223372036854775807
#endif
typedef struct Entry Entry;
typedef struct Evaluation Evaluation;
#ifdef ZIRAN_COMPILER_ENUM_H_PRIVATE
typedef struct Cursor Cursor;
#endif
struct Entry {
String name;
int64_t value;
};
struct Evaluation {
bool valid;
bool found;
int64_t value;
int64_t count;
};
#ifdef ZIRAN_COMPILER_ENUM_H_PRIVATE
struct Cursor {
String source;
int64_t at;
bool valid;
};
#endif
bool compiler_enum_FitsBacking(String backing, int64_t value);
Evaluation compiler_enum_MemberValue(String body, String backing, String wanted, Slice entries, int64_t name_limit);
#ifdef __cplusplus
}
#endif
#endif /* ZIRAN_COMPILER_ENUM_H */