ParserOps

com.phasmidsoftware.matchers.Matchers.ParserOps
implicit class ParserOps(s: String)

Implicit class ParserOps, which allows us to use the method m on a String.

Value parameters

s

a String.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def m: Matchers.this.Parser[String]

Method to create a Matcher which simply matches the String s. Basically a convenience to turn a String into a literal String matcher.

Method to create a Matcher which simply matches the String s. Basically a convenience to turn a String into a literal String matcher.

Attributes

Returns

Parser[String]

def regex: Matchers.this.Parser[String]

Method to create a Parser which matches the String s interpreted as a regular expression. Basically a convenience to avoid having to depend on Scala Parser Combinators for simple regular expressions.

Method to create a Parser which matches the String s interpreted as a regular expression. Basically a convenience to avoid having to depend on Scala Parser Combinators for simple regular expressions.

Attributes

Returns

Parser[String]

def regexGroups: Matchers.this.Parser[List[String]]

Method to create a Parser which matches the String s interpreted as a regular expression. Basically a convenience to avoid having to depend on Scala Parser Combinators for simple regular expressions. Use this method rather than regex if you need to process the matched groups individually.

Method to create a Parser which matches the String s interpreted as a regular expression. Basically a convenience to avoid having to depend on Scala Parser Combinators for simple regular expressions. Use this method rather than regex if you need to process the matched groups individually.

Attributes

Returns

Parser[List of Strings]