You are here

private function JSParser::Script in Advanced CSS/JS Aggregation 6

Same name and namespace in other branches
  1. 8.4 advagg_js_minify/jsminplus.inc \JSParser::Script()
  2. 8.2 advagg_js_minify/jsminplus.inc \JSParser::Script()
  3. 8.3 advagg_js_minify/jsminplus.inc \JSParser::Script()
  4. 7.2 advagg_js_compress/jsminplus.inc \JSParser::Script()
  5. 7 advagg_js_compress/jsminplus.inc \JSParser::Script()
2 calls to JSParser::Script()
JSParser::FunctionDefinition in advagg_js_compress/jsminplus.inc
JSParser::parse in advagg_js_compress/jsminplus.inc

File

advagg_js_compress/jsminplus.inc, line 869

Class

JSParser

Code

private function Script($x) {
  $n = $this
    ->Statements($x);
  $n->type = JS_SCRIPT;
  $n->funDecls = $x->funDecls;
  $n->varDecls = $x->varDecls;

  // minify by scope
  if ($this->minifier) {
    $n->value = $this->minifier
      ->parseTree($n);

    // clear tree from node to save memory
    $n->treeNodes = null;
    $n->funDecls = null;
    $n->varDecls = null;
    $n->type = JS_MINIFIED;
  }
  return $n;
}