Website Summary Files Commits Branches @commit @diff @stats
path: root / JSImpl / src / main.cpp
diff options
context:
space:
mode:
Commit2afce60a25b9d19b24c5420b8d6a049769e519bb (patch)
Author
 omalinov <ognyan.m@coherent-labs.com>
2018-10-24 21:43:14 +0300
Committer
 Martin Dobrev <martindobrev0@gmail.com>
2018-10-24 21:43:14 +0300
Files84f9890f061a9655f1b5d969db9feb1ee3ef3231 /JSImpl/src/main.cpp
IPL-2afce60a25b9d19b24c5420b8d6a049769e519bb.tar
IPL-2afce60a25b9d19b24c5420b8d6a049769e519bb.tar.gz
IPL-2afce60a25b9d19b24c5420b8d6a049769e519bb.zip
Parent8f9f28a9875816f5b61893f69d7bd3d2cf4182c6 (diff)
ASTParser proper intendation. (#16)
1 files changed, 4 insertions, 2 deletions
-rw-r--r--JSImpl/src/main.cpp6
diff --git a/JSImpl/src/main.cpp b/JSImpl/src/main.cpp
index dd54f38..a7d489c 100644
--- a/JSImpl/src/main.cpp
+++ b/JSImpl/src/main.cpp
@@ -191,12 +191,13 @@ void TestCommentError()
void TestParseUnaryExpr()
{
IPLVector<Token> tokens;
- Tokenize("function pesho() { var a = 0; return a; }", tokens);
+ Tokenize("function pesho() { var a = 0; return a; } var a = \"3\";", tokens);
// TODO make actual test :D
auto expr = Parse(tokens);
ASTPrinter p(std::cout);
expr->Accept(p);
+ std::cout << "\n";
}
void RunParseCalc()
@@ -258,7 +259,8 @@ int main()
EXECUTE_TEST(TestScientificNotationNumber);
//TestParseUnaryExpr();
- RunParseCalc();
+ RunParseCalc();
+
#if defined(_WIN32)
std::system("pause");
#endif