Website Summary Files Commits Branches @commit @diff @stats
path: root / JSImpl / src / main.cpp
diff options
context:
space:
mode:
Commit0d0159f70b0f3b23d6a4187d43167ded6b104e0f (patch)
Author
 Dimitar Trendafilov <trendafilov.dn@gmail.com>
2020-11-02 09:03:05 +0200
Committer
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2020-11-09 22:08:19 +0200
Files18b71ac80128b6a00d501cd64260977cac3efd2e /JSImpl/src/main.cpp
IPL-0d0159f70b0f3b23d6a4187d43167ded6b104e0f.tar
IPL-0d0159f70b0f3b23d6a4187d43167ded6b104e0f.tar.gz
IPL-0d0159f70b0f3b23d6a4187d43167ded6b104e0f.zip
Parentacb4362f28e783632a5c79db98f14b60aa12f175 (diff)
Support for strings in the AST interpreter
1 files changed, 5 insertions, 1 deletions
-rw-r--r--JSImpl/src/main.cpp6
diff --git a/JSImpl/src/main.cpp b/JSImpl/src/main.cpp
index 6ed1122..06421a7 100644
--- a/JSImpl/src/main.cpp
+++ b/JSImpl/src/main.cpp
@@ -38,7 +38,11 @@ class InterpreterPrinter : public ASTInterpreter::Printer
public:
virtual void PrintVariable(const char* name, double value) override
{
- std::cout << name << ": " << value << std::endl;
+ std::cout << name << ": number : " << value << std::endl;
+ }
+ virtual void PrintVariable(const char* name, const IPLString& value) override
+ {
+ std::cout << name << ": string : " << value << std::endl;
}
};