summaryrefslogtreecommitdiff
path: root/node_dump.c
AgeCommit message (Collapse)Author
2024-02-12Fix [BUG] unknown node for NODE_ENCODINGyui-knk
It should be `return` instead of `break`, otherwise `[BUG] dump_node: unknown node: NODE_ENCODING` happens.
2024-02-09Remove ruby object from string nodesyui-knk
String nodes holds ruby string object on `VALUE nd_lit`. This commit changes it to `struct rb_parser_string *string` to reduce dependency on ruby object. Sometimes these strings are concatenated with other string therefore string concatenate functions are needed.
2024-01-28Rename `nd_head` in `RNode_RESBODY` as `nd_next`Nobuyoshi Nakada
2024-01-27Introduce `NODE_ENCODING`S.H
`__ENCODING__ `was managed by `NODE_LIT` with Encoding object. Introduce `NODE_ENCODING` for 1. `__ENCODING__` is detectable from AST Node. 2. Reduce dependency Ruby object for parse.y
2024-01-09Introduce NODE_SYM to manage symbol literalyui-knk
`:sym` was managed by `NODE_LIT` with `Symbol` object. This commit introduces `NODE_SYM` so that 1. Symbol literal is detectable from AST Node 2. Reduce dependency on ruby object
2024-01-08Change numeric node value functions argument to `NODE *`yui-knk
Change the argument to align with other node value functions like `rb_node_line_lineno_val`.
2024-01-07Introduce Numeric Node'sS-H-GAMELINKS
2024-01-02Introduce NODE_FILEyui-knk
`__FILE__` was managed by `NODE_STR` with `String` object. This commit introduces `NODE_FILE` and `struct rb_parser_string` so that 1. `__FILE__` is detectable from AST Node 2. Reduce dependency ruby object
2023-12-29Introduce NODE_LINEyui-knk
`__LINE__` was managed by `NODE_LIT` with `Integer` object. This commit introduces `NODE_LINE` so that 1. `__LINE__` is detectable from AST Node 2. Reduce dependency ruby object
2023-12-27Print NODE_SELF nd_state fieldyui-knk
2023-10-30Embed `rb_args_info` in `rb_node_args_t`Nobuyoshi Nakada
2023-10-25Follow up NODE_OP_ASGN2 structure changeyui-knk
2023-10-20Expand OP_ASGN1 nd_args to nd_index and nd_rvalueyui-knk
ARGSCAT has been used for nd_args to hold index and rvalue, because there was limitation on the number of members for Node. We can easily change structure of node now, let's expand it.
2023-10-11Extract NODE_FL_NEWLINE access to macroyui-knk
2023-10-07Pass nd_value to NODE_REQUIRED_KEYWORD_Pyui-knk
2023-10-06Remove `NODE_VALUES`Nobuyoshi Nakada
This node type was added for the multi-value experiment back in 2004. The feature itself was removed after a few years, but this is its remnant.
2023-10-05Differentiate `NODE_BREAK`/`NODE_NEXT`/`NODE_RETURN`Nobuyoshi Nakada
2023-10-05Move internal NODE_DEF_TEMP to parse.yNobuyoshi Nakada
2023-10-01Use rb_node_opt_arg_t and rb_node_kw_arg_t instead of NODEyui-knk
2023-09-30Expand pattern_info struct into ARYPTN Node and FNDPTN Nodeyui-knk
2023-09-29Merge NODE_DEF_TEMP and NODE_DEF_TEMP2yui-knk
2023-09-29Merge RNode_OP_ASGN2 and RNode_OP_ASGN22yui-knk
2023-09-28Change RNode structure from union to structyui-knk
All kind of AST nodes use same struct RNode, which has u1, u2, u3 union members for holding different kind of data. This has two problems. 1. Low flexibility of data structure Some nodes, for example NODE_TRUE, don’t use u1, u2, u3. On the other hand, NODE_OP_ASGN2 needs more than three union members. However they use same structure definition, need to allocate three union members for NODE_TRUE and need to separate NODE_OP_ASGN2 into another node. This change removes the restriction so make it possible to change data structure by each node type. 2. No compile time check for union member access It’s developer’s responsibility for using correct member for each node type when it’s union. This change clarifies which node has which type of fields and enables compile time check. This commit also changes node_buffer_elem_struct buf management to handle different size data with alignment.
2023-08-23Remove nd_entry from NODE_GASGN and NODE_GVARyui-knk
After a0f12a0258e4020bd657ee80b7d8f22bd33ea223 NODE_GASGN and NODE_GVAR hold same value on both nd_vid and nd_entry. This commit stops setting value to nd_entry and makes to use only nd_vid. Notes: Merged: https://github.com/ruby/ruby/pull/8261
2023-08-22Wrap nd_head in node dump message with bracketsyui-knk
Notes: Merged: https://github.com/ruby/ruby/pull/8260
2023-06-18Fix the format of NODE_EVSTR rendered by dump_nodeyui-knk
Notes: Merged: https://github.com/ruby/ruby/pull/7955
2023-06-12[Feature #19719] Universal Parseryui-knk
Introduce Universal Parser mode for the parser. This commit includes these changes: * Introduce `UNIVERSAL_PARSER` macro. All of CRuby related functions are passed via `struct rb_parser_config_struct` when this macro is enabled. * Add CI task with 'cppflags=-DUNIVERSAL_PARSER' for ubuntu. Notes: Merged: https://github.com/ruby/ruby/pull/7927