Files
obf/parser.h
Aryadev Chavali 9fb9413c45 node_t -> ast_node_t
Clearer to understand the intent of node_t as a direct result of
parsing source code.
2024-12-24 23:18:52 +00:00

36 lines
413 B
C

#ifndef PARSER_H
#define PARSER_H
#include "./lib.h"
typedef enum
{
NEXT = 0,
PREV,
INC,
DEC,
OUT,
READ,
LIN,
LOUT
} node_type_t;
typedef struct
{
size_t col, row;
node_type_t type;
int loop_ref;
} ast_node_t;
struct PResult
{
ast_node_t *nodes;
size_t size;
size_t labels;
};
char *ast_to_str(ast_node_t *ast, size_t size);
struct PResult parse_buffer(buffer_t *buffer);
#endif