Same name in other branches
- 5.0.x advagg_js_minify/jsminplus.inc \JSParser::Variables()
- 6.0.x advagg_js_minify/jsminplus.inc \JSParser::Variables()
- 7.x-1.x advagg_js_compress/jsminplus.inc \JSParser::Variables()
- 8.x-2.x advagg_js_minify/jsminplus.inc \JSParser::Variables()
- 8.x-3.x advagg_js_minify/jsminplus.inc \JSParser::Variables()
- 8.x-4.x advagg_js_minify/jsminplus.inc \JSParser::Variables()
1 call to JSParser::Variables()
- JSParser::Statement dans advagg_js_compress/
jsminplus.inc
Fichier
-
advagg_js_compress/
jsminplus.inc, line 1278
Classe
Code
private function Variables($x) {
$n = new JSNode($this->t);
do {
$this->t
->mustMatch(TOKEN_IDENTIFIER);
$n2 = new JSNode($this->t);
$n2->name = $n2->value;
if ($this->t
->match(OP_ASSIGN)) {
if ($this->t
->currentToken()->assignOp) {
throw $this->t
->newSyntaxError('Invalid variable initialization');
}
$n2->initializer = $this->Expression($x, OP_COMMA);
}
$n2->readOnly = $n->type == KEYWORD_CONST;
$n->addNode($n2);
array_push($x->varDecls, $n2);
} while ($this->t
->match(OP_COMMA));
return $n;
}