mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Additional fix and updated error message.
This commit is contained in:
@@ -3074,7 +3074,6 @@ static inline bool parse_contract_param(ParseContext *c, AstId *docs, AstId **do
|
||||
{
|
||||
case TOKEN_IDENT:
|
||||
case TOKEN_CT_IDENT:
|
||||
case TOKEN_TYPE_IDENT:
|
||||
case TOKEN_CT_TYPE_IDENT:
|
||||
case TOKEN_HASH_IDENT:
|
||||
ast->contract_stmt.param.name = symstr(c);
|
||||
@@ -3082,8 +3081,10 @@ static inline bool parse_contract_param(ParseContext *c, AstId *docs, AstId **do
|
||||
case TOKEN_ELLIPSIS:
|
||||
ast->contract_stmt.param.name = NULL;
|
||||
break;
|
||||
case TOKEN_TYPE_IDENT:
|
||||
case TOKEN_CT_CONST_IDENT:
|
||||
case TOKEN_CONST_IDENT:
|
||||
RETURN_PRINT_ERROR_HERE("This is not a valid parameter name.");
|
||||
default:
|
||||
RETURN_PRINT_ERROR_HERE("Expected a parameter name here.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user