You are here

public function JSParser::parse in Advanced CSS/JS Aggregation 6

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

File

advagg_js_compress/jsminplus.inc, line 856

Class

JSParser

Code

public function parse($s, $f, $l) {

  // initialize tokenizer
  $this->t
    ->init($s, $f, $l);
  $x = new JSCompilerContext(false);
  $n = $this
    ->Script($x);
  if (!$this->t
    ->isDone()) {
    throw $this->t
      ->newSyntaxError('Syntax error');
  }
  return $n;
}