Get rid of type-punning pointer casts
[ruby.git] / parser_node.h
blob295572067628118e08185cfdd2fe5dc95b8e4d8d
1 #ifndef RUBY_PARSER_NODE_H
2 #define RUBY_PARSER_NODE_H 1
3 /*
4 * This is a header file used by only "parse.y"
5 */
6 #include "rubyparser.h"
7 #include "internal/compilers.h"
9 #if defined(__cplusplus)
10 extern "C" {
11 #if 0
12 } /* satisfy cc-mode */
13 #endif
14 #endif
16 static inline rb_code_location_t
17 code_loc_gen(const rb_code_location_t *loc1, const rb_code_location_t *loc2)
19 rb_code_location_t loc;
20 loc.beg_pos = loc1->beg_pos;
21 loc.end_pos = loc2->end_pos;
22 return loc;
25 #if defined(__cplusplus)
26 #if 0
27 { /* satisfy cc-mode */
28 #endif
29 } /* extern "C" { */
30 #endif
32 #endif /* RUBY_PARSER_NODE_H */