You are here

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

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. 6 advagg_js_compress/jsminplus.inc \JSParser::parse()
  5. 7 advagg_js_compress/jsminplus.inc \JSParser::parse()

File

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