MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
Loading...
Searching...
No Matches
pascal::SDLFunctionHandler Class Reference

Built-in handler for SDL2 bindings. More...

#include <icode.hpp>

Inheritance diagram for pascal::SDLFunctionHandler:

Public Member Functions

bool canHandle (const std::string &funcName) const override
 Return true if this handler implements funcName.
void generate (CodeGenVisitor &visitor, const std::string &funcName, const std::vector< std::unique_ptr< ASTNode > > &arguments) override
 Emit code for a procedure-style call (no return value used).
bool generateWithResult (CodeGenVisitor &visitor, const std::string &funcName, const std::vector< std::unique_ptr< ASTNode > > &arguments) override
 Emit code for a function-style call (result pushed on eval stack); return true if handled.
Public Member Functions inherited from pascal::BuiltinFunctionHandler
virtual ~BuiltinFunctionHandler ()=default
virtual VarType getReturnType (const std::string &funcName) const
 Return the VarType produced by funcName.

Detailed Description

Built-in handler for SDL2 bindings.

Definition at line 155 of file icode.hpp.

Member Function Documentation

◆ canHandle()

bool pascal::SDLFunctionHandler::canHandle ( const std::string & funcName) const
overridevirtual

Return true if this handler implements funcName.

Implements pascal::BuiltinFunctionHandler.

Definition at line 428 of file icode_imp.cpp.

References pascal::sdlFunctions, and pascal::toLower().

◆ generate()

void pascal::SDLFunctionHandler::generate ( CodeGenVisitor & visitor,
const std::string & funcName,
const std::vector< std::unique_ptr< ASTNode > > & arguments )
overridevirtual

◆ generateWithResult()

bool pascal::SDLFunctionHandler::generateWithResult ( CodeGenVisitor & visitor,
const std::string & funcName,
const std::vector< std::unique_ptr< ASTNode > > & arguments )
overridevirtual

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