stage1 支持更多语法 修复更多问题 暂时stage1功能结束
This commit is contained in:
1 parent
54425a50c7
commit
acfbbeee8b
11 files changed
+802
-183
No files matched your search
@@ -272,6 +272,21 @@ static bool test_once_with_dump(const char *fname, void *user_data) {
|
||||
return nob_cmd_run(&cmd);
|
||||
}
|
||||
|
||||
static bool is_stage_name(const char *s) {
|
||||
return strcmp(s, "stage1") == 0 || strcmp(s, "stage2") == 0 || strcmp(s, "diff") == 0;
|
||||
}
|
||||
|
||||
static bool is_dump_mode(const char *s) {
|
||||
return strcmp(s, "lex") == 0 || strcmp(s, "ast") == 0 || strcmp(s, "sema") == 0 ||
|
||||
strcmp(s, "ir") == 0 || strcmp(s, "vm") == 0;
|
||||
}
|
||||
|
||||
static const char *stage_dir_of(const char *stage) {
|
||||
if (strcmp(stage, "stage2") == 0)
|
||||
return "./stage2/";
|
||||
return "./tests/stage1/";
|
||||
}
|
||||
|
||||
typedef bool (*test_fn_t)(const char *fname, void *user_data);
|
||||
static bool run_test(Nob_Files *files, test_fn_t test_once, void *user_data) {
|
||||
const char *test_folder = "./tests/stage1/";
|
||||
|
||||
Reference in new issue
Block a user