Ruby 3.5.0dev (2025-01-10 revision 5fab31b15e32622c4b71d1d347a41937e9f9c212)
parser_node.h (5fab31b15e32622c4b71d1d347a41937e9f9c212)
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"
8
9#if defined(__cplusplus)
10extern "C" {
11#if 0
12} /* satisfy cc-mode */
13#endif
14#endif
15
16static inline rb_code_location_t
17code_loc_gen(const rb_code_location_t *loc1, const rb_code_location_t *loc2)
18{
20 loc.beg_pos = loc1->beg_pos;
21 loc.end_pos = loc2->end_pos;
22 return loc;
23}
24
25#if defined(__cplusplus)
26#if 0
27{ /* satisfy cc-mode */
28#endif
29} /* extern "C" { */
30#endif
31
32#endif /* RUBY_PARSER_NODE_H */