readDefFile function

dynamic readDefFile(
  1. String filePath, {
  2. String baseFolderPath = '',
  3. String readTextFileFunction(
    1. String, [
    2. String
    ])? = readTextFile,
  4. String stringProcessingQuote = '\'',
  5. dynamic processQuotedStringFunction(
    1. String,
    2. ParsingContext,
    3. int
    )? = processDefQuotedString,
  6. int levelSpaceCount = 4,
  7. bool hasImportCommands = true,
  8. String getImportedPathFunction(
    1. String
    )? = getImportedPath,
  9. List<String> getImportedFilePathArrayFunction(
    1. String
    )? = getImportedFilePathArray,
})

Implementation

dynamic readDefFile(
    String filePath,
    {
        String baseFolderPath = '',
        String Function( String, [String] )? readTextFileFunction = readTextFile,
        String stringProcessingQuote = '\'',
        dynamic Function( String, ParsingContext, int )? processQuotedStringFunction = processDefQuotedString,
        int levelSpaceCount = 4,
        bool hasImportCommands = true,
        String Function( String )? getImportedPathFunction = getImportedPath,
        List<String> Function( String )? getImportedFilePathArrayFunction = getImportedFilePathArray
    }
    )
{
    var text = readDefFileText(
        filePath,
        baseFolderPath: baseFolderPath,
        readTextFileFunction: readTextFileFunction,
        hasImportCommands: hasImportCommands,
        getImportedPathFunction: getImportedPathFunction,
        getImportedFilePathArrayFunction: getImportedFilePathArrayFunction
        );

    return (
        parseDefText(
            text,
            baseFolderPath: baseFolderPath,
            filePath: filePath,
            readTextFileFunction: readTextFileFunction,
            stringProcessingQuote: stringProcessingQuote,
            processQuotedStringFunction: processQuotedStringFunction,
            levelSpaceCount: levelSpaceCount
            )
        );
}