Soft

cats.parse.Parser.Soft
final class Soft[+A](parser: Parser[A]) extends Soft0[A]

If we can parse this then that, do so, if we fail that without consuming, rewind before this without consuming. If either consume 1 or more, do not rewind

Attributes

Source
Parser.scala
Graph
Supertypes
class Soft0[A]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def *>[B](that: Parser0[B]): Parser[B]

Attributes

Definition Classes
Source
Parser.scala
override def <*[B](that: Parser0[B]): Parser[A]

Attributes

Definition Classes
Source
Parser.scala
override def between(b: Parser0[Any], c: Parser0[Any]): Parser[A]

Like regular between, but uses soft products This is particularly useful with whitespace and separators, e.g.

Like regular between, but uses soft products This is particularly useful with whitespace and separators, e.g. a separator might be char(',').soft.surroundedBy(whitespace0)

Attributes

Definition Classes
Source
Parser.scala
override def surroundedBy(b: Parser0[Any]): Parser[A]

Use this parser to parse surrounded by values using soft products

Use this parser to parse surrounded by values using soft products

This is the same as between(b, b)

Attributes

Definition Classes
Source
Parser.scala
override def ~[B](that: Parser0[B]): Parser[(A, B)]

Attributes

Definition Classes
Source
Parser.scala

Inherited methods

def with1: Soft01[A]

If we can parse this then that, do so, if we fail that without consuming, rewind before this without consuming.

If we can parse this then that, do so, if we fail that without consuming, rewind before this without consuming. If either consume 1 or more, do not rewind

Attributes

Inherited from:
Soft0
Source
Parser.scala