#ifndef SAND_PARSER_H #define SAND_PARSER_H #include "allocator.h" #include "tokenizer.h" #include "state.h" typedef enum { SAND_AST_BINARY_OP, SAND_AST_NUMBER, } SandAstKind; typedef struct { SandToken op; struct _SandAst *left; struct _SandAst *right; } SandAstBinaryOp; typedef struct { SandToken value; } SandAstNumber; typedef struct _SandAst { SandAstKind kind; SandLocation location; } SandAst; SandAst *sand_parse(SandState *, SandAllocator *, const char *source, size_t source_length, const char *filename); #endif