+const char *Interpreter::GetPath(const std::string &name) const {
+ map<string, ParsedDefinition>::const_iterator i(parsedDefinitions.find(name));
+ if (i != parsedDefinitions.end()) {
+ if (i->second.type == PATH) {
+ return strings[i->second.index];
+ } else {
+ throw Error("cannot cast " + i->second.dfn->TypeName() + " to Path");
+ }
+ } else {
+ throw Error("access to undefined Path " + name);
+ }
+}
+