(Str, {sourceMap: ?Bool, filename: ?Str}) -> { code: Str, sourceMap: ?Str }
343489
function compile(code, options) {
        var output;
        options = options || {};
        options.requireModule = options.requireModule || requireModule;
        var ast = parse(code, options.modules || [], options);
        if (options.readableNames) {
            ast = optimizeHygiene(ast);
        }
        if (options.ast) {
            return ast;
        }
        if (options.sourceMap) {
            output = codegen.generate(ast, _.extend({
                comment: true,
                sourceMap: options.filename,
                sourceMapWithCode: true
            }, options.escodegen));
            return {
                code: output.code,
                sourceMap: output.map.toString()
            };
        }
        return { code: codegen.generate(ast, _.extend({ comment: true }, options.escodegen)) };
    }
543318
function transformCode(code, url, options) {
  try {
    var transformed = transformReact(code, options);
  } catch(e) {
    e.message += '\n    at ';
    if (url) {
      if ('fileName' in e) {
        // We set `fileName` if it's supported by this error object and
        // a `url` was provided.
        // The error will correctly point to `url` in Firefox.
        e.fileName = url;
      }
      e.message += url + ':' + e.lineNumber + ':' + e.column;
    } else {
      e.message += location.href;
    }
    e.message += createSourceCodeErrorMessage(code, e);
    throw e;
  }

  if (!transformed.sourceMap) {
    return transformed.code;
  }

  var map = transformed.sourceMap.toJSON();
  var source;
  if (url == null) {
    source = "Inline JSX script";
    inlineScriptCount++;
    if (inlineScriptCount > 1) {
      source += ' (' + inlineScriptCount + ')';
    }
  } else if (dummyAnchor) {
    // Firefox has problems when the sourcemap source is a proper URL with a
    // protocol and hostname, so use the pathname. We could use just the
    // filename, but hopefully using the full path will prevent potential
    // issues where the same filename exists in multiple directories.
    dummyAnchor.href = url;
    source = dummyAnchor.pathname.substr(1);
  }
  map.sources = [source];
  map.sourcesContent = [code];

  return (
    transformed.code +
    '\n//# sourceMappingURL=data:application/json;base64,' +
    buffer.Buffer(JSON.stringify(map)).toString('base64')
  );
}
238698
function file$1(filePath, parser, parserOptions, cb) {
  var data = fs.readFileSync(filePath, 'utf8');
  var fileFormat = discernFormat(filePath);
  if ((fileFormat === 'json' || formatsIndex.json.indexOf(fileFormat) > -1) && data === '') {
    data = '[]';
  }

  var parsed;
  if (typeof parser === 'function') {
    parsed = parser(data, parserOptions);
  } else if ((typeof parser === 'undefined' ? 'undefined' : _typeof(parser)) === 'object' && typeof parser.parse === 'function') {
    parsed = parser.parse(data, parserOptions);
  } else {
    return new Error('Your specified parser is not properly formatted. It must either be a function or have a `parse` method.');
  }

  // if (opts_ && opts_.flatten) {
  //   parsed = _.map(parsed, flatten)
  // }
  return parsed;
}
260279
function parse(content, comboMapFile, o) {
	CONTENT = '';
	var source_content = content;
	JS_Files = [];
	CSS_Files = [];
	comboCSS = true;
	comboJS = true;
	content = css(content);
	content = js(content);
	if (comboMapFile) {
		JS_Files = insertComboMapFile(JS_Files, comboMapFile);
	}

	try {
		JS_Files = teardownParams(JS_Files);
		CSS_Files = teardownParams(CSS_Files);
	} catch(e){}

	var combinedJS = getCombinedAssets(JS_Files);
	var combinedCSS = getCombinedAssets(CSS_Files);


	return {
		content: insertScript(recall(content), combinedJS, combinedCSS),
		js: distinct(JS_Files),
		css: distinct(CSS_Files)
	};
}
46554
function (str, parserOptions) {
  parserOptions = parserOptions || {};
  var map = parserOptions.map || identity;
  var loadMethod = parserOptions.loadMethod || 'safeLoad';
  var data = index$13[loadMethod](str, omit(parserOptions, ['map', 'loadMethod'])) || {};
  return map(data, map);
}
290080
def code( *args, &blk )
  # check for optional hash for options
  opts = args.last.kind_of?(Hash) ? args.pop : {}
  
  name_plus_part = args.first   # check for optional filename
    
  if name_plus_part 
    name, part = name_plus_part.split( '#' ) # split off optional part/anchor 
    
    content = find_content_from( name, part ) 
    
    # add name and part to opts so engine can use paras too  
    opts[ :name ] = name  
    opts[ :part ] = part if part
    
    return format_code( content, opts )
  elsif blk # inline code via block?
    content = capture_erb(&blk)
    return if content.empty?

    concat_erb( format_code( content, opts ), blk.binding )
    return
  else
    msg = '*** warning: empty code directive; inline code or file para expected'
    puts msg 
    return wrap_markup( "<!-- #{msg} -->" )
  end
