string Preprocessor::preprocess(string file_name) { string resultCode = fileToString(file_name); Preprocessor preprocessor = Preprocessor(); resultCode = preprocessor.deleteComments(resultCode); resultCode = preprocessor.applyDefines(resultCode); resultCode = preprocessor.applyIncludes(resultCode, "", includeDirectory); return resultCode; }
string Preprocessor::preprocess(string file_name, string filePath, string includeDirectory) { this->includeDirectory = includeDirectory; println(this->includeDirectory); string resultCode = fileToString(file_name); Preprocessor preprocessor = Preprocessor(); resultCode = preprocessor.deleteComments(resultCode); resultCode = preprocessor.applyDefines(resultCode); resultCode = preprocessor.applyIncludes(resultCode, filePath, includeDirectory); return resultCode; }