MediaWiki  master
JSParser Class Reference

Public Member Functions

 __construct ($minifier=null)
 
 parse ($s, $f, $l)
 

Private Member Functions

 Block ($x)
 
 Expression ($x, $stop=false)
 
 FunctionDefinition ($x, $requireName, $functionForm)
 
 isKeyword ($tt)
 
 nest ($x, $node, $end=false)
 
 ParenExpression ($x)
 
 reduce (&$operators,&$operands)
 
 Script ($x)
 
 Statement ($x)
 
 Statements ($x)
 
 Variables ($x)
 

Private Attributes

 $minifier
 
 $opArity
 
 $opPrecedence
 
 $t
 

Detailed Description

Definition at line 674 of file jsminplus.php.

Constructor & Destructor Documentation

◆ __construct()

JSParser::__construct (   $minifier = null)

Definition at line 727 of file jsminplus.php.

Member Function Documentation

◆ Block()

JSParser::Block (   $x)
private

Definition at line 782 of file jsminplus.php.

References OP_LEFT_CURLY, and OP_RIGHT_CURLY.

◆ Expression()

◆ FunctionDefinition()

JSParser::FunctionDefinition (   $x,
  $requireName,
  $functionForm 
)
private

◆ isKeyword()

◆ nest()

JSParser::nest (   $x,
  $node,
  $end = false 
)
private

Definition at line 1581 of file jsminplus.php.

◆ ParenExpression()

JSParser::ParenExpression (   $x)
private

Definition at line 1571 of file jsminplus.php.

References OP_LEFT_PAREN, and OP_RIGHT_PAREN.

◆ parse()

JSParser::parse (   $s,
  $f,
  $l 
)

Definition at line 733 of file jsminplus.php.

References $f, and $s.

◆ reduce()

JSParser::reduce ( $operators,
$operands 
)
private

Definition at line 1593 of file jsminplus.php.

◆ Script()

JSParser::Script (   $x)
private

Definition at line 746 of file jsminplus.php.

References JS_MINIFIED, JS_SCRIPT, and null.

◆ Statement()

◆ Statements()

JSParser::Statements (   $x)
private

Definition at line 769 of file jsminplus.php.

References JS_BLOCK, and OP_RIGHT_CURLY.

◆ Variables()

JSParser::Variables (   $x)
private

Definition at line 1148 of file jsminplus.php.

References KEYWORD_CONST, OP_ASSIGN, OP_COMMA, and TOKEN_IDENTIFIER.

Member Data Documentation

◆ $minifier

JSParser::$minifier
private

Definition at line 677 of file jsminplus.php.

◆ $opArity

JSParser::$opArity
private
Initial value:
= array(
',' => -2,
'=' => 2,
'?' => 3,
'||' => 2,
'&&' => 2,
'|' => 2,
'^' => 2,
'&' => 2,
'==' => 2, '!=' => 2, '===' => 2, '!==' => 2,
'<' => 2, '<=' => 2, '>=' => 2, '>' => 2, 'in' => 2, 'instanceof' => 2,
'<<' => 2, '>>' => 2, '>>>' => 2,
'+' => 2, '-' => 2,
'*' => 2, '/' => 2, '%' => 2,
'delete' => 1, 'void' => 1, 'typeof' => 1,
'!' => 1, '~' => 1, 'U+' => 1, 'U-' => 1,
'++' => 1, '--' => 1,
'new' => 1,
'.' => 2,
JS_NEW_WITH_ARGS => 2, JS_INDEX => 2, JS_CALL => 2,
)

Definition at line 703 of file jsminplus.php.

◆ $opPrecedence

JSParser::$opPrecedence
private
Initial value:
= array(
';' => 0,
',' => 1,
'=' => 2, '?' => 2, ':' => 2,
'||' => 4,
'&&' => 5,
'|' => 6,
'^' => 7,
'&' => 8,
'==' => 9, '!=' => 9, '===' => 9, '!==' => 9,
'<' => 10, '<=' => 10, '>=' => 10, '>' => 10, 'in' => 10, 'instanceof' => 10,
'<<' => 11, '>>' => 11, '>>>' => 11,
'+' => 12, '-' => 12,
'*' => 13, '/' => 13, '%' => 13,
'delete' => 14, 'void' => 14, 'typeof' => 14,
'!' => 14, '~' => 14, 'U+' => 14, 'U-' => 14,
'++' => 15, '--' => 15,
'new' => 16,
'.' => 17,
JS_NEW_WITH_ARGS => 0, JS_INDEX => 0, JS_CALL => 0,
)

Definition at line 679 of file jsminplus.php.

◆ $t

JSParser::$t
private

Definition at line 676 of file jsminplus.php.


The documentation for this class was generated from the following file: