feat(s1duo): implement pure C AiraLang S1 Duo native engine with military-grade security hardening

This commit is contained in:
Adam Eehan committed 2026-10-28 12:13:33 +05:30
1 parent 97146cb5c3
commit 8ac2b4c48e
25 files changed
+3681 -1

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
#ifndef AIRA_EVALUATOR_H
#define AIRA_EVALUATOR_H
#include "ast.h"
#include "env.h"
typedef enum {
EXEC_OK = 0,
EXEC_RETURN,
EXEC_BREAK,
EXEC_CONTINUE,
EXEC_ERROR
} ExecResult;
typedef struct {
ExecResult type;
AiraValue value;
} EvalSignal;
typedef struct {
Environment* global_env;
int call_depth;
bool had_runtime_error;
} Evaluator;
void evaluator_init(Evaluator* eval);
void evaluator_cleanup(Evaluator* eval);
AiraValue eval_expression(Evaluator* eval, Environment* env, ExprNode* expr);
EvalSignal eval_statement(Evaluator* eval, Environment* env, StmtNode* stmt);
void eval_program(Evaluator* eval, StmtNode* program);
#endif /* AIRA_EVALUATOR_H */