Class: Spectre::Directives::NoPreSkipDirective

Inherits:
Spectre::Directive show all
Defined in:
lib/spectre/generic/directives.rb

Overview

Forces the parser to ignore pre-skipping via InputIterator#skip!.

Shortcut: nopreskip_d.

Direct Known Subclasses

SkipDirective

Instance Attribute Summary

Attributes inherited from Spectre::Directive

#iter_skipper, #iter_transformation, #pre_skip

Attributes inherited from Node

#actions, #backtrace, #left, #parent, #parser, #policy, #right, #symbols

Instance Method Summary collapse

Methods inherited from Spectre::Directive

#[], #initialize, policy, policy!, skipper!, transformation!

Methods inherited from Node

#%, #&, #*, #**, #+, #-, #-@, #>>, #[], #^, #backtrack, #chain, #closure, #closure=, #closure?, #find, #initialize, #initialize_copy, #leaf?, #replace_with, #root?, #shallow_copy, #to_p, #|, #~@

Constructor Details

This class inherits a constructor from Spectre::Directive

Instance Method Details

#inspectObject



113
114
115
# File 'lib/spectre/generic/directives.rb', line 113

def inspect
    "[nopreskip_d:#{@left.inspect}]"
end

#parse(iter, *args) ⇒ Object



109
110
111
# File 'lib/spectre/generic/directives.rb', line 109

def parse iter, *args
    super(iter, false)
end