Runs common compiler logic shared by tofu and jbcsrc backends.
174059
private ServerCompilationPrimitives compileForServerRendering() {
    ParseResult result = parse();
    throwIfErrorsPresent();

    SoyFileSetNode soyTree = result.fileSet();
    TemplateRegistry registry = result.registry();
    // Clear the SoyDoc strings because they use unnecessary memory, unless we have a cache, in
    // which case it is pointless.
    if (cache == null) {
      new ClearSoyDocStringsVisitor().exec(soyTree);
    }

    throwIfErrorsPresent();
    return new ServerCompilationPrimitives(registry, soyTree);
  }
1228518
function it_accepts_to_be_compiled($compiler, $leaf)
    {
        $compiler->compile('SELECT ')->shouldBeCalled();
        $compiler->compile($leaf)->shouldBeCalled();
        $compiler->compile(';')->shouldBeCalled();

        $this->accept($compiler);
    }
1106792
void compile() {
    TypeInfo factoryType = innerClasses.registerInnerClass(FACTORY_CLASS, FACTORY_ACCESS);
    SoyClassWriter cw =
        SoyClassWriter.builder(factoryType)
            .implementing(FACTORY_TYPE)
            .setAccess(FACTORY_ACCESS)
            .sourceFileName(templateNode.getSourceLocation().getFileName())
            .build();
    innerClasses.registerAsInnerClass(cw, factoryType);

    generateStaticInitializer(cw);
    defineDefaultConstructor(cw, factoryType);
    generateCreateMethod(cw, factoryType);
    cw.visitEnd();
    innerClasses.add(cw.toClassData());
  }
1275183
function mixin(compiler) {
  compiler._comment = compiler.comment;
  compiler.map = new SourceMap();
  compiler.position = { line: 1, column: 1 };
  compiler.files = {};
  for (var k in exports) compiler[k] = exports[k];
}
151199
private SoyTofu doCompileToTofu(
      ServerCompilationPrimitives primitives, Map<String, Supplier<Object>> pluginInstances) {
    return new BaseTofu(
        scopedData.enterable(),
        primitives.soyTree,
        pluginInstances);
  }
134328
function SchemaCompiler(client, builder) {
  this.builder = builder;
  this._commonBuilder = this.builder;
  this.client = client;
  this.schema = builder._schema;
  this.formatter = client.formatter(builder);
  this.sequence = [];
}
901608
function transpile() {
  return new Promise((resolve, reject) => {
    const result = spawn.sync(
      skyPagesConfigUtil.spaPath('node_modules', '.bin', 'ngc'),
      [
        '--project',
        skyPagesConfigUtil.spaPathTemp('tsconfig.json')
      ],
      { stdio: 'inherit' }
    );

    // Catch ngc errors.
    if (result.err) {
      reject(result.err);
      return;
    }

    // Catch non-zero status codes.
    if (result.status !== 0) {
      reject(new Error(`Angular compiler (ngc) exited with status code ${result.status}.`));
      return;
    }

    resolve();
  });
}
135049
function Compiler(locales, formats, pluralFn) {
  this.locales = locales;
  this.formats = formats;
  this.pluralFn = pluralFn;
}
723760
function compiler(dom, directive, data, ans){
    var fns = [];
    // autoRendering nodes parsing -> auto-nodes
    ans = ans || data && getAutoNodes(dom, data);
    if(data){
      var j, jj, cspec, n, target, nodes, itersel, node, inner;
      // for each auto-nodes
      while(ans.length > 0){
        cspec = ans[0].cspec;
        n = ans[0].n;
        ans.splice(0, 1);
        if(cspec.t === 'str'){
          // if the target is a value
          target = gettarget(n, cspec, false);
          setsig(target, fns.length);
          fns[fns.length] = wrapquote(target.quotefn, dataselectfn(cspec.prop));
        }else{
          // if the target is a loop
          itersel = dataselectfn(cspec.sel);
          target = gettarget(n, cspec, true);
          nodes = target.nodes;
          for(j = 0, jj = nodes.length; j < jj; j++){
            node = nodes[j];
            inner = compiler(node, false, data, ans);
            fns[fns.length] = wrapquote(target.quotefn, loopfn(cspec.sel, itersel, inner));
            target.nodes = [node];
            setsig(target, fns.length - 1);
          }
        }
      }
    }
    // read directives
    var target, dsel;
    for(var sel in directive){
      if(directive.hasOwnProperty(sel)){
        dsel = directive[sel];
        if(typeof(dsel) === 'function' || typeof(dsel) === 'string'){
          // set the value for the node/attr
          target = gettarget(dom, sel, false);
          setsig(target, fns.length);
          fns[fns.length] = wrapquote(target.quotefn, dataselectfn(dsel));
        }else{
          // loop on node
          loopgen(dom, sel, dsel, fns);
        }
      }
    }
        // convert node to a string
        var h = outerHTML(dom), pfns = [];
    // IE adds an unremovable "selected, value" attribute
    // hard replace while waiting for a better solution
        h = h.replace(/<([^>]+)\s(value\=""|selected)\s?([^>]*)>/ig, "<$1 $3>");

        // remove attribute prefix
        h = h.split(attPfx).join('');

    // slice the html string at "Sig"
    var parts = h.split( Sig ), p;
    // for each slice add the return string of
    for(var i = 1; i < parts.length; i++){
      p = parts[i];
      // part is of the form "fn-number:..." as placed there by setsig.
      pfns[i] = fns[ parseInt(p, 10) ];
      parts[i] = p.substring( p.indexOf(':') + 1 );
    }
    return concatenator(parts, pfns);
  }
