Module: Rattler::Parsers::Atomic

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

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



14
15
16
# File 'lib/rattler/parsers/atomic.rb', line 14

def with_ws(ws)
  ws.skip & self
end