You are here

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

Same name and namespace in other branches
  1. 8.2 advagg_js_minify/jsminplus.inc \JSParser::parse()
  2. 8.3 advagg_js_minify/jsminplus.inc \JSParser::parse()
  3. 6 advagg_js_compress/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_minify/jsminplus.inc, line 872
JSMinPlus version 1.4

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;
}