ArkScript
A small, fast, functional and scripting language for video games
Ark::internal::Pass Class Referenceabstract

An interface to describe compiler passes. More...

#include <Pass.hpp>

Inheritance diagram for Ark::internal::Pass:
[legend]
Collaboration diagram for Ark::internal::Pass:
[legend]

Public Member Functions

 Pass (std::string name, unsigned debug_level)
 Construct a new Pass object.
 
virtual ~Pass ()=default
 
virtual void process (const Node &ast)=0
 Start processing the given AST.
 
virtual const Nodeast () const noexcept=0
 Output of the compiler pass.
 

Protected Attributes

Logger m_logger
 

Detailed Description

An interface to describe compiler passes.

Definition at line 22 of file Pass.hpp.

Constructor & Destructor Documentation

◆ Pass()

Ark::internal::Pass::Pass ( std::string name,
unsigned debug_level )

Construct a new Pass object.

Parameters
namethe pass name, used for logging
debug_leveldebug level

Definition at line 6 of file Pass.cpp.

◆ ~Pass()

virtual Ark::internal::Pass::~Pass ( )
virtualdefault

Member Function Documentation

◆ ast()

virtual const Node & Ark::internal::Pass::ast ( ) const
nodiscardpure virtualnoexcept

Output of the compiler pass.

Returns
const Node& the modified AST

Implemented in Ark::internal::ImportSolver, Ark::internal::MacroProcessor, Ark::internal::NameResolutionPass, and Ark::internal::Optimizer.

◆ process()

virtual void Ark::internal::Pass::process ( const Node & ast)
pure virtual

Member Data Documentation

◆ m_logger


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