mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Implement RubyVM::AST.of
[Feature #14836]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6d497629b2
commit
ce798d08de
7 changed files with 94 additions and 7 deletions
3
node.h
3
node.h
|
@ -164,6 +164,7 @@ typedef struct RNode {
|
|||
VALUE value;
|
||||
} u3;
|
||||
rb_code_location_t nd_loc;
|
||||
int node_id;
|
||||
} NODE;
|
||||
|
||||
#define RNODE(obj) (R_CAST(RNode)(obj))
|
||||
|
@ -201,6 +202,8 @@ typedef struct RNode {
|
|||
#define nd_set_last_lineno(n, v) ((n)->nd_loc.end_pos.lineno = (v))
|
||||
#define nd_last_loc(n) ((n)->nd_loc.end_pos)
|
||||
#define nd_set_last_loc(n, v) (nd_last_loc(n) = (v))
|
||||
#define nd_node_id(n) ((n)->node_id)
|
||||
#define nd_set_node_id(n,id) ((n)->node_id = (id))
|
||||
|
||||
#define nd_head u1.node
|
||||
#define nd_alen u2.argc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue