aboutsummaryrefslogtreecommitdiff
path: root/include/parser.h
blob: 9fdb9b6702bf00cee99d8fb3521f8479361fbe85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef TSL_PARSER_H
#define TSL_PARSER_H

#include "tokenizer.h"
#include "program.h"

typedef enum {
    TSL_PARSE_RESULT_ERR,
    TSL_PARSE_RESULT_OK
} TslParseResult;

/*
    TODO: Make this function load a file instead of parsing memory.
    This is needed because when using @import function instead tsl, it will load a file anyways.
*/
TslParseResult tsl_parse(char *code, size_t code_size, TslProgram *program_output);

#endif /* TSL_PARSER_H */