|
|
|
@ -65,6 +65,18 @@ private:
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------
|
|
|
|
|
|
|
|
|
|
// ()
|
|
|
|
|
class List final : public Collection { |
|
|
|
|
public: |
|
|
|
|
List() = default; |
|
|
|
|
virtual ~List() = default; |
|
|
|
|
|
|
|
|
|
virtual bool isCollection() const override { return false; } |
|
|
|
|
virtual bool isList() const override { return true; } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// -----------------------------------------
|
|
|
|
|
|
|
|
|
|
// []
|
|
|
|
|
class Vector final : public Collection { |
|
|
|
|
public: |
|
|
|
@ -89,18 +101,6 @@ public:
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------
|
|
|
|
|
|
|
|
|
|
// ()
|
|
|
|
|
class List final : public Collection { |
|
|
|
|
public: |
|
|
|
|
List() = default; |
|
|
|
|
virtual ~List() = default; |
|
|
|
|
|
|
|
|
|
virtual bool isCollection() const override { return false; } |
|
|
|
|
virtual bool isList() const override { return true; } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// -----------------------------------------
|
|
|
|
|
|
|
|
|
|
// "string"
|
|
|
|
|
class String final : public ASTNode { |
|
|
|
|
public: |
|
|
|
@ -202,13 +202,13 @@ template<>
|
|
|
|
|
inline bool ASTNode::fastIs<Collection>() const { return isCollection(); } |
|
|
|
|
|
|
|
|
|
template<> |
|
|
|
|
inline bool ASTNode::fastIs<Vector>() const { return isVector(); } |
|
|
|
|
inline bool ASTNode::fastIs<List>() const { return isList(); } |
|
|
|
|
|
|
|
|
|
template<> |
|
|
|
|
inline bool ASTNode::fastIs<HashMap>() const { return isHashMap(); } |
|
|
|
|
inline bool ASTNode::fastIs<Vector>() const { return isVector(); } |
|
|
|
|
|
|
|
|
|
template<> |
|
|
|
|
inline bool ASTNode::fastIs<List>() const { return isList(); } |
|
|
|
|
inline bool ASTNode::fastIs<HashMap>() const { return isHashMap(); } |
|
|
|
|
|
|
|
|
|
template<> |
|
|
|
|
inline bool ASTNode::fastIs<String>() const { return isString(); } |
|
|
|
|