return currentScope;
}
// javadoc inherited
public void declareVariable(String variable, Object value) {
ExpressionScope scope = getCurrentScope();
if (scope == null) {
throw new IllegalStateException(
"An attempt has been made to declare a variable " +
"while there is no current expression scope");
} else if (!(value instanceof Value)) {
throw new IllegalArgumentException(
"An attempt has been made to declare a variable " +
"with a value that doesn't implement " +
Value.class.getName() +
" (" + value.getClass().getName() + ")");
} else {
ExpandedName name = expandName(variable);
scope.declareVariable(name, (Value)value);
}
}