]> git.localhorst.tv Git - l2e.git/blobdiff - src/loader/Interpreter.cpp
parse scripts
[l2e.git] / src / loader / Interpreter.cpp
index e8d4ec9ff5be63fae56efcde0e3eef8ead5c8867..8b9b56a2098eb9ae9a6a4002020f4973fdfa6675 100644 (file)
@@ -142,6 +142,8 @@ void Interpreter::ReadLiteral(int typeId, int id, char *object, const Literal &l
                        std::memcpy(object, literal.GetString().c_str(), literal.GetString().size());
                        object[literal.GetString().size()] = '\0';
                        break;
+               case Literal::SCRIPT:
+                       throw Error("script compiler not implemented");
                case Literal::STRING:
                        std::memcpy(object, literal.GetString().c_str(), literal.GetString().size());
                        object[literal.GetString().size()] = '\0';
@@ -151,7 +153,6 @@ void Interpreter::ReadLiteral(int typeId, int id, char *object, const Literal &l
                        break;
                case Literal::OBJECT:
                        throw Error("illogical branch: read literal object as non-object literal");
-                       break;
        }
 }
 
@@ -213,6 +214,8 @@ void *Interpreter::GetObject(int typeId, const Value &v) {
                                                values[typeId].push_back(str);
                                        }
                                        break;
+                               case Literal::SCRIPT:
+                                       throw Error("script compiler not implemented");
                                case Literal::STRING:
                                        {
                                                typeId = TypeDescription::GetTypeId("String");