aboutsummaryrefslogtreecommitdiffstats
path: root/c_lexer/src/c_lexer.cpp
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-02-07 16:56:57 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-02-07 16:56:57 +0000
commit76699050049febe4c7eb0199cd0ae9d13fb36b74 (patch)
tree612fd98f279355c529390f0c7f431ebd1f0dbc27 /c_lexer/src/c_lexer.cpp
parent9d94e43d23698f4804060c82482966da9680faa1 (diff)
downloadCompiler-76699050049febe4c7eb0199cd0ae9d13fb36b74.tar.gz
Compiler-76699050049febe4c7eb0199cd0ae9d13fb36b74.zip
Changing file structure
Diffstat (limited to 'c_lexer/src/c_lexer.cpp')
-rw-r--r--c_lexer/src/c_lexer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/c_lexer/src/c_lexer.cpp b/c_lexer/src/c_lexer.cpp
new file mode 100644
index 0000000..e01d73f
--- /dev/null
+++ b/c_lexer/src/c_lexer.cpp
@@ -0,0 +1,7 @@
+#include "c_lexer.hpp"
+
+std::string toJson(const std::string& classType, const std::string& text, const std::string& strLine, const std::string& srcCol, const std::string& srcLine, const std::string& fName) {
+ std::string tmp = "{\"Class\":\"" + classType + "\", \"Text\":\"" + text + "\", \"StreamLine\":" + strLine + ", \"SourceFile\":\"" + fName + "\", \"SourceLine\":" + srcLine + ", \"SourceCol\":" + srcCol + "}";
+
+ return tmp;
+}