Also init dependencies of non rule form expand_keywords

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@989 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-06-18 21:45:12 +00:00
parent 95d38f9ba6
commit 296cf8197a
5 changed files with 23 additions and 9 deletions
+4
View File
@@ -232,6 +232,10 @@ ScriptValueP Context::getVariable(Variable var) {
if (variables[var].value) return variables[var].value;
throw ScriptError(_("Variable not set: ") + variable_to_string(var));
}
ScriptValueP Context::getVariableInScopeOpt(Variable var) {
if (variables[var].level == level) return variables[var].value;
else return ScriptValueP();
}
int Context::getVariableScope(Variable var) {
if (variables[var].value) return level - variables[var].level;
else return -1;