diff --git a/parser/Node.h b/parser/Node.h index 3d88e5c..e170172 100644 --- a/parser/Node.h +++ b/parser/Node.h @@ -14,6 +14,7 @@ class Node void addChildren(refptr other); std::vector< refptr > & getChildren() { return m_children; } + virtual unsigned long getInteger() { return 0ul; } virtual std::string getString() { return ""; } protected: @@ -21,14 +22,20 @@ class Node }; +class IntegerNode : public Node +{ + public: + IntegerNode(unsigned long integer) { m_integer = integer; } + unsigned long getInteger() { return m_integer; } + protected: + unsigned long m_integer; +}; + class StringNode : public Node { public: StringNode(const std::string & str) { m_string = str; } - std::string getString() - { - return m_string; - } + std::string getString() { return m_string; } protected: std::string m_string; };