blob: 24e173a57700b249770b7624d6496e6bf328d47e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#pragma once
// Parsing logic
#include <setjmp.h>
#include <stdint.h>
#include "../ast.h"
#include "../stdlib/files.h"
#define SPACES_PER_INDENT 4
typedef struct {
file_t *file;
jmp_buf *on_err;
int64_t next_lambda_id;
} parse_ctx_t;
ast_t *parse_file(const char *path, jmp_buf *on_err);
ast_t *parse(const char *str);
ast_t *parse_expression(const char *str);
|