]> git.localhorst.tv Git - l2e.git/blobdiff - src/loader/ParsedSource.h
fixed some issues to get it to compile again
[l2e.git] / src / loader / ParsedSource.h
index 98ecd8423c401652f235c01a5ed7d68d40b1379b..e10b287aa661fbd9b5b9cdfac71c593d0714dc47 100644 (file)
@@ -51,6 +51,9 @@ private:
 
 public:
        Type GetType() const { return type; }
+       bool IsArray() const { return GetType() == ARRAY_VALUES || GetType() == ARRAY_PROPS; }
+       bool IsObject() const { return GetType() == OBJECT; }
+       int ArraySize() const { return GetType() == ARRAY_VALUES ? GetValues().size() : GetPropertyLists().size(); }
 
        const std::vector<Value *> &GetValues() const;
        const std::vector<PropertyList *> &GetPropertyLists() const;