aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-03-23 17:51:56 +0000
committergingerBill <bill@gingerbill.org>2024-03-23 17:51:56 +0000
commit517d7ae0b0fd400ceb6a213e7d644c19b8088bfd (patch)
tree55faac045297e438df0a8819f77677eb1f8fdc7f /src/parser.cpp
parentefb0933965669a5b4b8c5534d4f77fc29ddab732 (diff)
Add error block around `error_line` calls
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index bb9a526fe..b4a2e060c 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -6295,7 +6295,7 @@ gb_internal ParseFileError parse_packages(Parser *p, String init_filename) {
if (!path_is_directory(init_fullpath)) {
String const ext = str_lit(".odin");
if (!string_ends_with(init_fullpath, ext)) {
- error_line("Expected either a directory or a .odin file, got '%.*s'\n", LIT(init_filename));
+ error({}, "Expected either a directory or a .odin file, got '%.*s'\n", LIT(init_filename));
return ParseFile_WrongExtension;
}
} else if (init_fullpath.len != 0) {
@@ -6308,7 +6308,7 @@ gb_internal ParseFileError parse_packages(Parser *p, String init_filename) {
String short_path = filename_from_path(path);
char *cpath = alloc_cstring(temporary_allocator(), short_path);
if (gb_file_exists(cpath)) {
- error_line("Please specify the executable name with -out:<string> as a directory exists with the same name in the current working directory");
+ error({}, "Please specify the executable name with -out:<string> as a directory exists with the same name in the current working directory");
return ParseFile_DirectoryAlreadyExists;
}
}
@@ -6344,7 +6344,7 @@ gb_internal ParseFileError parse_packages(Parser *p, String init_filename) {
if (!path_is_directory(fullpath)) {
String const ext = str_lit(".odin");
if (!string_ends_with(fullpath, ext)) {
- error_line("Expected either a directory or a .odin file, got '%.*s'\n", LIT(fullpath));
+ error({}, "Expected either a directory or a .odin file, got '%.*s'\n", LIT(fullpath));
return ParseFile_WrongExtension;
}
}