mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
add global scope
This commit is contained in:
@@ -53,7 +53,8 @@ public:
|
||||
/// Set a variable to a new value (in the current scope)
|
||||
void setVariable(const String& name, const ScriptValueP& value);
|
||||
/// Set a variable to a new value (in the current scope)
|
||||
void setVariable(Variable name, const ScriptValueP& value);
|
||||
void setVariable(Variable name, const ScriptValueP& value);
|
||||
void setGlobalVariable(Variable name, const ScriptValueP& value);
|
||||
|
||||
/// Get the value of a variable, throws if it not set
|
||||
ScriptValueP getVariable(const String& name);
|
||||
@@ -88,7 +89,8 @@ public:// public for FOR_EACH
|
||||
struct VariableValue {
|
||||
VariableValue() : level(0) {}
|
||||
unsigned int level; ///< Scope level on which this variable was set
|
||||
ScriptValueP value; ///< Value of this variable
|
||||
ScriptValueP value; ///< Value of this variable
|
||||
bool global_scope = false; ///< Is this variable globally scoped?
|
||||
};
|
||||
/// Record of a variable binding that is being shadowed (overwritten) by another binding
|
||||
struct Binding {
|
||||
|
||||
Reference in New Issue
Block a user