CollectingPass

com.reactific.riddl.passes.CollectingPass
abstract class CollectingPass[F](input: PassInput) extends Pass

A pass base class that allows the node processing to be done in a depth first hierarchical order by calling:

  • openContainer at the start of container's processing

  • processLeaf for any leaf node

  • closeContainer after all the container's contents have been processed This kind of Pass allows the processing to follow the AST hierarchy so that container nodes can run before all their content (openContainer) and also after all its content (closeContainer). This is necessary for passes that must maintain the hierarchical structure of the AST model in their processing

Value parameters

input

The PassInput to process

Attributes

Graph
Supertypes
class Pass
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

protected def collect(definition: Definition, parents: Stack[Definition]): F

Concrete methods

final override def process(definition: Definition, parents: Stack[Definition]): Unit

Attributes

Definition Classes
override protected def traverse(definition: Definition, parents: Stack[Definition]): Unit

Attributes

Definition Classes

Inherited methods

def close(): Unit

Close any resources used so this can be used with AutoCloseable or Using.Manager

Close any resources used so this can be used with AutoCloseable or Using.Manager

Attributes

Inherited from:
Pass
def name: String

THe name of the pass for inclusion in messages it produces

THe name of the pass for inclusion in messages it produces

Attributes

Returns

A string value giving the name of this pass

Inherited from:
Pass

Attributes

Inherited from:
Pass

Generate the output of this Pass.

Generate the output of this Pass. This will only be called after all the calls to process have completed.

Attributes

Returns

an instance of the output type

Inherited from:
Pass

Concrete fields

protected var collectedValues: Seq[F]