Class: NodeType

Inherits:
Object show all
Defined in:
ext/nodewrap.c

Overview

NodeType is an abstraction for the C type of a node. It is a Struct which has two members, name and value.

Instance Method Summary collapse

Instance Method Details

#to_iNumeric

Returns an integer representing integer type of a node. This is the value you would see for the type of the node if you were examining it in gdb.

Returns:

  • (Numeric)


486
487
488
489
# File 'ext/nodewrap.c', line 486

static VALUE node_type_to_i(VALUE node_type)
{
  return rb_struct_getmember(node_type, rb_intern("value"));
}

#nameString

Returns the name of the node.

Returns:

  • (String)


473
474
475
476
# File 'ext/nodewrap.c', line 473

static VALUE node_type_to_s(VALUE node_type)
{
  return rb_struct_getmember(node_type, rb_intern("name"));
}