Ruby  2.5.0dev(2017-10-22revision60238)
node.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  node.h -
4 
5  $Author$
6  created at: Fri May 28 15:14:02 JST 1993
7 
8  Copyright (C) 1993-2007 Yukihiro Matsumoto
9 
10 **********************************************************************/
11 
12 #ifndef RUBY_NODE_H
13 #define RUBY_NODE_H 1
14 
15 #if defined(__cplusplus)
16 extern "C" {
17 #if 0
18 } /* satisfy cc-mode */
19 #endif
20 #endif
21 
22 enum node_type {
24 #define NODE_SCOPE NODE_SCOPE
26 #define NODE_BLOCK NODE_BLOCK
28 #define NODE_IF NODE_IF
30 #define NODE_UNLESS NODE_UNLESS
32 #define NODE_CASE NODE_CASE
34 #define NODE_WHEN NODE_WHEN
36 #define NODE_OPT_N NODE_OPT_N
38 #define NODE_WHILE NODE_WHILE
40 #define NODE_UNTIL NODE_UNTIL
42 #define NODE_ITER NODE_ITER
44 #define NODE_FOR NODE_FOR
46 #define NODE_BREAK NODE_BREAK
48 #define NODE_NEXT NODE_NEXT
50 #define NODE_REDO NODE_REDO
52 #define NODE_RETRY NODE_RETRY
54 #define NODE_BEGIN NODE_BEGIN
56 #define NODE_RESCUE NODE_RESCUE
58 #define NODE_RESBODY NODE_RESBODY
60 #define NODE_ENSURE NODE_ENSURE
62 #define NODE_AND NODE_AND
64 #define NODE_OR NODE_OR
66 #define NODE_MASGN NODE_MASGN
68 #define NODE_LASGN NODE_LASGN
70 #define NODE_DASGN NODE_DASGN
72 #define NODE_DASGN_CURR NODE_DASGN_CURR
74 #define NODE_GASGN NODE_GASGN
76 #define NODE_IASGN NODE_IASGN
78 #define NODE_CDECL NODE_CDECL
80 #define NODE_CVASGN NODE_CVASGN
82 #define NODE_OP_ASGN1 NODE_OP_ASGN1
84 #define NODE_OP_ASGN2 NODE_OP_ASGN2
86 #define NODE_OP_ASGN_AND NODE_OP_ASGN_AND
88 #define NODE_OP_ASGN_OR NODE_OP_ASGN_OR
90 #define NODE_OP_CDECL NODE_OP_CDECL
92 #define NODE_CALL NODE_CALL
94 #define NODE_OPCALL NODE_OPCALL
96 #define NODE_FCALL NODE_FCALL
98 #define NODE_VCALL NODE_VCALL
100 #define NODE_QCALL NODE_QCALL
102 #define NODE_SUPER NODE_SUPER
104 #define NODE_ZSUPER NODE_ZSUPER
106 #define NODE_ARRAY NODE_ARRAY
108 #define NODE_ZARRAY NODE_ZARRAY
110 #define NODE_VALUES NODE_VALUES
112 #define NODE_HASH NODE_HASH
114 #define NODE_RETURN NODE_RETURN
116 #define NODE_YIELD NODE_YIELD
118 #define NODE_LVAR NODE_LVAR
120 #define NODE_DVAR NODE_DVAR
122 #define NODE_GVAR NODE_GVAR
124 #define NODE_IVAR NODE_IVAR
126 #define NODE_CONST NODE_CONST
128 #define NODE_CVAR NODE_CVAR
130 #define NODE_NTH_REF NODE_NTH_REF
132 #define NODE_BACK_REF NODE_BACK_REF
134 #define NODE_MATCH NODE_MATCH
136 #define NODE_MATCH2 NODE_MATCH2
138 #define NODE_MATCH3 NODE_MATCH3
140 #define NODE_LIT NODE_LIT
142 #define NODE_STR NODE_STR
144 #define NODE_DSTR NODE_DSTR
146 #define NODE_XSTR NODE_XSTR
148 #define NODE_DXSTR NODE_DXSTR
150 #define NODE_EVSTR NODE_EVSTR
152 #define NODE_DREGX NODE_DREGX
154 #define NODE_DREGX_ONCE NODE_DREGX_ONCE
156 #define NODE_ARGS NODE_ARGS
158 #define NODE_ARGS_AUX NODE_ARGS_AUX
160 #define NODE_OPT_ARG NODE_OPT_ARG
162 #define NODE_KW_ARG NODE_KW_ARG
164 #define NODE_POSTARG NODE_POSTARG
166 #define NODE_ARGSCAT NODE_ARGSCAT
168 #define NODE_ARGSPUSH NODE_ARGSPUSH
170 #define NODE_SPLAT NODE_SPLAT
172 #define NODE_TO_ARY NODE_TO_ARY
174 #define NODE_BLOCK_ARG NODE_BLOCK_ARG
176 #define NODE_BLOCK_PASS NODE_BLOCK_PASS
178 #define NODE_DEFN NODE_DEFN
180 #define NODE_DEFS NODE_DEFS
182 #define NODE_ALIAS NODE_ALIAS
184 #define NODE_VALIAS NODE_VALIAS
186 #define NODE_UNDEF NODE_UNDEF
188 #define NODE_CLASS NODE_CLASS
190 #define NODE_MODULE NODE_MODULE
192 #define NODE_SCLASS NODE_SCLASS
194 #define NODE_COLON2 NODE_COLON2
196 #define NODE_COLON3 NODE_COLON3
198 #define NODE_DOT2 NODE_DOT2
200 #define NODE_DOT3 NODE_DOT3
202 #define NODE_FLIP2 NODE_FLIP2
204 #define NODE_FLIP3 NODE_FLIP3
206 #define NODE_SELF NODE_SELF
208 #define NODE_NIL NODE_NIL
210 #define NODE_TRUE NODE_TRUE
212 #define NODE_FALSE NODE_FALSE
214 #define NODE_ERRINFO NODE_ERRINFO
216 #define NODE_DEFINED NODE_DEFINED
218 #define NODE_POSTEXE NODE_POSTEXE
220 #define NODE_BMETHOD NODE_BMETHOD
222 #define NODE_DSYM NODE_DSYM
224 #define NODE_ATTRASGN NODE_ATTRASGN
226 #define NODE_PRELUDE NODE_PRELUDE
228 #define NODE_LAMBDA NODE_LAMBDA
229  NODE_LAST
230 #define NODE_LAST NODE_LAST
231 };
232 
233 typedef struct RNode {
235  VALUE nd_reserved; /* ex nd_file */
236  union {
237  struct RNode *node;
241  ID *tbl;
242  } u1;
243  union {
244  struct RNode *node;
245  ID id;
246  long argc;
247  VALUE value;
248  } u2;
249  union {
250  struct RNode *node;
251  ID id;
252  long state;
255  long cnt;
256  VALUE value;
257  } u3;
258 } NODE;
259 
260 #define RNODE(obj) (R_CAST(RNode)(obj))
261 
262 /* FL : 0..4: T_TYPES, 5: KEEP_WB, 6: PROMOTED, 7: FINALIZE, 8: TAINT, 9: UNTRUSTED, 10: EXIVAR, 11: FREEZE */
263 /* NODE_FL: 0..4: T_TYPES, 5: KEEP_WB, 6: PROMOTED, 7: NODE_FL_NEWLINE|NODE_FL_CREF_PUSHED_BY_EVAL,
264  * 8..14: nd_type,
265  * 15..: nd_line
266  */
267 #define NODE_FL_NEWLINE (((VALUE)1)<<7)
268 
269 #define NODE_TYPESHIFT 8
270 #define NODE_TYPEMASK (((VALUE)0x7f)<<NODE_TYPESHIFT)
271 
272 #define nd_type(n) ((int) (((RNODE(n))->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
273 #define nd_set_type(n,t) \
274  RNODE(n)->flags=((RNODE(n)->flags&~NODE_TYPEMASK)|((((unsigned long)(t))<<NODE_TYPESHIFT)&NODE_TYPEMASK))
275 
276 #define NODE_LSHIFT (NODE_TYPESHIFT+7)
277 #define NODE_LMASK (((SIGNED_VALUE)1<<(sizeof(VALUE)*CHAR_BIT-NODE_LSHIFT))-1)
278 #define nd_line(n) (int)(((SIGNED_VALUE)RNODE(n)->flags)>>NODE_LSHIFT)
279 #define nd_set_line(n,l) \
280  RNODE(n)->flags=((RNODE(n)->flags&~((VALUE)(-1)<<NODE_LSHIFT))|((VALUE)((l)&NODE_LMASK)<<NODE_LSHIFT))
281 #define nd_column(n) (int)(RNODE(n)->nd_reserved)
282 #define nd_set_column(n, v) (RNODE(n)->nd_reserved=v)
283 
284 #define nd_head u1.node
285 #define nd_alen u2.argc
286 #define nd_next u3.node
287 
288 #define nd_cond u1.node
289 #define nd_body u2.node
290 #define nd_else u3.node
291 
292 #define nd_orig u3.value
293 
294 #define nd_resq u2.node
295 #define nd_ensr u3.node
296 
297 #define nd_1st u1.node
298 #define nd_2nd u2.node
299 
300 #define nd_stts u1.node
301 
302 #define nd_entry u3.entry
303 #define nd_vid u1.id
304 #define nd_cflag u2.id
305 #define nd_cval u3.value
306 
307 #define nd_oid u1.id
308 #define nd_cnt u3.cnt
309 #define nd_tbl u1.tbl
310 
311 #define nd_var u1.node
312 #define nd_iter u3.node
313 
314 #define nd_value u2.node
315 #define nd_aid u3.id
316 
317 #define nd_lit u1.value
318 
319 #define nd_frml u2.argc
320 #define nd_rest u1.id
321 #define nd_opt u1.node
322 #define nd_pid u1.id
323 #define nd_plen u2.argc
324 
325 #define nd_recv u1.node
326 #define nd_mid u2.id
327 #define nd_args u3.node
328 #define nd_ainfo u3.args
329 
330 #define nd_noex u3.id
331 #define nd_defn u3.node
332 
333 #define nd_cfnc u1.cfunc
334 #define nd_argc u2.argc
335 
336 #define nd_cpath u1.node
337 #define nd_super u3.node
338 
339 #define nd_modl u1.id
340 #define nd_clss_ u1.value
341 
342 #define nd_beg u1.node
343 #define nd_end u2.node
344 #define nd_state u3.state
345 #define nd_rval u2.value
346 
347 #define nd_nth u2.argc
348 
349 #define nd_tag u1.id
350 #define nd_tval u2.value
351 
352 #define nd_visi_ u2.argc
353 
354 #define NEW_NODE(t,a0,a1,a2) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2))
355 
356 #define NEW_DEFN(i,a,d,p) NEW_NODE(NODE_DEFN,0,i,NEW_SCOPE(a,d))
357 #define NEW_DEFS(r,i,a,d) NEW_NODE(NODE_DEFS,r,i,NEW_SCOPE(a,d))
358 #define NEW_SCOPE(a,b) NEW_NODE(NODE_SCOPE,local_tbl(),b,a)
359 #define NEW_BLOCK(a) NEW_NODE(NODE_BLOCK,a,0,0)
360 #define NEW_IF(c,t,e) NEW_NODE(NODE_IF,c,t,e)
361 #define NEW_UNLESS(c,t,e) NEW_NODE(NODE_UNLESS,c,t,e)
362 #define NEW_CASE(h,b) NEW_NODE(NODE_CASE,h,b,0)
363 #define NEW_WHEN(c,t,e) NEW_NODE(NODE_WHEN,c,t,e)
364 #define NEW_OPT_N(b) NEW_NODE(NODE_OPT_N,0,b,0)
365 #define NEW_WHILE(c,b,n) NEW_NODE(NODE_WHILE,c,b,n)
366 #define NEW_UNTIL(c,b,n) NEW_NODE(NODE_UNTIL,c,b,n)
367 #define NEW_FOR(v,i,b) NEW_NODE(NODE_FOR,v,b,i)
368 #define NEW_ITER(a,b) NEW_NODE(NODE_ITER,0,NEW_SCOPE(a,b),0)
369 #define NEW_LAMBDA(a,b) NEW_NODE(NODE_LAMBDA,0,NEW_SCOPE(a,b),0)
370 #define NEW_BREAK(s) NEW_NODE(NODE_BREAK,s,0,0)
371 #define NEW_NEXT(s) NEW_NODE(NODE_NEXT,s,0,0)
372 #define NEW_REDO() NEW_NODE(NODE_REDO,0,0,0)
373 #define NEW_RETRY() NEW_NODE(NODE_RETRY,0,0,0)
374 #define NEW_BEGIN(b) NEW_NODE(NODE_BEGIN,0,b,0)
375 #define NEW_RESCUE(b,res,e) NEW_NODE(NODE_RESCUE,b,res,e)
376 #define NEW_RESBODY(a,ex,n) NEW_NODE(NODE_RESBODY,n,ex,a)
377 #define NEW_ENSURE(b,en) NEW_NODE(NODE_ENSURE,b,0,en)
378 #define NEW_RETURN(s) NEW_NODE(NODE_RETURN,s,0,0)
379 #define NEW_YIELD(a) NEW_NODE(NODE_YIELD,a,0,0)
380 #define NEW_LIST(a) NEW_ARRAY(a)
381 #define NEW_ARRAY(a) NEW_NODE(NODE_ARRAY,a,1,0)
382 #define NEW_ZARRAY() NEW_NODE(NODE_ZARRAY,0,0,0)
383 #define NEW_HASH(a) NEW_NODE(NODE_HASH,a,0,0)
384 #define NEW_MASGN(l,r) NEW_NODE(NODE_MASGN,l,0,r)
385 #define NEW_GASGN(v,val) NEW_NODE(NODE_GASGN,v,val,rb_global_entry(v))
386 #define NEW_LASGN(v,val) NEW_NODE(NODE_LASGN,v,val,0)
387 #define NEW_DASGN(v,val) NEW_NODE(NODE_DASGN,v,val,0)
388 #define NEW_DASGN_CURR(v,val) NEW_NODE(NODE_DASGN_CURR,v,val,0)
389 #define NEW_IASGN(v,val) NEW_NODE(NODE_IASGN,v,val,0)
390 #define NEW_CDECL(v,val,path) NEW_NODE(NODE_CDECL,v,val,path)
391 #define NEW_CVASGN(v,val) NEW_NODE(NODE_CVASGN,v,val,0)
392 #define NEW_OP_ASGN1(p,id,a) NEW_NODE(NODE_OP_ASGN1,p,id,a)
393 #define NEW_OP_ASGN2(r,t,i,o,val) NEW_NODE(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o,t))
394 #define NEW_OP_ASGN22(i,o,t) NEW_NODE(NODE_OP_ASGN2,i,o,t)
395 #define NEW_OP_ASGN_OR(i,val) NEW_NODE(NODE_OP_ASGN_OR,i,val,0)
396 #define NEW_OP_ASGN_AND(i,val) NEW_NODE(NODE_OP_ASGN_AND,i,val,0)
397 #define NEW_OP_CDECL(v,op,val) NEW_NODE(NODE_OP_CDECL,v,val,op)
398 #define NEW_GVAR(v) NEW_NODE(NODE_GVAR,v,0,rb_global_entry(v))
399 #define NEW_LVAR(v) NEW_NODE(NODE_LVAR,v,0,0)
400 #define NEW_DVAR(v) NEW_NODE(NODE_DVAR,v,0,0)
401 #define NEW_IVAR(v) NEW_NODE(NODE_IVAR,v,0,0)
402 #define NEW_CONST(v) NEW_NODE(NODE_CONST,v,0,0)
403 #define NEW_CVAR(v) NEW_NODE(NODE_CVAR,v,0,0)
404 #define NEW_NTH_REF(n) NEW_NODE(NODE_NTH_REF,0,n,0)
405 #define NEW_BACK_REF(n) NEW_NODE(NODE_BACK_REF,0,n,0)
406 #define NEW_MATCH(c) NEW_NODE(NODE_MATCH,c,0,0)
407 #define NEW_MATCH2(n1,n2) NEW_NODE(NODE_MATCH2,n1,n2,0)
408 #define NEW_MATCH3(r,n2) NEW_NODE(NODE_MATCH3,r,n2,0)
409 #define NEW_LIT(l) NEW_NODE(NODE_LIT,l,0,0)
410 #define NEW_STR(s) NEW_NODE(NODE_STR,s,0,0)
411 #define NEW_DSTR(s) NEW_NODE(NODE_DSTR,s,1,0)
412 #define NEW_XSTR(s) NEW_NODE(NODE_XSTR,s,0,0)
413 #define NEW_DXSTR(s) NEW_NODE(NODE_DXSTR,s,0,0)
414 #define NEW_DSYM(s) NEW_NODE(NODE_DSYM,s,0,0)
415 #define NEW_EVSTR(n) NEW_NODE(NODE_EVSTR,0,(n),0)
416 #define NEW_CALL(r,m,a) NEW_NODE(NODE_CALL,r,m,a)
417 #define NEW_OPCALL(r,m,a) NEW_NODE(NODE_OPCALL,r,m,a)
418 #define NEW_FCALL(m,a) NEW_NODE(NODE_FCALL,0,m,a)
419 #define NEW_VCALL(m) NEW_NODE(NODE_VCALL,0,m,0)
420 #define NEW_SUPER(a) NEW_NODE(NODE_SUPER,0,0,a)
421 #define NEW_ZSUPER() NEW_NODE(NODE_ZSUPER,0,0,0)
422 #define NEW_ARGS_AUX(r,b) NEW_NODE(NODE_ARGS_AUX,r,b,0)
423 #define NEW_OPT_ARG(i,v) NEW_NODE(NODE_OPT_ARG,i,v,0)
424 #define NEW_KW_ARG(i,v) NEW_NODE(NODE_KW_ARG,i,v,0)
425 #define NEW_POSTARG(i,v) NEW_NODE(NODE_POSTARG,i,v,0)
426 #define NEW_ARGSCAT(a,b) NEW_NODE(NODE_ARGSCAT,a,b,0)
427 #define NEW_ARGSPUSH(a,b) NEW_NODE(NODE_ARGSPUSH,a,b,0)
428 #define NEW_SPLAT(a) NEW_NODE(NODE_SPLAT,a,0,0)
429 #define NEW_TO_ARY(a) NEW_NODE(NODE_TO_ARY,a,0,0)
430 #define NEW_BLOCK_ARG(v) NEW_NODE(NODE_BLOCK_ARG,v,0,local_cnt(v))
431 #define NEW_BLOCK_PASS(b) NEW_NODE(NODE_BLOCK_PASS,0,b,0)
432 #define NEW_ALIAS(n,o) NEW_NODE(NODE_ALIAS,n,o,0)
433 #define NEW_VALIAS(n,o) NEW_NODE(NODE_VALIAS,n,o,0)
434 #define NEW_UNDEF(i) NEW_NODE(NODE_UNDEF,0,i,0)
435 #define NEW_CLASS(n,b,s) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(0,b),(s))
436 #define NEW_SCLASS(r,b) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(0,b),0)
437 #define NEW_MODULE(n,b) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(0,b),0)
438 #define NEW_COLON2(c,i) NEW_NODE(NODE_COLON2,c,i,0)
439 #define NEW_COLON3(i) NEW_NODE(NODE_COLON3,0,i,0)
440 #define NEW_DOT2(b,e) NEW_NODE(NODE_DOT2,b,e,0)
441 #define NEW_DOT3(b,e) NEW_NODE(NODE_DOT3,b,e,0)
442 #define NEW_SELF() NEW_NODE(NODE_SELF,0,0,0)
443 #define NEW_NIL() NEW_NODE(NODE_NIL,0,0,0)
444 #define NEW_TRUE() NEW_NODE(NODE_TRUE,0,0,0)
445 #define NEW_FALSE() NEW_NODE(NODE_FALSE,0,0,0)
446 #define NEW_ERRINFO() NEW_NODE(NODE_ERRINFO,0,0,0)
447 #define NEW_DEFINED(e) NEW_NODE(NODE_DEFINED,e,0,0)
448 #define NEW_PREEXE(b) NEW_SCOPE(b)
449 #define NEW_POSTEXE(b) NEW_NODE(NODE_POSTEXE,0,b,0)
450 #define NEW_BMETHOD(b) NEW_NODE(NODE_BMETHOD,0,0,b)
451 #define NEW_ATTRASGN(r,m,a) NEW_NODE(NODE_ATTRASGN,r,m,a)
452 #define NEW_PRELUDE(p,b,o) NEW_NODE(NODE_PRELUDE,p,b,o)
453 
455 
456 VALUE rb_parser_new(void);
461 VALUE rb_parser_dump_tree(NODE *node, int comment);
463 NODE *rb_parser_while_loop(VALUE, NODE *, int, int);
464 
465 NODE *rb_parser_compile_cstr(VALUE, const char*, const char*, int, int);
466 NODE *rb_parser_compile_string(VALUE, const char*, VALUE, int);
467 NODE *rb_parser_compile_file(VALUE, const char*, VALUE, int);
468 NODE *rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line);
469 NODE *rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line);
470 
471 NODE *rb_compile_cstr(const char*, const char*, int, int);
472 NODE *rb_compile_string(const char*, VALUE, int);
473 NODE *rb_compile_file(const char*, VALUE, int);
474 
476 void rb_gc_free_node(VALUE obj);
477 size_t rb_node_memsize(VALUE obj);
479 
480 const struct kwtable *rb_reserved_word(const char *, unsigned int);
481 
482 struct rb_args_info {
485 
486  int pre_args_num; /* count of mandatory pre-arguments */
487  int post_args_num; /* count of mandatory post-arguments */
488 
490 
493 
496 
498 };
499 
500 struct parser_params;
501 void *rb_parser_malloc(struct parser_params *, size_t);
502 void *rb_parser_realloc(struct parser_params *, void *, size_t);
503 void *rb_parser_calloc(struct parser_params *, size_t, size_t);
504 void rb_parser_free(struct parser_params *, void *);
505 void rb_parser_printf(struct parser_params *parser, const char *fmt, ...);
506 
508 
509 #if defined(__cplusplus)
510 #if 0
511 { /* satisfy cc-mode */
512 #endif
513 } /* extern "C" { */
514 #endif
515 
516 #endif /* RUBY_NODE_H */
#define NODE_LIT
Definition: node.h:140
VALUE rb_parser_set_yydebug(VALUE, VALUE)
Definition: ripper.c:17457
#define NODE_ZSUPER
Definition: node.h:104
Definition: lex.c:33
VALUE rb_parser_get_yydebug(VALUE)
Definition: ripper.c:17442
VALUE rb_parser_end_seen_p(VALUE)
Definition: ripper.c:17412
VALUE nd_reserved
Definition: node.h:235
#define NODE_ATTRASGN
Definition: node.h:224
#define NODE_DASGN_CURR
Definition: node.h:72
#define NODE_TO_ARY
Definition: node.h:172
#define NODE_BACK_REF
Definition: node.h:132
#define NODE_ARGSCAT
Definition: node.h:166
#define NODE_OPT_ARG
Definition: node.h:160
#define NODE_OP_ASGN1
Definition: node.h:82
size_t rb_node_memsize(VALUE obj)
Definition: node.c:1079
#define NODE_OPCALL
Definition: node.h:94
#define NODE_BLOCK_ARG
Definition: node.h:174
#define NODE_QCALL
Definition: node.h:100
#define NODE_DXSTR
Definition: node.h:148
#define NODE_OP_ASGN_OR
Definition: node.h:88
#define NODE_POSTARG
Definition: node.h:164
void * rb_parser_malloc(struct parser_params *, size_t)
Definition: ripper.c:17474
#define NODE_HASH
Definition: node.h:112
NODE * rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line)
Definition: ripper.c:11540
#define NODE_POSTEXE
Definition: node.h:218
#define NODE_UNTIL
Definition: node.h:40
node_type
Definition: node.h:22
#define NODE_CASE
Definition: node.h:32
#define NODE_NIL
Definition: node.h:208
#define NODE_OP_CDECL
Definition: node.h:90
VALUE rb_parser_dump_tree(NODE *node, int comment)
Definition: node.c:1049
#define NODE_IVAR
Definition: node.h:124
#define NODE_LAST
Definition: node.h:230
#define NODE_CVAR
Definition: node.h:128
#define NODE_CONST
Definition: node.h:126
union RNode::@90 u3
#define NODE_COLON2
Definition: node.h:194
ID id
Definition: node.h:238
#define NODE_DSTR
Definition: node.h:144
int pre_args_num
Definition: node.h:486
#define NODE_OR
Definition: node.h:64
NODE * rb_node_newnode(enum node_type, VALUE, VALUE, VALUE)
Definition: gc.c:2010
NODE * rb_parser_compile_file(VALUE, const char *, VALUE, int)
Definition: ripper.c:11577
NODE * pre_init
Definition: node.h:483
ID block_arg
Definition: node.h:492
long argc
Definition: node.h:246
#define NODE_OP_ASGN_AND
Definition: node.h:86
struct RNode * node
Definition: node.h:237
#define NODE_UNLESS
Definition: node.h:30
#define NODE_BREAK
Definition: node.h:46
#define NODE_LVAR
Definition: node.h:118
ID * tbl
Definition: node.h:241
#define NODE_ARGS_AUX
Definition: node.h:158
#define NODE_VALUES
Definition: node.h:110
#define NODE_FALSE
Definition: node.h:212
Definition: node.h:233
#define NODE_OP_ASGN2
Definition: node.h:84
#define NODE_IASGN
Definition: node.h:76
#define NODE_ARGS
Definition: node.h:156
#define NODE_DVAR
Definition: node.h:120
#define NODE_GASGN
Definition: node.h:74
void * rb_parser_realloc(struct parser_params *, void *, size_t)
Definition: ripper.c:17494
void * rb_parser_calloc(struct parser_params *, size_t, size_t)
Definition: ripper.c:17484
#define NODE_REDO
Definition: node.h:50
#define NODE_CVASGN
Definition: node.h:80
#define NODE_VCALL
Definition: node.h:98
unsigned int input
Definition: nkf.c:4312
#define NODE_BEGIN
Definition: node.h:54
Definition: internal.h:1017
NODE * rb_compile_string(const char *, VALUE, int)
Definition: ripper.c:11527
#define NODE_IF
Definition: node.h:28
#define NODE_SPLAT
Definition: node.h:170
#define NODE_TRUE
Definition: node.h:210
NODE * rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line)
Definition: ripper.c:11583
#define NODE_OPT_N
Definition: node.h:36
NODE * opt_args
Definition: node.h:497
VALUE value
Definition: node.h:239
#define NODE_LASGN
Definition: node.h:68
#define NODE_DSYM
Definition: node.h:222
#define NODE_FLIP2
Definition: node.h:202
#define NODE_DREGX_ONCE
Definition: node.h:154
#define NODE_CLASS
Definition: node.h:188
#define NODE_SCLASS
Definition: node.h:192
#define NODE_DASGN
Definition: node.h:70
#define NODE_WHEN
Definition: node.h:34
long cnt
Definition: node.h:255
#define NODE_RESBODY
Definition: node.h:58
#define NODE_COLON3
Definition: node.h:196
VALUE rb_parser_encoding(VALUE)
Definition: ripper.c:17427
VALUE rb_gc_mark_node(NODE *obj)
Definition: node.c:1098
#define NODE_DOT2
Definition: node.h:198
#define NODE_ITER
Definition: node.h:42
#define NODE_MATCH3
Definition: node.h:138
ID rest_arg
Definition: node.h:491
#define NODE_RESCUE
Definition: node.h:56
NODE * rb_parser_append_print(VALUE, NODE *)
Definition: ripper.c:17152
NODE * rb_compile_file(const char *, VALUE, int)
Definition: ripper.c:11569
#define NODE_BLOCK_PASS
Definition: node.h:176
#define NODE_DEFINED
Definition: node.h:216
#define NODE_SELF
Definition: node.h:206
#define RUBY_SYMBOL_EXPORT_END
Definition: missing.h:49
#define NODE_DOT3
Definition: node.h:200
unsigned long ID
Definition: ruby.h:86
unsigned long VALUE
Definition: ruby.h:85
NODE * post_init
Definition: node.h:484
struct rb_global_entry * entry
Definition: node.h:253
#define RUBY_SYMBOL_EXPORT_BEGIN
Definition: missing.h:48
#define NODE_NTH_REF
Definition: node.h:130
#define NODE_MATCH
Definition: node.h:134
#define NODE_CDECL
Definition: node.h:78
int post_args_num
Definition: node.h:487
#define NODE_DREGX
Definition: node.h:152
#define NODE_FCALL
Definition: node.h:96
#define NODE_FOR
Definition: node.h:44
VALUE flags
Definition: node.h:234
VALUE(* cfunc)(ANYARGS)
Definition: node.h:240
void rb_gc_free_node(VALUE obj)
Definition: node.c:1062
RUBY_SYMBOL_EXPORT_BEGIN VALUE rb_parser_new(void)
Definition: ripper.c:17357
#define NODE_YIELD
Definition: node.h:116
#define NODE_CALL
Definition: node.h:92
#define NODE_NEXT
Definition: node.h:48
NODE * rb_parser_compile_cstr(VALUE, const char *, const char *, int, int)
Definition: ripper.c:11554
#define ANYARGS
Definition: defines.h:173
#define NODE_AND
Definition: node.h:62
long state
Definition: node.h:252
#define NODE_SCOPE
Definition: node.h:24
void rb_parser_printf(struct parser_params *parser, const char *fmt,...)
Definition: ripper.c:17531
union RNode::@88 u1
#define NODE_DEFS
Definition: node.h:180
#define NODE_STR
Definition: node.h:142
NODE * rb_parser_compile_string(VALUE, const char *, VALUE, int)
Definition: ripper.c:11534
#define NODE_BMETHOD
Definition: node.h:220
#define NODE_ARGSPUSH
Definition: node.h:168
#define NODE_MASGN
Definition: node.h:66
union RNode::@89 u2
#define NODE_GVAR
Definition: node.h:122
struct RNode NODE
void rb_parser_free(struct parser_params *, void *)
Definition: ripper.c:17514
#define NODE_VALIAS
Definition: node.h:184
#define NODE_XSTR
Definition: node.h:146
NODE * rb_parser_while_loop(VALUE, NODE *, int, int)
Definition: ripper.c:17185
#define NODE_KW_ARG
Definition: node.h:162
#define NODE_EVSTR
Definition: node.h:150
#define NODE_BLOCK
Definition: node.h:26
#define NODE_RETRY
Definition: node.h:52
#define NODE_MATCH2
Definition: node.h:136
const struct kwtable * rb_reserved_word(const char *, unsigned int)
Definition: ripper.c:17351
#define NODE_LAMBDA
Definition: node.h:228
struct rb_args_info * args
Definition: node.h:254
#define NODE_MODULE
Definition: node.h:190
#define NODE_WHILE
Definition: node.h:38
ID first_post_arg
Definition: node.h:489
#define NODE_DEFN
Definition: node.h:178
#define NODE_PRELUDE
Definition: node.h:226
#define NODE_ZARRAY
Definition: node.h:108
NODE * kw_args
Definition: node.h:494
#define NODE_SUPER
Definition: node.h:102
#define NODE_RETURN
Definition: node.h:114
#define NODE_ENSURE
Definition: node.h:60
#define NODE_UNDEF
Definition: node.h:186
#define NODE_ALIAS
Definition: node.h:182
NODE * kw_rest_arg
Definition: node.h:495
NODE * rb_compile_cstr(const char *, const char *, int, int)
Definition: ripper.c:11547
#define NODE_ARRAY
Definition: node.h:106
#define NODE_FLIP3
Definition: node.h:204
#define NODE_ERRINFO
Definition: node.h:214