This is the RIDDL Prettifier to convert an AST back to RIDDL plain text
Attributes
- Companion
- object
- Source
- PrettifyPass.scala
- Graph
-
- Supertypes
-
class VisitingPass[PrettifyVisitor]class HierarchyPassclass Passclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete 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
- Source
- PrettifyPass.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.
Attributes
- Returns
-
an instance of the output type
- Source
- PrettifyPass.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
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
- Inherited from:
- VisitingPass
- Source
- Pass.scala
Attributes
- Definition Classes
- Inherited from:
- VisitingPass
- 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
- Inherited from:
- VisitingPass
- Source
- Pass.scala
Attributes
- Definition Classes
- Inherited from:
- VisitingPass
- 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
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
- Inherited from:
- HierarchyPass
- 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
- Inherited from:
- VisitingPass
- 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
- Inherited from:
- VisitingPass
- 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
- Inherited from:
- HierarchyPass
- Source
- Pass.scala
Inherited fields
Attributes
- Inherited from:
- Pass
- Source
- Pass.scala
Attributes
- Inherited from:
- Pass
- Source
- Pass.scala
Attributes
- Inherited from:
- VisitingPass
- Source
- Pass.scala