Add -debug command (still in development)

This commit is contained in:
gingerBill
2017-11-19 15:06:56 +00:00
parent 284a9cd4c3
commit cec9f7abfe
8 changed files with 125 additions and 106 deletions

View File

@@ -4679,7 +4679,7 @@ Array<AstNode *> parse_stmt_list(AstFile *f) {
ParseFileError init_ast_file(AstFile *f, String fullpath, TokenPos *err_pos) {
f->fullpath = string_trim_whitespace(fullpath); // Just in case
if (!string_has_extension(f->fullpath, str_lit("odin"))) {
if (!string_ends_with(f->fullpath, str_lit(".odin"))) {
return ParseFile_WrongExtension;
}
TokenizerInitError err = init_tokenizer(&f->tokenizer, f->fullpath);