diff options
| author | gingerBill <bill@gingerbill.org> | 2024-05-07 12:00:25 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-05-07 12:00:25 +0100 |
| commit | 8d654d9c6d91b4284f3971f7624eca7ecbf064ce (patch) | |
| tree | 13f6e4d88514675b31ddcc6014ba03f46fc59a71 /src/parser.cpp | |
| parent | c55b3d49b5b158953ad7eebe11b94a408ee89003 (diff) | |
| parent | 0cec2d7827a537557555bf6c92c2f090113806a4 (diff) | |
Merge branch 'master' into update-tilde
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index f4d3dc48d..04505cbd7 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -3499,6 +3499,10 @@ gb_internal Ast *parse_type(AstFile *f) { Token token = advance_token(f); syntax_error(token, "Expected a type"); return ast_bad_expr(f, token, f->curr_token); + } else if (type->kind == Ast_ParenExpr && + unparen_expr(type) == nullptr) { + syntax_error(type, "Expected a type within the parentheses"); + return ast_bad_expr(f, type->ParenExpr.open, type->ParenExpr.close); } return type; } @@ -5710,7 +5714,7 @@ gb_internal bool determine_path_from_string(BlockingMutex *file_mutex, Ast *node // working directory of the exe to the library search paths. // Static libraries can be linked directly with the full pathname // - if (node->kind == Ast_ForeignImportDecl && string_ends_with(file_str, str_lit(".so"))) { + if (node->kind == Ast_ForeignImportDecl && (string_ends_with(file_str, str_lit(".so")) || string_contains_string(file_str, str_lit(".so.")))) { *path = file_str; return true; } |