shell function
void
shell()
This method provides a shell method. It can be customized.
Implementation
void shell(
String preAmble,
String quitStatement,
Map<String, dynamic> tokenMap,
Map<String, dynamic> grammar,
List<String> cosmeticTokens,
Map<String, dynamic> functionMap) {
String input = 'Unicorn Script';
int i = 0;
print(preAmble);
while (input != quitStatement) {
i = i + 1;
String prompt = 'line\=$i> ';
stdout.write(prompt);
input = stdin.readLineSync().toString();
assert(input is String);
if (input == quitStatement) {
exit(0);
} else {
evaluateLine(tokenMap, input, grammar, cosmeticTokens, functionMap);
}
}
}