~lattis/muon

ref: f9a8cbad39b665a9496cd3adb4756e85ee5ec97c muon/include/lang/eval.h -rw-r--r-- 763 bytes
f9a8cbadStone Tickle print stdout/stderr of failing test 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef MUON_LANG_EVAL_H
#define MUON_LANG_EVAL_H

#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>

struct workspace;
struct source;
struct darr;

enum language_mode {
	language_external,
	language_internal,
	language_opts,
	language_mode_count,
};

struct source_data {
	char *data;
	uint64_t data_len;
};

union token_data {
	const char *s;
	int64_t n;
};

void source_data_destroy(struct source_data *sdata);
bool eval_project(struct workspace *wk, const char *subproject_name,
	const char *cwd, const char *build_dir, uint32_t *proj_id);
bool eval_project_file(struct workspace *wk, const char *path);
bool eval(struct workspace *wk, struct source *src, uint32_t *obj);
bool eval_str(struct workspace *wk, const char *str, uint32_t *obj);
#endif