Ref

parsley.state.Ref
See theRef companion class
object Ref

This object allows for the construction of a reference via its make function.

Attributes

Companion
class
Source
state.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Ref.type

Members list

Value members

Concrete methods

def make[A]: Ref[A]

This function creates a new (global) reference of a given type.

This function creates a new (global) reference of a given type.

The reference created by this function is not allocated to any specific parser until it has been used by a parser. It should not be used with multiple different parsers.

Type parameters

A

the type to be contained in this reference during runtime

Attributes

Returns

a new reference which can contain the given type.

Since

2.2.0

Note

references created in this manner must be initialised in the top-level parser and not inside a flatMap, as this may make them corrupt other references. They should be used with caution. It is recommended to use makeRef and fillRef where possible.

Source
state.scala