Files
gw-basic-2026/include/codegen.h
T

20 lines
603 B
C
Raw Normal View History

#ifndef CODEGEN_H
#define CODEGEN_H
#include "analysis.h"
#include <stdbool.h>
#include <stdio.h>
typedef struct {
bool safe_mode; /* --safe: emit runtime safety checks */
bool warn_mode; /* --warn: static analysis warnings */
bool no_gc_check; /* --no-gc-check: skip gwrt_check_line per line
* (no string-pool GC, no Ctrl+Break check) */
bool fast_math; /* --fast-math: skip / by-zero checks */
} codegen_opts_t;
/* Generate C source from the analyzed program */
void codegen_emit(FILE *out, analysis_t *a, const codegen_opts_t *opts);
#endif