Module: Rattler::Parsers::Atomic

Included in:
ESymbol, Eof, Match, Token
Defined in:
lib/rattler/parsers/atomic.rb

Overview

Atomic describes a parser that is not a combination of other parsers.

Instance Method Summary collapse

Instance Method Details

#with_ws(ws) ⇒ Parser

Returns a new parser that uses ws to skip whitespace.

Parameters:

  • ws (Parser)

    the parser used to skip whitespace

Returns:

  • (Parser)

    a new parser that uses ws to skip whitespace



7
8
9
# File 'lib/rattler/parsers/atomic.rb', line 7

def with_ws(ws)
  ws.skip & self
end