Class Node
In: lib/methodsig.rb
lib/as_expression.rb
ext/nodeinfo.c
ext/nodewrap.c
Parent: Object

Node is a wrapper for Ruby‘s Nodes, which are not objects. Nodes can be obtained from many of the other methods in the nodewrap library (see Method#body and Proc#body, for example).

Methods

Classes and Modules

Class Node::ALIAS
Class Node::ALLOCA
Class Node::AND
Class Node::ARGS
Class Node::ARGSCAT
Class Node::ARGSPUSH
Class Node::ARRAY
Class Node::ATTRASGN
Class Node::ATTRSET
Class Node::BACK_REF
Class Node::BEGIN
Class Node::BLOCK
Class Node::BLOCK_ARG
Class Node::BLOCK_PASS
Class Node::BMETHOD
Class Node::BREAK
Class Node::CALL
Class Node::CASE
Class Node::CDECL
Class Node::CFUNC
Class Node::CLASS
Class Node::COLON2
Class Node::COLON3
Class Node::CONST
Class Node::CREF
Class Node::CVAR
Class Node::CVASGN
Class Node::CVDECL
Class Node::DASGN
Class Node::DASGN_CURR
Class Node::DEFINED
Class Node::DEFN
Class Node::DEFS
Class Node::DMETHOD
Class Node::DOT2
Class Node::DOT3
Class Node::DREGX
Class Node::DREGX_ONCE
Class Node::DSTR
Class Node::DSYM
Class Node::DVAR
Class Node::DXSTR
Class Node::ENSURE
Class Node::EVSTR
Class Node::FALSE
Class Node::FBODY
Class Node::FCALL
Class Node::FLIP2
Class Node::FLIP3
Class Node::FOR
Class Node::GASGN
Class Node::GVAR
Class Node::HASH
Class Node::IASGN
Class Node::IF
Class Node::IFUNC
Class Node::ITER
Class Node::IVAR
Class Node::LASGN
Class Node::LIT
Class Node::LVAR
Class Node::MASGN
Class Node::MATCH
Class Node::MATCH2
Class Node::MATCH3
Class Node::MEMO
Class Node::METHOD
Class Node::MODULE
Class Node::NEWLINE
Class Node::NEXT
Class Node::NIL
Class Node::NOT
Class Node::NTH_REF
Class Node::OPT_N
Class Node::OP_ASGN1
Class Node::OP_ASGN2
Class Node::OP_ASGN2_ARG
Class Node::OP_ASGN_AND
Class Node::OP_ASGN_OR
Class Node::OR
Class Node::POSTEXE
Class Node::REDO
Class Node::RESBODY
Class Node::RESCUE
Class Node::RETRY
Class Node::RETURN
Class Node::SCLASS
Class Node::SCOPE
Class Node::SELF
Class Node::SPLAT
Class Node::STR
Class Node::SUPER
Class Node::SVALUE
Class Node::TO_ARY
Class Node::TRUE
Class Node::UNDEF
Class Node::UNTIL
Class Node::VALIAS
Class Node::VCALL
Class Node::WHEN
Class Node::WHILE
Class Node::XSTR
Class Node::YIELD
Class Node::ZARRAY
Class Node::ZSUPER

Constants

OMIT_PARENS = { LVAR => true, GVAR => true, IVAR => true, CVAR => true, DVAR => true, LIT => true, ARRAY => true, ZARRAY => true, HASH => true, }   TODO: MATCH3

Public Class methods

Load a dumped node.

Compile a string into a node.

Public Instance methods

Return the given member of a node.

Return an string describing this node as a single expression. By default, this just returns the name of the node‘s type, but some node types override this method to produce more meaningful output.

Return a string as with as_expression, but surround it with parens if it is a composite expression, so that it can be used to form more complex expressions.

Compile a parsed node tree into a bytecode sequence.

Evaluate a node with the given object as self and returns the result.

Returns a node‘s flags.

Returns a string representation of the node‘s data.

Return an array of strings containing the names of a node‘s members.

Returns the file the node is associated with

Returns the line number the node is associated with.

Returns a NodeType structure representing the type of the node.

Swap one node with another. Both nodes must respond to the swap method. Returns the receiver.

[Validate]