22 lines
444 B
C++
22 lines
444 B
C++
#include "KeywordValue.h"
|
|
#include <iostream>
|
|
|
|
namespace jet {
|
|
|
|
KeywordValue::KeywordValue(coreutils::ZString data, Global &global) : MString() {
|
|
while(!data.eod()) {
|
|
if(data.ifNext("$[")) {
|
|
coreutils::ZString varName(data.getTokenExclude("]"));
|
|
data.ifNext("]");
|
|
write(global.variables[varName]);
|
|
} else {
|
|
write(data.charAt(0));
|
|
data.nextChar();
|
|
}
|
|
}
|
|
}
|
|
|
|
KeywordValue::~KeywordValue() {}
|
|
|
|
}
|