GOps

object GOps

Helper object to build values of Ops[A, B], for generalised precedence parsing

Since:

2.2.0

class Object
trait Matchable
class Any
GOps.type

Value members

Concrete methods

def apply[A, B](fixity: Fixity)(ops: Parsley[GOp[A, B]]*)(implicit wrap: A => B): Ops[A, B]

'''NOTE''': Currently a bug in scaladoc incorrect displays this functions type, it should be: fixity.GOp[A, B], NOT GOp[A, B]. Builds an Ops object which represents many operators which act at the same precedence level, with a given fixity. Using path-dependent typing, the given fixity describes the shape of the operators expected. For more information see the Parsley wiki.

'''NOTE''': Currently a bug in scaladoc incorrect displays this functions type, it should be: fixity.GOp[A, B], NOT GOp[A, B]. Builds an Ops object which represents many operators which act at the same precedence level, with a given fixity. Using path-dependent typing, the given fixity describes the shape of the operators expected. For more information see the Parsley wiki.

Type parameters:
A

The base type consumed by the operators

B

The type produced/consumed by the operators

Value parameters:
fixity

The fixity of the operators described. See Fixity

ops

The operators themselves, in varargs

wrap

The function which should be used to wrap up a value of type A when required (this will be at right of a left-assoc chain, left of a right-assoc chain, or the root of a prefix/postfix chain)

Since:

2.2.0