jtlc/nodes/PrimitiveTypeNode.cc
josh 3301142147 added bool type
git-svn-id: svn://anubis/jtlc/trunk@20 f5bc74b8-7b62-4e90-9214-7121d538519f
2010-01-13 22:58:07 +00:00

38 lines
837 B
C++

#include <iostream>
#include "Node.h"
#include "parser/parser.h"
using namespace std;
string PrimitiveTypeNode::getString()
{
switch (m_integer)
{
case BOOL:
return "uint8_t";
case BYTE:
return "int8_t";
case UBYTE:
return "uint8_t";
case CHAR:
return "char";
case WCHAR:
return "wchar_t";
case SHORT:
return "int16_t";
case USHORT:
return "uint16_t";
case INT:
return "int32_t";
case UINT:
return "uint32_t";
case LONG:
return "int64_t";
case ULONG:
return "uint64_t";
default:
cerr << "Error: Unknown primitive type " << m_integer << endl;
return "<UNKNOWN-TYPE>";
}
}