aboutsummaryrefslogtreecommitdiffstats
path: root/src/c_lexer.cpp
blob: bc9c0de06c9fcc38d240a34c1da147ea31771198 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#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;
}

void updateSpaceCount(std::string inStr) {
	for(unsigned i = 0; i < inStr.size(); ++i)
		spaceCount++;
}