Ruby  1.9.3p537(2014-02-19revision0)
Functions | Variables
rubynode.c File Reference
#include "ruby/ruby.h"
#include "vm_core.h"
#include "node.h"
#include "node_attr_map.inc"
#include <ctype.h>
#include "node_attr_is_value.inc"
#include "node_nd_attr.inc"

Go to the source code of this file.

Functions

static void rnode_mark (NODE *node)
static VALUE node_to_rnode (NODE *node)
static VALUE node_type_to_sym (int node)
static VALUE rnode_type (VALUE self)
static VALUE rnode_flags (VALUE self)
static VALUE rnode_reserved (VALUE self)
static VALUE rnode_line (VALUE self)
static VALUE id_to_value (ID id)
static VALUE node_attr_is_value (enum node_type nd_type, int union_idx)
static VALUE value_or_node_to_value (VALUE val, enum node_type nd_type, int union_idx, NODE *node)
static VALUE rnode_u1_value_or_node (VALUE self)
static VALUE rnode_u2_value_or_node (VALUE self)
static VALUE rnode_u3_value_or_node (VALUE self)
static VALUE rnode_u1_id (VALUE self)
static VALUE rnode_u2_id (VALUE self)
static VALUE rnode_u3_id (VALUE self)
static VALUE rnode_u1_as_long (VALUE self)
static VALUE rnode_u1_cfunc (VALUE self)
static VALUE rnode_u2_argc (VALUE self)
static VALUE rnode_u3_state_or_cnt (VALUE self)
static VALUE rnode_u1_tbl (VALUE self)
static NODEstr_parse (int argc, VALUE *argv, VALUE src)
static VALUE str_parse_to_nodes (int argc, VALUE *argv, VALUE src)
void Init_Node ()

Variables

static VALUE rb_cNode

Function Documentation

static VALUE id_to_value ( ID  id) [static]

Definition at line 71 of file rubynode.c.

References ID2SYM, INT2FIX, Qnil, and rb_id2name().

Referenced by rnode_u1_id(), rnode_u2_id(), rnode_u3_id(), and value_or_node_to_value().

void Init_Node ( )
static VALUE node_attr_is_value ( enum node_type  nd_type,
int  union_idx 
) [static]

Definition at line 80 of file rubynode.c.

References Qfalse.

Referenced by value_or_node_to_value().

static VALUE node_to_rnode ( NODE node) [static]

Definition at line 19 of file rubynode.c.

References Data_Wrap_Struct, Qnil, rb_cNode, and rnode_mark().

Referenced by str_parse_to_nodes(), and value_or_node_to_value().

static VALUE node_type_to_sym ( int  node) [static]

Definition at line 26 of file rubynode.c.

References free, ID2SYM, rb_intern, ruby_node_name(), strdup, strlen(), and sym.

Referenced by rnode_type().

static VALUE rnode_flags ( VALUE  self) [static]

Definition at line 49 of file rubynode.c.

References Data_Get_Struct, RNode::flags, node, and ULONG2NUM().

Referenced by Init_Node().

static VALUE rnode_line ( VALUE  self) [static]

Definition at line 63 of file rubynode.c.

References Data_Get_Struct, nd_line, node, and UINT2NUM().

Referenced by Init_Node().

static void rnode_mark ( NODE node) [static]

Definition at line 13 of file rubynode.c.

References rb_gc_mark().

Referenced by node_to_rnode().

static VALUE rnode_reserved ( VALUE  self) [static]

Definition at line 57 of file rubynode.c.

References Qnil.

Referenced by Init_Node().

static VALUE rnode_type ( VALUE  self) [static]

Definition at line 41 of file rubynode.c.

References Data_Get_Struct, nd_type, node, and node_type_to_sym().

Referenced by Init_Node().

static VALUE rnode_u1_as_long ( VALUE  self) [static]

Definition at line 215 of file rubynode.c.

References Data_Get_Struct, RNode::id, LONG2NUM, node, and RNode::u1.

Referenced by Init_Node().

static VALUE rnode_u1_cfunc ( VALUE  self) [static]

Definition at line 223 of file rubynode.c.

References RNode::cfunc, Data_Get_Struct, node, RNode::u1, and ULONG2NUM().

Referenced by Init_Node().

static VALUE rnode_u1_id ( VALUE  self) [static]

Definition at line 191 of file rubynode.c.

References Data_Get_Struct, RNode::id, id_to_value(), node, and RNode::u1.

Referenced by Init_Node().

static VALUE rnode_u1_tbl ( VALUE  self) [static]
static VALUE rnode_u1_value_or_node ( VALUE  self) [static]

Definition at line 167 of file rubynode.c.

References Data_Get_Struct, nd_type, node, RNode::u1, RNode::value, and value_or_node_to_value().

Referenced by Init_Node().

static VALUE rnode_u2_argc ( VALUE  self) [static]

Definition at line 231 of file rubynode.c.

References RNode::argc, Data_Get_Struct, LONG2NUM, node, and RNode::u2.

Referenced by Init_Node().

static VALUE rnode_u2_id ( VALUE  self) [static]

Definition at line 199 of file rubynode.c.

References Data_Get_Struct, RNode::id, id_to_value(), node, and RNode::u2.

Referenced by Init_Node().

static VALUE rnode_u2_value_or_node ( VALUE  self) [static]

Definition at line 175 of file rubynode.c.

References Data_Get_Struct, nd_type, node, RNode::u2, RNode::value, and value_or_node_to_value().

Referenced by Init_Node().

static VALUE rnode_u3_id ( VALUE  self) [static]

Definition at line 207 of file rubynode.c.

References Data_Get_Struct, RNode::id, id_to_value(), node, and RNode::u3.

Referenced by Init_Node().

static VALUE rnode_u3_state_or_cnt ( VALUE  self) [static]

Definition at line 239 of file rubynode.c.

References Data_Get_Struct, LONG2NUM, node, RNode::state, and RNode::u3.

Referenced by Init_Node().

static VALUE rnode_u3_value_or_node ( VALUE  self) [static]

Definition at line 183 of file rubynode.c.

References Data_Get_Struct, nd_type, node, RNode::u3, RNode::value, and value_or_node_to_value().

Referenced by Init_Node().

static NODE* str_parse ( int  argc,
VALUE argv,
VALUE  src 
) [static]
static VALUE str_parse_to_nodes ( int  argc,
VALUE argv,
VALUE  src 
) [static]

Definition at line 349 of file rubynode.c.

References node_to_rnode(), result, and str_parse().

Referenced by Init_Node().

static VALUE value_or_node_to_value ( VALUE  val,
enum node_type  nd_type,
int  union_idx,
NODE node 
) [static]

Variable Documentation

VALUE rb_cNode [static]

Definition at line 10 of file rubynode.c.

Referenced by Init_Node(), and node_to_rnode().