Objects work now! We have methods!

This commit is contained in:
Nathan Braswell
2014-02-18 21:55:00 -05:00
parent 1791738cd9
commit 37cffac9cd
5 changed files with 70 additions and 45 deletions

View File

@@ -21,7 +21,9 @@ ASTData::~ASTData() {
}
std::string ASTData::toString() {
return ASTTypeToString(type) + (symbol.isTerminal() ? " " + symbol.toString() : "") + " " + (valueType ? valueType->toString() : "no_type");
return ASTTypeToString(type) + " " +
(symbol.isTerminal() ? " " + symbol.toString() : "") + " " +
(valueType ? valueType->toString() : "no_type");
}
std::string ASTData::ASTTypeToString(ASTType type) {