lib/editors/parser_factory.js
function createParser(args) {
  if (!args || !args.file || !args.databaseType) {
    throw new BuildException(
      exceptions.IllegalArgument,
      'The file and the database type must be passed');
  }
  const types = initDatabaseTypeHolder(args.databaseType);
  if (args.editor) {
    const root = getRootElement(readFileContent(args.file));
    return getFileParserByEditor(args.editor, root, types, args.noUserManagement);
  }
  return getParserForSingleFile(args.file, types, args.noUserManagement);
}
function createParser(args) {
  if (!args || !args.file || !args.databaseType) {
    throw new BuildException(
      exceptions.IllegalArgument,
      'The file and the database type must be passed');
  }
  const types = initDatabaseTypeHolder(args.databaseType);
  if (args.editor) {
    const root = getRootElement(readFileContent(args.file));
    return getFileParserByEditor(args.editor, root, types, args.noUserManagement);
  }
  return getParserForSingleFile(args.file, types, args.noUserManagement);
}
function createParser ( args ) { if ( ! args || ! args . file || ! args . databaseType ) { throw new BuildException ( exceptions . IllegalArgument , 'The file and the database type must be passed' ) ; } const types = initDatabaseTypeHolder ( args . databaseType ) ; if ( args . editor ) { const root = getRootElement ( readFileContent ( args . file ) ) ; return getFileParserByEditor ( args . editor , root , types , args . noUserManagement ) ; } return getParserForSingleFile ( args . file , types , args . noUserManagement ) ; }
Creates a parser.
@param args {Object} the arguments: file, files, databaseType, and the noUserManagement flag.
@return {Parser} the created parser.
Creates a parser .