diff options
Diffstat (limited to 'c_lexer/src/c_lexer.cpp')
-rw-r--r-- | c_lexer/src/c_lexer.cpp | 11 |
1 files changed, 11 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..0e9f021 --- /dev/null +++ b/c_lexer/src/c_lexer.cpp @@ -0,0 +1,11 @@ +#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; +} |