summaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
authorJohnny Richard <johnny@johnnyrichard.com>2023-04-30 19:49:17 +0200
committerJohnny Richard <johnny@johnnyrichard.com>2023-04-30 19:49:17 +0200
commit7ad1b0f3d676441ea14d7d261e730398875ae114 (patch)
treea19b6bb1fce17009d06f08605e218c2a3f2546d7 /src/parser.c
parentf51b079da473cc07360503f8239c68b4a7eced9a (diff)
style: Invert parameters order on parser_parse_type
Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/parser.c b/src/parser.c
index f4829ee..662449b 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -72,7 +72,7 @@ drop_expected_token(parser_t *parser, token_kind_t kind)
}
static bool
-parser_parse_type(type_t *type, parser_t *parser)
+parser_parse_type(parser_t *parser, type_t *type)
{
token_t token;
@@ -243,8 +243,7 @@ parser_parse_variable_definition(parser_t *parser, string_view_t variable_name,
type_t type;
- // FIXME: change the parameters order
- if (!parser_parse_type(&type, parser))
+ if (!parser_parse_type(parser, &type))
return false;
if (!drop_expected_token(parser, TOKEN_EQUAL))
@@ -337,7 +336,7 @@ parser_parse_function_declaration(parser_t *parser, ast_node_t *node)
type_t return_type;
- if (!parser_parse_type(&return_type, parser)) {
+ if (!parser_parse_type(parser, &return_type)) {
return false;
}