New module for parser functions
Same principle as main->lib (previous commit).
This commit is contained in:
32
parser.h
Normal file
32
parser.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef PARSER_H
|
||||
#define PARSER_H
|
||||
|
||||
#include "./lib.h"
|
||||
|
||||
typedef struct AST
|
||||
{
|
||||
size_t col, row;
|
||||
enum
|
||||
{
|
||||
NEXT = 0,
|
||||
PREV,
|
||||
INC,
|
||||
DEC,
|
||||
OUT,
|
||||
READ,
|
||||
LIN,
|
||||
LOUT
|
||||
} type;
|
||||
int loop_ref;
|
||||
} node_t;
|
||||
|
||||
struct PResult
|
||||
{
|
||||
node_t *nodes;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
char *ast_to_str(node_t *ast, size_t size);
|
||||
struct PResult parse_buffer(buffer_t *buffer);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user