made IntegerNode hold a 64-bit integer

git-svn-id: svn://anubis/jtlc/trunk@12 f5bc74b8-7b62-4e90-9214-7121d538519f
This commit is contained in:
josh 2010-01-13 19:46:35 +00:00
parent 19dd46d14d
commit 8333a037c9
2 changed files with 9 additions and 7 deletions

View File

@ -44,6 +44,6 @@ void compile(const char * filename)
{
FILE * out = tmpfile();
refptr<Node> tree = parse(filename);
// tree->process(out);
tree->process(out);
fclose(out);
}

View File

@ -1,10 +1,11 @@
#ifndef NODES_H
#define NODES_H NODES_H
#ifndef NODE_H
#define NODE_H NODE_H
#include "util/refptr.h"
#include <stdint.h>
#include <vector>
#include <string>
#include "util/refptr.h"
class Node
{
@ -14,8 +15,9 @@ class Node
void addChildren(refptr<Node> other);
std::vector< refptr<Node> > & getChildren() { return m_children; }
virtual unsigned long getInteger() { return 0ul; }
virtual uint64_t getInteger() { return 0x0ULL; }
virtual std::string getString() { return ""; }
virtual void process(FILE * out) { }
protected:
std::vector< refptr<Node> > m_children;
@ -25,10 +27,10 @@ class Node
class IntegerNode : public Node
{
public:
IntegerNode(unsigned long integer) { m_integer = integer; }
IntegerNode(uint64_t integer) { m_integer = integer; }
unsigned long getInteger() { return m_integer; }
protected:
unsigned long m_integer;
uint64_t m_integer;
};
class StringNode : public Node