MediaWiki REL1_35
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.

References $minifier.

Member Function Documentation

◆ Block()

JSParser::Block (   $x)
private

Definition at line 782 of file jsminplus.php.

References OP_LEFT_CURLY, OP_RIGHT_CURLY, and Statements().

Referenced by Statement().

◆ 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.

References Statement().

Referenced by Statement().

◆ ParenExpression()

JSParser::ParenExpression (   $x)
private

Definition at line 1571 of file jsminplus.php.

References Expression(), OP_LEFT_PAREN, and OP_RIGHT_PAREN.

Referenced by Statement().

◆ parse()

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

Definition at line 733 of file jsminplus.php.

References $s, and Script().

◆ reduce()

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

Definition at line 1593 of file jsminplus.php.

Referenced by Expression().

◆ Script()

JSParser::Script (   $x)
private

Definition at line 746 of file jsminplus.php.

References JS_MINIFIED, JS_SCRIPT, and Statements().

Referenced by FunctionDefinition(), and parse().

◆ Statement()

◆ Statements()

JSParser::Statements (   $x)
private

Definition at line 769 of file jsminplus.php.

References JS_BLOCK, OP_RIGHT_CURLY, and Statement().

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

◆ Variables()

JSParser::Variables (   $x)
private

Definition at line 1148 of file jsminplus.php.

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

Referenced by Statement().

Member Data Documentation

◆ $minifier

JSParser::$minifier
private

Definition at line 677 of file jsminplus.php.

Referenced by __construct().

◆ $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,
)
const TOKEN_CONDCOMMENT_START
Definition jsminplus.php:74
const JS_GROUP
Definition jsminplus.php:89
const JS_NEW_WITH_ARGS
Definition jsminplus.php:82
const JS_OBJECT_INIT
Definition jsminplus.php:85
const JS_CALL
Definition jsminplus.php:81
const TOKEN_CONDCOMMENT_END
Definition jsminplus.php:75
const JS_INDEX
Definition jsminplus.php:83
const JS_ARRAY_INIT
Definition jsminplus.php:84

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.

Referenced by Expression().


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