1225294
function bundleCompilers(compilers, opts) {
    if (!opts) { opts = {}; }

    var transforms = [].concat(opts.pipeTo || []);
    var s = stream.PassThrough({ objectMode: !!opts.objectMode });

    Rx.Node.writeToStream(
        compilers.flatMap(function (res) {
            var bundle = res.compiler.bundle(R.omit(["objectMode", "pipeTo"], opts));

            return Rx.Node.fromStream(
                R.reduce(function (b, t) {
                    return b.pipe(t(res.name, res.compiler));
                }, bundle, transforms)
            );
        }),
        s
    );

    return s;
}
875121
function watchCompiler(compiler, options={}){
  let watching = false
  log('Watch Building')
  const startWatchTime = Date.now()
  const watchConfig = { // watch options:
    //aggregateTimeout: 300, // wait so long for more changes
    //poll: true // use polling instead of native watchers
    // pass a number to set the polling interval
  }

  options.onRebuild = options.onRebuild || function(){}

  return new Promise(function(res,rej){  
    //webpack watch functionality
    compiler.watch(watchConfig, function(err,stats){
      if(err)return rej(err)

      if(watching){
        log('Rebuilt '+getServerTime())
        options.onRebuild(stats)
      }else{
        watching = true
        log('Watching '+(Date.now()-startWatchTime)/1000+' seconds')
        res( this )
      }
    });
  })
}
620345
private void executeGlobalPreprocessing(List<JoinableResourceBundle> bundlesToBuild, boolean processBundleFlag,
			StopWatch stopWatch) {

		stopProcessIfNeeded();

		if (resourceTypePreprocessor != null) {
			if (stopWatch != null) {
				stopWatch.start("Global preprocessing");
			}
			GlobalPreprocessingContext ctx = new GlobalPreprocessingContext(config, resourceHandler, processBundleFlag);
			resourceTypePreprocessor.processBundles(ctx, bundles);

			// Update the list of bundle to rebuild if new bundles have been
			// detected as dirty in the global preprocessing phase
			List<JoinableResourceBundle> currentBundles = getBundlesToRebuild();
			for (JoinableResourceBundle b : currentBundles) {
				if (!bundlesToBuild.contains(b)) {
					bundlesToBuild.add(b);
				}
			}
			if (stopWatch != null) {
				stopWatch.stop();
			}
		}
	}
1321215
public static function preProcessing(Compiler $compiler, array $params, $prepend, $append, $type)
    {
        $params     = $compiler->getCompiledParams($params);
        $func       = $params['__funcname'];
        $pluginType = $params['__functype'];
        $params     = $params['*'];

        if ($pluginType & Core::CUSTOM_PLUGIN) {
            $customPlugins = $compiler->getCore()->getCustomPlugins();
            $callback      = $customPlugins[$func]['callback'];
            if (is_array($callback)) {
                if (is_object($callback[0])) {
                    $callback = '$this->customPlugins[\'' . $func . '\'][0]->' . $callback[1] . '(';
                } else {
                    $callback = '' . $callback[0] . '::' . $callback[1] . '(';
                }
            } else {
                $callback = $callback . '(';
            }
        } else {
            $callback = 'smarty_block_' . $func . '(';
        }

        $paramsOut = '';
        foreach ($params as $i => $p) {
            $paramsOut .= var_export($i, true) . ' => ' . $p . ',';
        }

        $curBlock                      = &$compiler->getCurrentBlock();
        $curBlock['params']['postOut'] = Compiler::PHP_OPEN . ' $_block_content = ob_get_clean(); $_block_repeat=false; echo ' . $callback . '$_tag_stack[count($_tag_stack)-1], $_block_content, $this, $_block_repeat); } array_pop($_tag_stack);' . Compiler::PHP_CLOSE;

        return Compiler::PHP_OPEN . $prepend . ' if (!isset($_tag_stack)){ $_tag_stack = array(); } $_tag_stack[] = array(' . $paramsOut . '); $_block_repeat=true; ' . $callback . '$_tag_stack[count($_tag_stack)-1], null, $this, $_block_repeat); while ($_block_repeat) { ob_start();' . Compiler::PHP_CLOSE;
    }
798494
void hoistNoCompileFiles() {
    boolean staleInputs = false;
    maybeDoThreadedParsing();
    // Iterate a copy because hoisting modifies what we're iterating over.
    for (CompilerInput input : ImmutableList.copyOf(moduleGraph.getAllInputs())) {
      if (input.getHasNoCompileAnnotation()) {
        input.getModule().remove(input);
        staleInputs = true;
      }
    }

    if (staleInputs) {
      repartitionInputs();
    }
  }
984081
def compileSass(sassPath):
    '''
    

    '''
    cssPath = os.path.splitext(sassPath)[0] + ".css"
    # subprocess.call(["sass", sassPath, cssPath])
    print("Compiling Sass")

    process = subprocess.Popen(["sass", sassPath, cssPath])
    process.wait()
417416
def coffee_compile(source):
    """"""
    with open(COFFEE_COMPILER, 'rb') as coffeescript_js:
        return evaljs(
            (coffeescript_js.read().decode('utf-8'),
             'CoffeeScript.compile(dukpy.coffeecode)'),
            coffeecode=source
        )
569265
def _plugin_targets(self, compiler):
    """"""
    if compiler == 'javac':
      plugin_cls = JavacPlugin
    elif compiler == 'scalac':
      plugin_cls = ScalacPlugin
    else:
      raise TaskError('Unknown JVM compiler: {}'.format(compiler))
    plugin_tgts = self.context.targets(predicate=lambda t: isinstance(t, plugin_cls))
    return {t.plugin: t.closure() for t in plugin_tgts}