Skip to content

Commit c44f737

Browse files
refactor(wheel_parser): add message parameter to variables declaration error contexts
1 parent 61372f2 commit c44f737

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

wheel_parser/include/wheel_parser/functions/variables_declaration.hxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ WHEEL_PARSER_FUNCTIONS_BEGIN_NAMESPACE
3030
skip_spaces(contract.lexer, contract.state.current_token);
3131

3232
if (!token_matches(contract.state.current_token.kind, TokenKind::IDENT)) {
33-
return emit_error(ERROR_CONTEXT(ParseErrorCode::ExpectedIdentifier));
33+
return emit_error(ERROR_CONTEXT(ParseErrorCode::ExpectedIdentifier, ""));
3434
}
3535
const auto var_name = contract.interner.intern(contract.state.current_token.str);
3636

3737
skip_spaces(contract.lexer, contract.state.current_token);
3838
if (!token_matches(contract.state.current_token.kind, TokenKind::COLON)) {
39-
return emit_error(ERROR_CONTEXT(ParseErrorCode::ExpectedColon));
39+
return emit_error(ERROR_CONTEXT(ParseErrorCode::ExpectedColon, ""));
4040
}
4141

4242
skip_spaces(contract.lexer, contract.state.current_token);
4343
if (!token_matches(contract.state.current_token.kind, TokenKind::IDENT)) {
44-
return emit_error(ERROR_CONTEXT(ParseErrorCode::ExpectedTypeKeyword));
44+
return emit_error(ERROR_CONTEXT(ParseErrorCode::ExpectedTypeKeyword, ""));
4545
}
4646

4747
BuiltinType builtin_type;
@@ -53,7 +53,7 @@ WHEEL_PARSER_FUNCTIONS_BEGIN_NAMESPACE
5353

5454
skip_spaces(contract.lexer, contract.state.current_token);
5555
if (!token_matches(contract.state.current_token.kind, TokenKind::EQUAL)) {
56-
return emit_error(ERROR_CONTEXT(ParseErrorCode::ExpectedEqual));
56+
return emit_error(ERROR_CONTEXT(ParseErrorCode::ExpectedEqual, ""));
5757
}
5858

5959
skip_spaces(contract.lexer, contract.state.current_token);

0 commit comments

Comments
 (0)