コード例 #1
0
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;
}
コード例 #2
0
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;
}