Skip to content

Commit 0a8a4c5

Browse files
st0012amomchilov
andauthored
Apply suggestions from code review
Co-authored-by: Alexander Momchilov <[email protected]>
1 parent b5e5032 commit 0a8a4c5

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

ext/rbs_extension/main.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ static VALUE rbsparser_parse_signature(VALUE self, VALUE buffer, VALUE start_pos
273273
}
274274

275275
static VALUE parse_inline_leading_annotation_try(VALUE a) {
276-
struct parse_type_arg *arg = (struct parse_type_arg *)a;
276+
struct parse_type_arg *arg = (struct parse_type_arg *) a;
277277
rbs_parser_t *parser = arg->parser;
278278

279279
rbs_ast_ruby_annotations_t *annotation = NULL;
@@ -291,7 +291,7 @@ static VALUE parse_inline_leading_annotation_try(VALUE a) {
291291
arg->encoding
292292
);
293293

294-
return rbs_struct_to_ruby_value(ctx, (rbs_node_t *)annotation);
294+
return rbs_struct_to_ruby_value(ctx, (rbs_node_t *) annotation);
295295
}
296296

297297
static VALUE rbsparser_parse_inline_leading_annotation(VALUE self, VALUE buffer, VALUE start_pos, VALUE end_pos, VALUE variables) {
@@ -316,7 +316,7 @@ static VALUE rbsparser_parse_inline_leading_annotation(VALUE self, VALUE buffer,
316316
}
317317

318318
static VALUE parse_inline_trailing_annotation_try(VALUE a) {
319-
struct parse_type_arg *arg = (struct parse_type_arg *)a;
319+
struct parse_type_arg *arg = (struct parse_type_arg *) a;
320320
rbs_parser_t *parser = arg->parser;
321321

322322
rbs_ast_ruby_annotations_t *annotation = NULL;
@@ -334,7 +334,7 @@ static VALUE parse_inline_trailing_annotation_try(VALUE a) {
334334
arg->encoding
335335
);
336336

337-
return rbs_struct_to_ruby_value(ctx, (rbs_node_t *)annotation);
337+
return rbs_struct_to_ruby_value(ctx, (rbs_node_t *) annotation);
338338
}
339339

340340
static VALUE rbsparser_parse_inline_trailing_annotation(VALUE self, VALUE buffer, VALUE start_pos, VALUE end_pos, VALUE variables) {
@@ -351,7 +351,7 @@ static VALUE rbsparser_parse_inline_trailing_annotation(VALUE self, VALUE buffer
351351
.require_eof = Qfalse
352352
};
353353

354-
VALUE result = rb_ensure(parse_inline_trailing_annotation_try, (VALUE)&arg, ensure_free_parser, (VALUE)parser);
354+
VALUE result = rb_ensure(parse_inline_trailing_annotation_try, (VALUE) &arg, ensure_free_parser, (VALUE) parser);
355355

356356
RB_GC_GUARD(string);
357357

src/parser.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3509,9 +3509,9 @@ static bool parse_inline_method_overloads(rbs_parser_t *parser, rbs_node_list_t
35093509
ALLOCATOR(),
35103510
location,
35113511
annotations,
3512-
(rbs_node_t*)method_type
3512+
(rbs_node_t *) method_type
35133513
);
3514-
rbs_node_list_append(overloads, (rbs_node_t*)overload);
3514+
rbs_node_list_append(overloads, (rbs_node_t *) overload);
35153515

35163516
if (parser->next_token.type == pBAR) {
35173517
rbs_location_t *bar_location = rbs_location_new(ALLOCATOR(), parser->next_token.range);
@@ -3564,12 +3564,12 @@ static bool parse_inline_leading_annotation(rbs_parser_t *parser, rbs_ast_ruby_a
35643564
rbs_location_t *full_loc = rbs_location_new(ALLOCATOR(), full_range);
35653565
rbs_location_t *colon_loc = rbs_location_new(ALLOCATOR(), colon_range);
35663566

3567-
*annotation = (rbs_ast_ruby_annotations_t*)rbs_ast_ruby_annotations_colon_method_type_annotation_new(
3567+
*annotation = (rbs_ast_ruby_annotations_t *) rbs_ast_ruby_annotations_colon_method_type_annotation_new(
35683568
ALLOCATOR(),
35693569
full_loc,
35703570
colon_loc,
35713571
annotations,
3572-
(rbs_node_t*)method_type
3572+
(rbs_node_t *) method_type
35733573
);
35743574
return true;
35753575
}
@@ -3597,7 +3597,7 @@ static bool parse_inline_leading_annotation(rbs_parser_t *parser, rbs_ast_ruby_a
35973597
rbs_location_t *full_loc = rbs_location_new(ALLOCATOR(), full_range);
35983598
rbs_location_t *rbs_loc = rbs_location_new(ALLOCATOR(), rbs_range);
35993599

3600-
*annotation = (rbs_ast_ruby_annotations_t*)rbs_ast_ruby_annotations_method_types_annotation_new(
3600+
*annotation = (rbs_ast_ruby_annotations_t *) rbs_ast_ruby_annotations_method_types_annotation_new(
36013601
ALLOCATOR(),
36023602
full_loc,
36033603
rbs_loc,
@@ -3625,7 +3625,7 @@ static bool parse_inline_leading_annotation(rbs_parser_t *parser, rbs_ast_ruby_a
36253625
rbs_location_t *full_loc = rbs_location_new(ALLOCATOR(), full_range);
36263626
rbs_location_t *rbs_loc = rbs_location_new(ALLOCATOR(), rbs_range);
36273627

3628-
*annotation = (rbs_ast_ruby_annotations_t*)rbs_ast_ruby_annotations_skip_annotation_new(
3628+
*annotation = (rbs_ast_ruby_annotations_t *) rbs_ast_ruby_annotations_skip_annotation_new(
36293629
ALLOCATOR(),
36303630
full_loc,
36313631
rbs_loc,
@@ -3663,7 +3663,7 @@ static bool parse_inline_leading_annotation(rbs_parser_t *parser, rbs_ast_ruby_a
36633663
rbs_location_t *full_loc = rbs_location_new(ALLOCATOR(), full_range);
36643664
rbs_location_t *rbs_loc = rbs_location_new(ALLOCATOR(), rbs_range);
36653665

3666-
*annotation = (rbs_ast_ruby_annotations_t*)rbs_ast_ruby_annotations_return_type_annotation_new(
3666+
*annotation = (rbs_ast_ruby_annotations_t *) rbs_ast_ruby_annotations_return_type_annotation_new(
36673667
ALLOCATOR(),
36683668
full_loc,
36693669
rbs_loc,
@@ -3708,7 +3708,7 @@ static bool parse_inline_trailing_annotation(rbs_parser_t *parser, rbs_ast_ruby_
37083708
rbs_location_t *full_loc = rbs_location_new(ALLOCATOR(), full_range);
37093709
rbs_location_t *prefix_loc = rbs_location_new(ALLOCATOR(), prefix_range);
37103710

3711-
*annotation = (rbs_ast_ruby_annotations_t*)rbs_ast_ruby_annotations_node_type_assertion_new(
3711+
*annotation = (rbs_ast_ruby_annotations_t *) rbs_ast_ruby_annotations_node_type_assertion_new(
37123712
ALLOCATOR(),
37133713
full_loc,
37143714
prefix_loc,

0 commit comments

Comments
 (0)