#ifndef BASIC_INTERPRETER_H
#define BASIC_INTERPRETER_H

#include "stdint.h"
#include "stddef.h"

#define MAX_LINE_LENGTH 128
#define MAX_VARIABLES 32

typedef struct {
    char name[16];
    int value;
    char* str_value;
} Variable;

typedef struct {
    Variable variables[MAX_VARIABLES];
    size_t variable_count;
    int running;
} InterpreterState;

// Initialize the interpreter state
void init_state(InterpreterState* state);

// Execute a single line of code in the context of a state
void execute_line(InterpreterState* state, const char* line);

// Utility to evaluate an expression (exposed for potential reuse)
const char* evaluate_expression(InterpreterState* state, const char* expr);


#endif // BASIC_INTERPRETER_H
