class ParserWithSourcePosition[T <: DefForm] extends Parser[T]
This little ray of sunshine class allows the usage of Parser Combinators while also delivering SourceRefs (or at least SourcePositions), which previously required state.
- T
The type of the def-form, needs to implement trait DefForm.
- Alphabetic
- By Inheritance
- ParserWithSourcePosition
- Parser
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ParserWithSourcePosition(p: ParserWithSourcePosition.Parser[T])
- p
"Innocent" parser that just does the parsing, without SourceRefs.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
*[U >: T](sep: ⇒ ParserWithSourcePosition.Parser[(U, U) ⇒ U]): ParserWithSourcePosition.Parser[U]
- Definition Classes
- Parser
-
def
*: ParserWithSourcePosition.Parser[List[T]]
- Definition Classes
- Parser
-
def
+: ParserWithSourcePosition.Parser[List[T]]
- Definition Classes
- Parser
-
def
<~[U](q: ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[T]
- Definition Classes
- Parser
- Annotations
- @migration
- Migration
(Changed in version 2.9.0) The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
>>[U](fq: (T) ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[U]
- Definition Classes
- Parser
-
def
?: ParserWithSourcePosition.Parser[Option[T]]
- Definition Classes
- Parser
-
def
^?[U](f: PartialFunction[T, U]): ParserWithSourcePosition.Parser[U]
- Definition Classes
- Parser
-
def
^?[U](f: PartialFunction[T, U], error: (T) ⇒ String): ParserWithSourcePosition.Parser[U]
- Definition Classes
- Parser
-
def
^^[U](f: (T) ⇒ U): ParserWithSourcePosition.Parser[U]
- Definition Classes
- Parser
-
def
^^^[U](v: ⇒ U): ParserWithSourcePosition.Parser[U]
- Definition Classes
- Parser
- Annotations
- @migration
- Migration
(Changed in version 2.9.0) The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.
-
def
andThen[A](g: (ParserWithSourcePosition.ParseResult[T]) ⇒ A): (ParserWithSourcePosition.Input) ⇒ A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
def
append[U >: T](p0: ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[U]
- Definition Classes
- Parser
- Annotations
- @migration
- Migration
(Changed in version 2.9.0) The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.
-
def
apply(in: ParserWithSourcePosition.Input): ParserWithSourcePosition.ParseResult[T]
- Definition Classes
- ParserWithSourcePosition → Parser → Function1
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
compose[A](g: (A) ⇒ ParserWithSourcePosition.Input): (A) ⇒ ParserWithSourcePosition.ParseResult[T]
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
filter(p: (T) ⇒ Boolean): ParserWithSourcePosition.Parser[T]
- Definition Classes
- Parser
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMap[U](f: (T) ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[U]
- Definition Classes
- Parser
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
into[U](fq: (T) ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[U]
- Definition Classes
- Parser
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[U](f: (T) ⇒ U): ParserWithSourcePosition.Parser[U]
- Definition Classes
- Parser
-
def
named(n: String): ParserWithSourcePosition.this.type
- Definition Classes
- Parser
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Parser → Function1 → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
withErrorMessage(msg: String): ParserWithSourcePosition.Parser[T]
- Definition Classes
- Parser
-
def
withFailureMessage(msg: String): ParserWithSourcePosition.Parser[T]
- Definition Classes
- Parser
-
def
withFilter(p: (T) ⇒ Boolean): ParserWithSourcePosition.Parser[T]
- Definition Classes
- Parser
-
def
|[U >: T](q: ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[U]
- Definition Classes
- Parser
-
def
|||[U >: T](q0: ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[U]
- Definition Classes
- Parser
- Annotations
- @migration
- Migration
(Changed in version 2.9.0) The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.
-
def
~[U](q: ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[ParserWithSourcePosition.~[T, U]]
- Definition Classes
- Parser
- Annotations
- @migration
- Migration
(Changed in version 2.9.0) The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.
-
def
~![U](p: ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[ParserWithSourcePosition.~[T, U]]
- Definition Classes
- Parser
-
def
~>[U](q: ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[U]
- Definition Classes
- Parser
- Annotations
- @migration
- Migration
(Changed in version 2.9.0) The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.