Scalax
|
|
scalax/rules/Rules.scala
]
trait
Rules
extends
AnyRefMethod Summary | |
def
|
error [X](err : X) : Rule[Any, Nothing, Nothing, X] |
def
|
error [In] : Rule[In, Nothing, Nothing, In] |
def
|
expect
[In, Out, A, Any](rule : Rule[In, Out, A, Any]) : (In) => A
Converts a rule into a function that throws an Exception on failure.
|
def
|
failure : Rule[Any, Nothing, Nothing, Nothing] |
def
|
from [In] : AnyRef |
implicit def
|
inRule [In, Out, A, X](rule : Rule[In, Out, A, X]) : InRule[In, Out, A, X] |
def
|
oneOf [In, Out, A, X](rules : scala.Seq[Rule[In, Out, A, X]]) : Rule[In, Out, A, X] |
implicit def
|
rule [In, Out, A, X](f : (In) => Result[Out, A, X]) : Rule[In, Out, A, X] |
def
|
ruleWithName
[In, Out, A, X](_name : java.lang.String, f : (In) => Result[Out, A, X]) : Rule[In, Out, A, X] with Name
|
implicit def
|
seqRule [In, A, X](rule : Rule[In, In, A, X]) : SeqRule[In, A, X] |
def
|
state [s] : StateRules |
def
|
success [Out, A](out : Out, a : A) : Rule[Any, Out, A, Nothing] |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Class Summary | |
class
|
DefaultRule
[In, Out, A, X](f : (In) => Result[Out, A, X]) extends Rule[In, Out, A, X]
|
Method Details |
def
from[In] : AnyRef
def
state[s] : StateRules
def
ruleWithName[In, Out, A, X](_name : java.lang.String, f : (In) => Result[Out, A, X]) : Rule[In, Out, A, X] with
Name
Scalax
|
|