Class: BabelBridge::EmptyNode

Inherits:
Node
  • Object
show all
Defined in:
lib/nodes/empty_node.rb

Overview

used when a PatternElement matchs the empty string Example: when the PatternElement is optional and doesn’t match not subclassed

Instance Attribute Summary

Attributes inherited from Node

#delimiter, #many_delimiter, #match_length, #offset, #parent, #parser, #src

Instance Method Summary collapse

Methods inherited from Node

#column, #init_line_column, #initialize, #length, #line, #match_range, #node_init, #node_path, #offset_after_match, #on_matched, #onlychildren_list, #parent_list, #path_string, #relative_class_name, #remaining_src, #text, #to_s, #to_sym

Constructor Details

This class inherits a constructor from BabelBridge::Node

Instance Method Details

#inspect(options = {}) ⇒ Object



13
14
15
# File 'lib/nodes/empty_node.rb', line 13

def inspect(options={})
  "EmptyNode" if options[:verbose]
end

#matchesObject



17
# File 'lib/nodes/empty_node.rb', line 17

def matches; [self]; end