MediaWiki  1.23.0
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)
 
 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 673 of file jsminplus.php.

Constructor & Destructor Documentation

◆ __construct()

JSParser::__construct (   $minifier = null)

Definition at line 726 of file jsminplus.php.

References $minifier.

Member Function Documentation

◆ Block()

JSParser::Block (   $x)
private

Definition at line 781 of file jsminplus.php.

References $n, OP_LEFT_CURLY, OP_RIGHT_CURLY, and Statements().

Referenced by Statement().

◆ Expression()

◆ FunctionDefinition()

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

◆ nest()

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

Definition at line 1574 of file jsminplus.php.

References $n.

Referenced by Statement().

◆ ParenExpression()

JSParser::ParenExpression (   $x)
private

Definition at line 1564 of file jsminplus.php.

References $n, Expression(), OP_LEFT_PAREN, and OP_RIGHT_PAREN.

Referenced by Statement().

◆ parse()

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

Definition at line 732 of file jsminplus.php.

References $f, $n, $s, and Script().

◆ reduce()

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

Definition at line 1586 of file jsminplus.php.

References $n, and $right.

Referenced by Expression().

◆ Script()

JSParser::Script (   $x)
private

Definition at line 745 of file jsminplus.php.

References $n, JS_MINIFIED, JS_SCRIPT, and Statements().

Referenced by FunctionDefinition(), and parse().

◆ Statement()

◆ Statements()

JSParser::Statements (   $x)
private

Definition at line 768 of file jsminplus.php.

References $n, JS_BLOCK, and OP_RIGHT_CURLY.

Referenced by Block(), Script(), and Statement().

◆ Variables()

JSParser::Variables (   $x)
private

Definition at line 1149 of file jsminplus.php.

References $n, Expression(), KEYWORD_CONST, OP_ASSIGN, OP_COMMA, and TOKEN_IDENTIFIER.

Referenced by Statement().

Member Data Documentation

◆ $minifier

JSParser::$minifier
private

Definition at line 676 of file jsminplus.php.

Referenced by __construct().

◆ $opArity

JSParser::$opArity
private
Initial value:
',' => -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 702 of file jsminplus.php.

◆ $opPrecedence

JSParser::$opPrecedence
private
Initial value:
';' => 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 678 of file jsminplus.php.

◆ $t

JSParser::$t
private

Definition at line 675 of file jsminplus.php.

Referenced by Expression().


The documentation for this class was generated from the following file:
JS_INDEX
const JS_INDEX
Definition: jsminplus.php:82
TOKEN_CONDCOMMENT_START
const TOKEN_CONDCOMMENT_START
Definition: jsminplus.php:73
TOKEN_CONDCOMMENT_END
const TOKEN_CONDCOMMENT_END
Definition: jsminplus.php:74
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
JS_ARRAY_INIT
const JS_ARRAY_INIT
Definition: jsminplus.php:83
JS_GROUP
const JS_GROUP
Definition: jsminplus.php:88
JS_OBJECT_INIT
const JS_OBJECT_INIT
Definition: jsminplus.php:84
JS_CALL
const JS_CALL
Definition: jsminplus.php:80
JS_NEW_WITH_ARGS
const JS_NEW_WITH_ARGS
Definition: jsminplus.php:81