BFC-Compiler
A C23 Brainfuck compiler
Loading...
Searching...
No Matches
bfc.c File Reference

bfc compiler driver. More...

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "bfc_cli.h"
#include "bfc_codegen.h"
#include "bfc_error.h"
#include "bfc_io.h"
#include "bfc_ir.h"
#include "bfc_jumptable.h"
#include "bfc_lexer.h"
#include "bfc_target.h"
#include "bfc_version.h"

Macros

#define CHECK_ERROR(error_)
 Propagates a stage error to the shared cleanup path.

Functions

int main (int argc, char **argv)
 Runs the complete compiler pipeline and returns a conventional process status.

Detailed Description

bfc compiler driver.

Coordinates CLI parsing, source loading, lexing, validation, IR construction and optimization, target resolution, code generation, and output.

Macro Definition Documentation

◆ CHECK_ERROR

#define CHECK_ERROR ( error_)
Value:
do \
{ \
if ((error_).code != ERR_OK) \
{ \
bfc_log_error(error_, program); \
goto end; \
} \
} \
while (0)

Propagates a stage error to the shared cleanup path.

Note
The macro evaluates its argument more than once only through field access; pass an error object, not an expression with side effects.