 |
Gorgon Game Engine
|
Go to the documentation of this file.
2 #include "../Scripting.h"
4 namespace Gorgon {
namespace Scripting {
107 Literal={Types::String(), {value}};
121 Type=ValueType::Temp;
126 if(
Type==ValueType::Temp) {
int JumpOffset
Definition: Instruction.h:175
std::enable_if< decltype(gorgon__enum_tr_loc(T_()))::isupgradedenum, std::string >::type From(const T_ &e)
Definition: Enum.h:303
@ FunctionCall
Marks instruction as a regular function call.
void SetLiteral(const Scripting::Type *type, Any value)
Definition: Instruction.h:95
void SetStringLiteral(const std::string &value)
Definition: Instruction.h:105
This class can hold any other information providing type erasure.
Definition: Any.h:32
bool Reference
Definition: Instruction.h:170
Data describes a piece of data.
Definition: Data.h:22
std::string ToString() const
Definition: Data.cpp:90
void SetLiteral(const Data &value)
Definition: Instruction.h:100
Value RHS
The value that will be assigned to the variable.
Definition: Instruction.h:165
Value Name
Name of the function or variable.
Definition: Instruction.h:162
@ Assignment
Marks instruction as an assignment.
InstructionType
Describes the type of an instruction.
Definition: Instruction.h:7
This class stores information about types.
Definition: Reflection.h:1165
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
std::string Name
Used for variables and constants.
Definition: Instruction.h:84
static Data Invalid()
Constructs an invalid data object.
Definition: Data.h:27
Data Literal
Used for literal values.
Definition: Instruction.h:87
This class contains a parsed value.
Definition: Instruction.h:82
Byte Result
Used for temporary results.
Definition: Instruction.h:93
std::string ToString() const
Definition: Instruction.h:125
void SetTemp(Byte index)
Definition: Instruction.h:120
unsigned char Byte
Represents smallest cell in memory.
Definition: Types.h:9
@ MethodCall
Marks this instruction as a method call.
@ Literal
This is a literal value.
void SetIdentifier(const std::string &name)
Definition: Instruction.h:115
@ Identifier
Marks this value as an identifier, either a constant or a variable.
void SetVariable(const std::string &name)
Definition: Instruction.h:110
@ Unknown
This value is not valid.
@ Variable
This is a variable.
Byte Store
Whether to store the result of the function.
Definition: Instruction.h:174
ValueType Type
Type of this value.
Definition: Instruction.h:90
@ Jump
Unconditionally jumps by the given offset. Offset should be in JumpOffset field.
std::vector< Value > Parameters
Parameters of the function.
Definition: Instruction.h:168
@ None
For error checking purposes.
ValueType
Possible value types.
Definition: Instruction.h:61
A single instruction.
Definition: Instruction.h:150
Instruction()
Definition: Instruction.h:151
Instruction(const Instruction &inst)
Definition: Instruction.h:153