mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-13 09:22:22 -07:00
Update c/frontend/preprocessor
This commit is contained in:
@@ -1496,3 +1496,15 @@ init_lookup_tables :: proc(cpp: ^Preprocessor, allocator := context.allocator) {
|
||||
reserve(&cpp.include_guards, max(16, cap(cpp.include_guards)));
|
||||
reserve(&cpp.filepath_cache, max(16, cap(cpp.filepath_cache)));
|
||||
}
|
||||
|
||||
|
||||
init_defaults :: proc(cpp: ^Preprocessor, lookup_tables_allocator := context.allocator) {
|
||||
if cpp.warn == nil {
|
||||
cpp.warn = tokenizer.default_warn_handler;
|
||||
}
|
||||
if cpp.err == nil {
|
||||
cpp.err = tokenizer.default_error_handler;
|
||||
}
|
||||
init_lookup_tables(cpp, lookup_tables_allocator);
|
||||
init_default_macros(cpp);
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ scan_escape :: proc(t: ^Tokenizer) -> bool {
|
||||
n: int;
|
||||
base, max: u32;
|
||||
switch esc {
|
||||
case 'a', 'b', 'e', 'f', 'n', 't', 'v', 'r', '\\', '\'', '\"':
|
||||
case 'a', 'b', 'e', 'f', 'n', 't', 'v', 'r', '\\', '\'', '"':
|
||||
advance_rune(t);
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user