From b9243748c11a6391068e6501c96040021572297d Mon Sep 17 00:00:00 2001 From: Martin Dobrev Date: Mon, 26 Oct 2020 22:03:28 +0200 Subject: Add example usage of command line --- JSImpl/examples/code.js | 5 +++++ JSImpl/src/main.cpp | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 JSImpl/examples/code.js (limited to 'JSImpl') diff --git a/JSImpl/examples/code.js b/JSImpl/examples/code.js new file mode 100644 index 0000000..72b068b --- /dev/null +++ b/JSImpl/examples/code.js @@ -0,0 +1,5 @@ +var pesho = 2; +var gosho = 4; +if (pesho + gosho > 10) { + pesho = 5; +} \ No newline at end of file diff --git a/JSImpl/src/main.cpp b/JSImpl/src/main.cpp index c1cfe64..6ed1122 100644 --- a/JSImpl/src/main.cpp +++ b/JSImpl/src/main.cpp @@ -227,6 +227,9 @@ private: int main(int argc, char* argv[]) { + // You can try => + // Working dir: $(ProjectDir) + // Command arguments: --input ./../examples/code.js --output ./../examples/some.ast --ast CammandLineApp cmd; cmd.RunAsCommandLine(argc, argv); //auto r = Tokenize("a#4", {true ,true}); -- cgit v1.3.1-26-gb76a