You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
603 B
C

7 years ago
#ifndef PARSER_H_
#define PARSER_H_
#include <variable.h>
typedef variable *stack_t;
7 years ago
typedef struct {
variable *vars;
char **vnames;
7 years ago
stack_t *stack;
uint32_t stidx;
char **lines;
uint32_t lnidx;
uint8_t indent;
variable *ret;
7 years ago
} interpreter;
typedef int (*func_t)(interpreter *);
7 years ago
void iinit(interpreter *);
7 years ago
void inew_string(interpreter *, const char *, char *);
void inew_integer(interpreter *, const char *, int32_t);
void inew_float(interpreter *, const char *, float);
void inew_cfunc(interpreter *, const char *, func_t);
7 years ago
int idoline(interpreter *, const char *);
7 years ago
#endif // PARSER_H_