parseDefFileText function

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

Implementation

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

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