Setup base for conversion modifiers to be written.
This commit is contained in:
1 parent
0de087f14d
commit
31e309934c
3 files changed
+13
-3
No files matched your search
+10
-2
@@ -37,6 +37,13 @@ namespace jet {
|
||||
sessions.erase(sessionId);
|
||||
}
|
||||
|
||||
coreutils::MString& Global::processModifier(coreutils::MString &value, coreutils::MString &modifier) {
|
||||
if(modifier.getLength() == 0)
|
||||
return value;
|
||||
lastConverted = modifier;
|
||||
return lastConverted;
|
||||
}
|
||||
|
||||
coreutils::ZString Global::getVariable(coreutils::ZString &variable, std::map<coreutils::ZString, coreutils::MString> &lvariables) {
|
||||
if(variable.ifNext("$[")) {
|
||||
coreutils::MString name;
|
||||
@@ -54,8 +61,9 @@ namespace jet {
|
||||
} else {
|
||||
renderVariableName(variable, name, modifier, lvariables);
|
||||
name.split(".");
|
||||
if(name.getList().size() == 1)
|
||||
return variables[name[0]];
|
||||
if(name.getList().size() == 1) {
|
||||
return processModifier(variables[name[0]], modifier);
|
||||
}
|
||||
return getSessionVariable(name);
|
||||
}
|
||||
throw coreutils::Exception("expected variable name or type designator.");
|
||||
|
||||
Reference in new issue
Block a user