1 #ifndef COMPILER_EXTENSIONS_H_INCLUDED
2 #define COMPILER_EXTENSIONS_H_INCLUDED
74 bool& explicitReference)
const;
81 bool& explicitReference)
const;
103 Literals& literals,
const std::string&
id,
int optionalArguments)
const;
107 Literals& literals,
const std::string&
id,
int optionalArguments)
const;
110 void listKeywords (std::vector<std::string>& keywords)
const;
char ScriptReturn
Typedef for script return char.
Definition: extensions.hpp:36
int mSegment
Definition: extensions.hpp:48
std::string ScriptArgs
Typedef for script arguments string.
Definition: extensions.hpp:12
int mNextKeywordIndex
Definition: extensions.hpp:59
int mSegment
Definition: extensions.hpp:56
bool isInstruction(int keyword, ScriptArgs &argumentType, bool &explicitReference) const
Definition: extensions.cpp:39
std::map< int, Instruction > mInstructions
Definition: extensions.hpp:62
int mCode
Definition: extensions.hpp:46
Collection of compiler extensions.
Definition: extensions.hpp:39
bool isFunction(int keyword, ScriptReturn &returnType, ScriptArgs &argumentType, bool &explicitReference) const
Definition: extensions.cpp:23
int searchKeyword(const std::string &keyword) const
Definition: extensions.cpp:13
Definition: extensions.hpp:51
int mCode
Definition: extensions.hpp:54
std::map< int, Function > mFunctions
Definition: extensions.hpp:61
int mCodeExplicit
Definition: extensions.hpp:55
void registerFunction(const std::string &keyword, ScriptReturn returnType, const ScriptArgs &argumentType, int code, int codeExplicit=-1)
Definition: extensions.cpp:54
void registerInstruction(const std::string &keyword, const ScriptArgs &argumentType, int code, int codeExplicit=-1)
Definition: extensions.cpp:84
char mReturn
Definition: extensions.hpp:44
void generateFunctionCode(int keyword, std::vector< Interpreter::Type_Code > &code, Literals &literals, const std::string &id, int optionalArguments) const
Append code for function to code.
Definition: extensions.cpp:113
int code
Definition: crashcatcher.cpp:70
Literal values.
Definition: literals.hpp:13
Definition: extensions.hpp:42
void listKeywords(std::vector< std::string > &keywords) const
Append all known keywords to kaywords.
Definition: extensions.cpp:210
void generateInstructionCode(int keyword, std::vector< Interpreter::Type_Code > &code, Literals &literals, const std::string &id, int optionalArguments) const
Append code for function to code.
Definition: extensions.cpp:161
ScriptArgs mArguments
Definition: extensions.hpp:45
std::map< std::string, int > mKeywords
Definition: extensions.hpp:60
int mCodeExplicit
Definition: extensions.hpp:47
Extensions()
Definition: extensions.cpp:11
ScriptArgs mArguments
Definition: extensions.hpp:53