HierarchyPass
A Pass base class that allows the processing to be done based on containers, and calling these methods:
-
openContainer at the start of container's processing
-
processLeaf for any leaf nodes within the container
-
processValue for any non-definitions within the container
-
-
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
- outputs
-
The outputs of previous passes in case this pass needs it
Attributes
- Source
- Pass.scala
- Graph
-
- Supertypes
- Known subtypes
-
class VisitingPass[VT]class PrettifyPass
Members list
Value members
Abstract methods
Called by traverse after all leaf nodes of an opened node have been processed and the opened node is now being closed.
Called by traverse after all leaf nodes of an opened node have been processed and the opened node is now being closed. Subclasses must implement this method.
Value parameters
- definition
-
The opened node that now needs to be closed
- parents
-
THe parents of the node to be closed; should be the same as when it was opened
Attributes
- Source
- Pass.scala
Called by traverse when a new container is started Subclasses must implement this method.
Called by traverse when a new container is started Subclasses must implement this method.
Value parameters
- definition
-
The definition that was opened
- parents
-
The parents of the definition opened
Attributes
- Source
- Pass.scala
Called by traverse when a leaf node is encountered Subclasses must implement this method
Called by traverse when a leaf node is encountered Subclasses must implement this method
Value parameters
- definition
-
The leaf definition that was found
- parents
-
THe parents of the leaf node
Attributes
- Source
- Pass.scala
Process a non-definition, non-include, value
Process a non-definition, non-include, value
Value parameters
- parents
-
The parent definitions of value
- value
-
The value to be processed
Attributes
- Source
- Pass.scala
Concrete methods
Attributes
- Source
- Pass.scala
Attributes
- Source
- Pass.scala
not required in this kind of pass, final override it as a result
not required in this kind of pass, final override it as a result
Value parameters
- definition
-
The definition to be processed
- parents
-
The stack of definitions that are the parents of com.ossuminc.riddl.language.AST.Definition. This stack goes from immediate parent towards the root. The root is deepest in the stack.
Attributes
- Definition Classes
- Source
- Pass.scala
Redefine traverse to make the three calls
Redefine traverse to make the three calls
Value parameters
- definition
-
The RiddlValue being considered
- parents
-
The definition parents of the value
Attributes
- Definition Classes
- Source
- Pass.scala
Inherited methods
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
- Source
- Pass.scala
A signal that the processing is complete and no more calls to process
will be made.
A signal that the processing is complete and no more calls to process
will be made. This also gives the Pass subclass a chance to do post-processing as some computations can only be done after collecting data from the entire AST
Value parameters
- root
-
The root of the parsed model just as a convenience for post-processing
Attributes
- Inherited from:
- Pass
- Source
- Pass.scala
Pre-process the root before actually traversing.
Pre-process the root before actually traversing. This is also a signal that the processing is about to start.
Value parameters
- root
-
A com.ossuminc.riddl.language.AST.Root node which encapsulates the whole model. This is the state of the Root as of the last pass.
Attributes
- Returns
-
Typically returns the same Root objects with changes in subsequent levels, but it entirely possibly to completely reorganize the hierarchy, including its root node.
- Inherited from:
- Pass
- Source
- Pass.scala
Inherited and Abstract methods
THe name of the pass for inclusion in messages it produces.
THe name of the pass for inclusion in messages it produces. This must be implemented by the subclass
Attributes
- Returns
-
A string value giving the name of this pass
- Inherited from:
- Pass
- Source
- Pass.scala
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.
Value parameters
- root
-
The new com.ossuminc.riddl.language.AST.Root of the model that the pass computed
Attributes
- Returns
-
an instance of the output type
- Inherited from:
- Pass
- Source
- Pass.scala
Inherited fields
Attributes
- Inherited from:
- Pass
- Source
- Pass.scala
Attributes
- Inherited from:
- Pass
- Source
- Pass.scala