Object traits working now as well. Only specilized templates don't, because I have not yet decided the syntax for them.

This commit is contained in:
Nathan Braswell
2014-07-20 14:21:41 -07:00
parent 64fcb6b0b7
commit 93a170408f
6 changed files with 104 additions and 41 deletions

View File

@@ -65,7 +65,7 @@ const bool Type::operator!=(const Type &other) const {
return(!this->operator==(other));
}
std::string Type::toString() {
std::string Type::toString(bool showTraits) {
std::string typeString;
switch (baseType) {
case none:
@@ -106,7 +106,7 @@ std::string Type::toString() {
}
for (int i = 0; i < indirection; i++)
typeString += "*";
if (traits.size()) {
if (traits.size() && showTraits) {
typeString += "[ ";
for (auto i : traits)
typeString += i + " ";