mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-09 14:22:18 -04:00
Tokenize whilst parsing rather than storing every token of a file first
This commit is contained in:
1 parent
fcab1c1887
commit
32f30c3eb3
5 files changed
+119
-119
No files matched your search
@@ -812,6 +812,10 @@ gb_internal void error_no_newline_va(TokenPos const &pos, char const *fmt, va_li
|
||||
|
||||
|
||||
gb_internal void syntax_error_va(TokenPos const &pos, TokenPos end, char const *fmt, va_list va) {
|
||||
if (global_error_mute_depth > 0) {
|
||||
global_error_mute_count += 1;
|
||||
return;
|
||||
}
|
||||
global_error_collector.count.fetch_add(1);
|
||||
mutex_lock(&global_error_collector.mutex);
|
||||
if (global_error_collector.count > MAX_ERROR_COLLECTOR_COUNT()) {
|
||||
@@ -844,6 +848,10 @@ gb_internal void syntax_error_va(TokenPos const &pos, TokenPos end, char const *
|
||||
}
|
||||
|
||||
gb_internal void syntax_error_with_verbose_va(TokenPos const &pos, TokenPos end, char const *fmt, va_list va) {
|
||||
if (global_error_mute_depth > 0) {
|
||||
global_error_mute_count += 1;
|
||||
return;
|
||||
}
|
||||
global_error_collector.count.fetch_add(1);
|
||||
mutex_lock(&global_error_collector.mutex);
|
||||
if (global_error_collector.count > MAX_ERROR_COLLECTOR_COUNT()) {
|
||||
|
||||
Reference in new issue
Block a user