Rudiments
Public Member Functions | List of all members
compilerpreprocessor Class Referenceabstract

Inherits compilermodule.

Public Member Functions

 compilerpreprocessor ()
 
virtual ~compilerpreprocessor ()
 
virtual bool process (const char *input, stringbuffer *output, domnode *metadata)=0
 
- Public Member Functions inherited from compilermodule
 compilermodule ()
 
virtual ~compilermodule ()
 
void setId (const char *id)
 
bool setParameters (const char *parameters)
 
void setParameters (domnode *parameters)
 
const char * getId ()
 
domnodegetParameters ()
 

Additional Inherited Members

- Protected Attributes inherited from compilermodule
const char * id
 
domnodeparameters
 

Detailed Description

The compilerpreprocessor class is the base class for compiler modules that process a unit of code in its native format, before it is parsed into a tree using a grammar describing that format.

Preprocessor modules might normalize whitespace, integrate header files, expand macros, or do simple translations that would be more costly to do as operations on a tree.

Constructor & Destructor Documentation

◆ compilerpreprocessor()

compilerpreprocessor::compilerpreprocessor ( )

Creates a new instance of the compilerpreprocessor class.

◆ ~compilerpreprocessor()

virtual compilerpreprocessor::~compilerpreprocessor ( )
virtual

Deletes this instance of the compilerpreprocessor class.

Member Function Documentation

◆ process()

virtual bool compilerpreprocessor::process ( const char *  input,
stringbuffer output,
domnode metadata 
)
pure virtual

Processes "input", writing the result to "output", optionally referring to and/or updating "metadata" during the process. Returns true on success and false on failure.