@@ -23,15 +23,15 @@ namespace hk {
2323 url = it->text ;
2424 ++it;
2525 } else {
26- return e.add <error::missing_import_git_declaration_url> (first, it->last );
26+ return e.add (first, it->last , error::missing_import_git_declaration_url );
2727 }
2828
2929 auto rev = std::string{};
3030 if (*it == token::string_literal) {
3131 rev = it->text ;
3232 ++it;
3333 } else {
34- return e.add <error::missing_import_git_declaration_branch> (first, it->last );
34+ return e.add (first, it->last , error::missing_import_git_declaration_branch );
3535 }
3636
3737 auto repository = repository_url{repository_type::git, std::move (url), std::move (rev)};
@@ -45,7 +45,7 @@ namespace hk {
4545 url = it->text ;
4646 ++it;
4747 } else {
48- return e.add <error::missing_import_zip_declaration_path> (first, it->last );
48+ return e.add (first, it->last , error::missing_import_zip_declaration_path );
4949 }
5050
5151 auto repository = repository_url{repository_type::zip, it->text };
@@ -59,7 +59,7 @@ namespace hk {
5959 path = it->text ;
6060 ++it;
6161 } else {
62- return e.add <error::missing_import_lib_declaration_path> (first, it->last );
62+ return e.add (first, it->last , error::missing_import_lib_declaration_path );
6363 }
6464
6565 r = std::make_unique<ast::import_library_declaration_node>(first, it->last , path);
@@ -75,7 +75,7 @@ namespace hk {
7575 as = std::move (as).value ();
7676
7777 } else {
78- return e.add <error::missing_import_mod_declaration_as_name> (first, it->last );
78+ return e.add (first, it->last , error::missing_import_mod_declaration_as_name );
7979 }
8080 }
8181
@@ -85,15 +85,15 @@ namespace hk {
8585 return std::unexpected{name.error ()};
8686
8787 } else {
88- return e.add <error::missing_import_mod_declaration_name> (first, it->last );
88+ return e.add (first, it->last , error::missing_import_mod_declaration_name );
8989 }
9090
9191 if (*it == ' ;' ) {
9292 ++it;
9393 return r;
9494 }
9595
96- return e.add <error::missing_import_declaration_semicolon> (first, it->last );
96+ return e.add (first, it->last , error::missing_import_declaration_semicolon );
9797}
9898
9999} // namespace hk
0 commit comments