Added ability to add commits the Kraken grammer file. Started work on class traits and else statements.

This commit is contained in:
Nathan Braswell
2014-07-06 23:42:25 -07:00
parent 91a68ac2b1
commit 46b9fc8b7f
8 changed files with 57 additions and 14 deletions

View File

@@ -503,8 +503,10 @@ NodeTree<ASTData>* ASTTransformation::transform(NodeTree<Symbol>* from, NodeTree
}
// //Set the value of this function call
if (newNode->getDataRef()->valueType == NULL && rhs->getDataRef()->valueType)
newNode->getDataRef()->valueType = rhs->getDataRef()->valueType;
if (newNode->getDataRef()->valueType == NULL && rhs->getDataRef()->valueType) {
std::cout << "The value type from doFunction was null! (for " << functionCallName << ")" << std::endl;
newNode->getDataRef()->valueType = rhs->getDataRef()->valueType;
}
//else
// newNode->getDataRef()->valueType = NULL;
std::cout << "function call to " << functionCallName << " - " << newNode->getName() << " is now " << newNode->getDataRef()->valueType << std::endl;
@@ -754,7 +756,7 @@ NodeTree<ASTData>* ASTTransformation::doFunction(NodeTree<ASTData>* scope, std::
else
newType->increaseIndirection();
newNode->getDataRef()->valueType = newType, std::cout << "Operator " + lookup << " is altering indirection "<< std::endl;
newNode->getDataRef()->valueType = newType, std::cout << "Operator " + lookup << " is altering indirection from " << oldTypes[0].toString() << " to " << newType->toString() << std::endl;
} else {
newNode->getDataRef()->valueType = function->getDataRef()->valueType, std::cout << "Some other ||" << lookup << "||" << std::endl;
}