end
1352886
function createSourceMapFile(opts) {
  return new File({
    cwd: opts.cwd,
    base: opts.base,
    path: opts.path,
    contents: new Buffer(JSON.stringify(opts.content)),
    stat: {
      isFile: function() {
        return true;
      },
      isDirectory: function() {
        return false;
      },
      isBlockDevice: function() {
        return false;
      },
      isCharacterDevice: function() {
        return false;
      },
      isSymbolicLink: function() {
        return false;
      },
      isFIFO: function() {
        return false;
      },
      isSocket: function() {
        return false;
      },
    },
  });
}
28227
function getSourceCode(filepath) {
      // The current folder
      var dir = filepath.substring(0, filepath.lastIndexOf("/") + 1);

      // Regex for file import
      var fileRegex = /(?:["'])<!=\s*(.+)\b\s*!>(?:["'])?;?/;
      // Regex for file extension
      var fileExtRegex = /\..+$/;

      // Read the file and check if anything should be imported into it; loop through them
      return grunt.file.read(filepath).replace(new RegExp(fileRegex.source, "g"), function(match) {
        // Log the number of imports we did
        files += 1;

        // Get the filename
        var file = match.match(fileRegex)[1];

        // Check if it has an extension
        if(file.match(fileExtRegex) === null) {
          file += options.defaultExtension; // Add it
        }

        var source = "";

        // Loop through files
        glob.sync(dir + file).forEach(function(filename) {
          // Read file
          var src = grunt.file.read(filename);

          // Check if it has imports too
          source += (function() {
                return fileRegex.test(src) ? getSourceCode(filename) : src;
              })() + options.separator; // Add separator
        });
        return source;
      });
    }
825434
function getSourceMap(options) {
  var sourceMap = options.sourceMap;

  if (sourceMap && typeof sourceMap !== 'string' && options.outFile) {
    sourceMap = options.outFile + '.map';
  }

  return sourceMap && typeof sourceMap === 'string' ? path.resolve(sourceMap) : null;
}
1091134
def check(args, source_code, filename=None, options=None):
    """"""
    if args is None:
        return []
    if options is not None:
        args += options
    if any(['pyflakes' in arg for arg in args]):
        #  Pyflakes requires an ending new line (pycodestyle don't! -- see Issue 1123)
        #  Note: this code is not used right now as it is faster to invoke 
        #  pyflakes in current Python interpreter (see `check_with_pyflakes` 
        #  function above) than calling it through a subprocess
        source_code += '\n'
    if filename is None:
        # Creating a temporary file because file does not exist yet 
        # or is not up-to-date
        tempfd = tempfile.NamedTemporaryFile(suffix=".py", delete=False)
        tempfd.write(source_code)
        tempfd.close()
        args.append(tempfd.name)
    else:
        args.append(filename)
    cmd = args[0]
    cmdargs = args[1:]
    proc = programs.run_program(cmd, cmdargs)
    output = proc.communicate()[0].strip().decode().splitlines()
    if filename is None:
        os.unlink(tempfd.name)
    results = []
    coding = encoding.get_coding(source_code)
    lines = source_code.splitlines()
    for line in output:
        lineno = int(re.search(r'(\:[\d]+\:)', line).group()[1:-1])
        try:
            text = to_text_string(lines[lineno-1], coding)
        except TypeError:
            text = to_text_string(lines[lineno-1])
        except UnicodeDecodeError:
            # Needed to handle UnicodeDecodeError and force the use
            # of chardet to detect enconding. See issue 6970
            coding = encoding.get_coding(source_code, force_chardet=True)
            text = to_text_string(lines[lineno-1], coding)
        if 'analysis:ignore' not in text:
            message = line[line.find(': ')+2:]
            results.append((message, lineno))
    return results
996336
function maybeMapOverVal(fn, val) {
  var vals = val.split(',');
  if (vals.length > 1) {
    return vals.map(function(v) { return v == '.' ? null : fn(v); });
  }
  return val == '.' ? null : fn(val);
}
1283778
function (output) {
              // Manually convert paths to relative, because LESS
              // can make tose absolute for complex cases.
              var map = JSON.parse(output);
              var dir = path.dirname(context.pathname);
              map.sources.forEach(function (file, idx) {
                var rel = path.relative(dir, file);
                if (path.sep === '\\') { rel = rel.replace('\\', '/'); }
                map.sources[idx] = rel;
              });

              self.map = JSON.stringify(map);
            }
191478
private static ImmutableMap<Symbol, File> loadDocIdToFileMap(
      final Optional<File> inputFileListFile,
      final Optional<File> inputFileMapFile) throws IOException {
    checkArgument(inputFileListFile.isPresent() || inputFileMapFile.isPresent());

    final Optional<ImmutableList<File>> fileList;
    if (inputFileListFile.isPresent()) {
      fileList = Optional.of(FileUtils.loadFileList(inputFileListFile.get()));
    } else {
      fileList = Optional.absent();
    }

    final Optional<ImmutableMap<Symbol, File>> fileMap;
    if (inputFileMapFile.isPresent()) {
      fileMap = Optional.of(FileUtils.loadSymbolToFileMap(inputFileMapFile.get()));
    } else {
      fileMap = Optional.absent();
    }

    // sanity checks

    if (fileList.isPresent()) {
      // file list may not contain duplicates
      final boolean containsDuplicates =
          ImmutableSet.copyOf(fileList.get()).size() != fileList.get().size();
      if (containsDuplicates) {
        throw new RuntimeException("Input file list contains duplicates");
      }
    }

    // if both a file map and a file list are given, they must be compatible.
    if (fileList.isPresent() && fileMap.isPresent()) {
      if (fileList.get().size() != fileMap.get().size()) {
        throw new RuntimeException("Input file list and file map do not match in size ("
            + fileList.get().size() + " vs " + fileMap.get().size());
      }
      final boolean haveExactlyTheSameFiles =
          ImmutableSet.copyOf(fileList.get()).equals(ImmutableSet.copyOf(fileMap.get().values()));
      if (!haveExactlyTheSameFiles) {
        throw new RuntimeException(
            "Input file list and file map do not containe exactly the same files");
      }
    }

    // output

    if (fileMap.isPresent()) {
      return fileMap.get();
    } else {
      // if we only had a file list as input, we make a fake doc-id-to-file-map using
      // the absolute path as the document ID.  This won't get output, so it doesn't matter
      // that this is a little hacky
      final Function<File, Symbol> fileNameAsSymbolFunction =
          compose(SymbolUtils.symbolizeFunction(), FileUtils.toAbsolutePathFunction());
      return Maps.uniqueIndex(fileList.get(), fileNameAsSymbolFunction);
    }
  }
373989
function(fields, data) {
    if (!_.isString(fields)) {
      return data;
    }

    // If a field is specified as `foo.bar` or `foo.bar.baz`,
    // Convert it to just `foo`
    var map = {};
    _.forEach(fields.split(','), function(field) {
      map[field.split('.')[0]] = 1;
    });

    var keys = _.keys(map);
    if (_.isArray(data)) {
      data = _.map(data, function(object) {
        return _.pick(object, keys);
      });
    } else if (_.isObject(data)) {
      data = _.pick(data, keys);
    }

    return data;
  }
560386
function (str, parserOptions) {
  parserOptions = parserOptions || {};
  // Do a naive test whether this is a string or an object
  var mapFn = parserOptions.map ? str.trim().charAt(0) === '[' ? underscore.map : underscore.mapObject : identity;
  var jsonParser = JSON.parse;
  return mapFn(jsonParser(str, parserOptions.reviver, parserOptions.filename), parserOptions.map);
}
26908
function preprocessSourceMap(sourceMap) {
      if (typeof sourceMap === 'string') {
        sourceMap = JSON.parse(sourceMap);
      }
      if (sourceMap && Array.isArray(sourceMap.sources)) {
        sourceMap.sources = sourceMap.sources.map(sourceUrl =>
          urlTools.resolveUrl(assetGraph.root, sourceUrl.replace(/^\//, ''))
        );
      }
      return sourceMap;
    }
161330
function (files) {
  return files.reduce(function (filesMap, file) {
    let fileName = path.parse(file).name;
    filesMap[fileName] = readFile(file, 'utf8');

    return filesMap;
  }, {});
}