Class: Maccro::DSL::LocalVariable

Inherits:
Node
  • Object
show all
Defined in:
lib/maccro/dsl/value.rb

Constant Summary collapse

SUB_NODETYPE_LIST =

LVAR: local variable in method local scope (method or local arguments) DVAR: dynamically defined local variable (defined&initialized in local scope)

[:LVAR, :DVAR].freeze

Instance Attribute Summary

Attributes inherited from Node

#first_column, #first_lineno, #last_column, #last_lineno, #name

Class Method Summary collapse

Methods inherited from Node

#capture, #children, #initialize, #match?, #to_code_range, #type

Methods included from ASTNodeWrapper

#capture, #children, #match?, #to_code_range

Constructor Details

This class inherits a constructor from Maccro::DSL::Node

Class Method Details

.match?(node) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/maccro/dsl/value.rb', line 11

def self.match?(node)
  SUB_NODETYPE_LIST.include?(node.type)
end