AstTopDownProcessing
Attribute evaluator for inherited attributes.
Synopsis
Declared in <src/midend/astProcessing/AstProcessing.h>
template<class InheritedAttributeType>
class AstTopDownProcessing
: public SgTreeTraversal<InheritedAttributeType, DummyAttribute>
Base Classes
Name |
Description |
Temporary traversal base class (do not use). |
Types
Member Functions
Name |
Description |
evaluates attributes on the entire AST |
|
evaluates attributes only at nodes which represent the same file as where the evaluation was started |
Protected Member Functions
Name |
Description |
|
|
|
Function called at the start of the traversal, before any node is visited; override if necessary, the default implementation is a no‐op. |
|
|
|
pure virtual function which must be implemented to compute the inherited attribute at a node |
Private Member Functions
Name |
Description |
////////////////////////////////////////// TOP DOWN PROCESSING IMPLEMENTATION ///////////////////////////////////////////// |
Friends
Name |
Description |
Derived Classes
Name |
Description |
/////////////////////////////////////////////////////////////////////////////////////// |
|
Description
This class allows computation of inherited attributes on the AST. It requires an inherited attribute type as a template parameter and the implementation of the function evaluateInheritedAttribute. This function is invoked in pre‐order while the AST is traversed. It can be used for passing context information down the AST.
Internal: This class is derived from the SgTreeTraversal class.
Created with MrDocs