Website Summary Files Commits Branches @commit @diff @stats
path: root / JSImpl / src / ASTPrinter.cpp
diff options
context:
space:
mode:
1 files changed, 30 insertions, 30 deletions
-rw-r--r--JSImpl/src/ASTPrinter.cpp60
diff --git a/JSImpl/src/ASTPrinter.cpp b/JSImpl/src/ASTPrinter.cpp
index 4dc07f4..864c4fc 100644
--- a/JSImpl/src/ASTPrinter.cpp
+++ b/JSImpl/src/ASTPrinter.cpp
@@ -85,26 +85,26 @@ void Print<const IPLString&>(std::ostream& os, ASTPrinter &printer, const char*
}
os << "\n";
}
-
-IPLString AsString(LiteralType type)
-{
- switch (type)
- {
- case LiteralType::Number:
- return "Number";
- case LiteralType::String:
- return "String";
- case LiteralType::Boolean:
- return "Boolean";
- case LiteralType::Null:
- return "Null";
- case LiteralType::Undefined:
- return "Undefined";
- default:
- break;
- }
- return "Undefined";
-}
+//
+//IPLString AsString(LiteralType type)
+//{
+// switch (type)
+// {
+// case LiteralType::Number:
+// return "Number";
+// case LiteralType::String:
+// return "String";
+// case LiteralType::Boolean:
+// return "Boolean";
+// case LiteralType::Null:
+// return "Null";
+// case LiteralType::Undefined:
+// return "Undefined";
+// default:
+// break;
+// }
+// return "Undefined";
+//}
std::ostream& operator<<(std::ostream& os, const TokenType& t)
{
@@ -204,16 +204,16 @@ std::ostream& operator<<(std::ostream& os, const TokenType& t)
return os;
}
-void ASTPrinter::Visit(LiteralExpression* e)
-{
- os << "{\n" << "\"ExpresionType\": \"LiteralExpression\"," << '\n';
- Print(os, *this, "BooleanValue", e->GetBooleanValue(), false);
- Print(os, *this, "LiteralType", AsString(e->GetLiteralType()), false);
- Print(os, *this, "NumValue", e->GetNumValue(), false);
- Print(os, *this, "StringValue", e->GetStringValue(), true);
- os << "}\n";
-}
-
+//void ASTPrinter::Visit(LiteralExpression* e)
+//{
+// os << "{\n" << "\"ExpresionType\": \"LiteralExpression\"," << '\n';
+// Print(os, *this, "BooleanValue", e->GetBooleanValue(), false);
+// Print(os, *this, "LiteralType", AsString(e->GetLiteralType()), false);
+// Print(os, *this, "NumValue", e->GetNumValue(), false);
+// Print(os, *this, "StringValue", e->GetStringValue(), true);
+// os << "}\n";
+//}
+//
#define MEMBERS_COUNT(type, name, def) ++membersCount;
#define VISIT_MEMBER(type, name, def) ++currentVisitCount; Print(os, *this, #name, e->Get##name(), currentVisitCount == membersCount);;