Reader+Printer: Reorder tokens

This commit is contained in:
Riyyi
2023-03-24 21:51:11 +01:00
parent da0b0a91a6
commit 5c5a766b7e
6 changed files with 54 additions and 54 deletions
+15 -15
View File
@@ -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:
@@ -201,15 +201,15 @@ private:
template<>
inline bool ASTNode::fastIs<Collection>() const { return isCollection(); }
template<>
inline bool ASTNode::fastIs<List>() const { return isList(); }
template<>
inline bool ASTNode::fastIs<Vector>() const { return isVector(); }
template<>
inline bool ASTNode::fastIs<HashMap>() const { return isHashMap(); }
template<>
inline bool ASTNode::fastIs<List>() const { return isList(); }
template<>
inline bool ASTNode::fastIs<String>() const { return isString(); }