Xreate
The Xreate programming language
Public Member Functions | List of all members
AbstractPass< Output > Class Template Reference

Minimal xreate::IPass implementation useful for many passes as the base class. More...

#include <abstractpass.h>

Detailed Description

template<class Output>
class xreate::AbstractPass< Output >

Minimal xreate::IPass implementation useful for many passes as the base class.

The class traverses the AST in a minimally useful manner sparing clients from processing an every possible node manually. This way clients able to focus only on relevant nodes processing.

The Output template parameter specifies the type of node processing result data.

Note
Automatically caches already visited nodes
It's usually expected that a custom pass publishes processing results by one of the following means:
See also
xreate::XreateManager, xreate::IPass, xreate::AST
Inheritance diagram for AbstractPass< Output >:
IPass

Public Member Functions

virtual Output processFnCall (ManagedFnPtr functionCallee, PassContext context)
 Processes function invocation instruction.
 
virtual Output processFnCallUncertain (const std::string &calleeName, const std::list< ManagedFnPtr > &candidates, PassContext context)
 Processes function invocation instruction in uncertain cases. More...
 
virtual void process (ManagedRulePtr rule)
 Processes Logic Rule.
 
virtual Output process (ManagedFnPtr function)
 Processes Function.
 
virtual Output process (CodeScope *scope, PassContext context, const std::string &hintBlockDecl="")
 Processes single CodeScope.
 
virtual Output process (const Expression &expression, PassContext context, const std::string &varDecl="")
 Processes single Expression.
 
void run ()
 Executes AST traverse.
 
- Public Member Functions inherited from IPass
virtual void finish ()
 Finalizes pass. Empty by default.
 

Member Function Documentation

◆ processFnCallUncertain()

virtual Output processFnCallUncertain ( const std::string &  calleeName,
const std::list< ManagedFnPtr > &  candidates,
PassContext  context 
)
inlinevirtual

Processes function invocation instruction in uncertain cases.

Executed when it's impossible statically determine which exactly function is invoked.

Reimplemented in CFATemporalSeqPass, and CFAPass.


The documentation for this class was generated from the following file: