MediaWiki REL1_31
JSTokenizer Class Reference

Public Member Functions

 __construct ()
 
 currentToken ()
 
 get ($chunksize=1000)
 
 getInput ($chunksize)
 
 init ($source, $filename='', $lineno=1)
 
 isDone ()
 
 match ($tt)
 
 mustMatch ($tt)
 
 newSyntaxError ($m)
 
 peek ()
 
 peekOnSameLine ()
 
 unget ()
 

Static Public Member Functions

static unicodeEscapeCallback ($m)
 

Public Attributes

 $filename
 
 $lineno
 
 $lookahead = 0
 
 $scanNewlines = false
 
 $scanOperand = true
 
 $tokenIndex = 0
 
 $tokens = array()
 

Private Attributes

 $assignOps = array('|', '^', '&', '<<', '>>', '>>>', '+', '-', '*', '/', '%')
 
 $cursor = 0
 
 $keywords
 
 $opRegExp
 
 $opTypeNames
 
 $source
 

Detailed Description

Definition at line 1707 of file jsminplus.php.

Constructor & Destructor Documentation

◆ __construct()

JSTokenizer::__construct ( )

Definition at line 1747 of file jsminplus.php.

Member Function Documentation

◆ currentToken()

JSTokenizer::currentToken ( )

Definition at line 1820 of file jsminplus.php.

References $tokenIndex.

Referenced by mustMatch().

◆ get()

◆ getInput()

JSTokenizer::getInput ( $chunksize)

Definition at line 1766 of file jsminplus.php.

Referenced by get().

◆ init()

JSTokenizer::init ( $source,
$filename = '',
$lineno = 1 )

Definition at line 1752 of file jsminplus.php.

References $filename, $lineno, $source, and array().

◆ isDone()

JSTokenizer::isDone ( )

Definition at line 1774 of file jsminplus.php.

References peek(), and TOKEN_END.

◆ match()

JSTokenizer::match ( $tt)

Definition at line 1779 of file jsminplus.php.

References unget().

Referenced by mustMatch().

◆ mustMatch()

JSTokenizer::mustMatch ( $tt)

Definition at line 1784 of file jsminplus.php.

References currentToken(), match(), and newSyntaxError().

◆ newSyntaxError()

JSTokenizer::newSyntaxError ( $m)

Definition at line 2113 of file jsminplus.php.

References line.

Referenced by get(), mustMatch(), and unget().

◆ peek()

JSTokenizer::peek ( )

Definition at line 1792 of file jsminplus.php.

References $lookahead, TOKEN_NEWLINE, and unget().

Referenced by isDone(), and peekOnSameLine().

◆ peekOnSameLine()

JSTokenizer::peekOnSameLine ( )

Definition at line 1811 of file jsminplus.php.

References peek().

◆ unget()

JSTokenizer::unget ( )

Definition at line 2105 of file jsminplus.php.

References newSyntaxError().

Referenced by match(), and peek().

◆ unicodeEscapeCallback()

static JSTokenizer::unicodeEscapeCallback ( $m)
static

Definition at line 2118 of file jsminplus.php.

Member Data Documentation

◆ $assignOps

JSTokenizer::$assignOps = array('|', '^', '&', '<<', '>>', '>>>', '+', '-', '*', '/', '%')
private

Definition at line 1744 of file jsminplus.php.

◆ $cursor

JSTokenizer::$cursor = 0
private

Definition at line 1709 of file jsminplus.php.

Referenced by get().

◆ $filename

JSTokenizer::$filename

Definition at line 1718 of file jsminplus.php.

Referenced by init().

◆ $keywords

JSTokenizer::$keywords
private
Initial value:
'break',
'case', 'catch', 'const', 'continue',
'debugger', 'default', 'delete', 'do',
'else', 'enum',
'false', 'finally', 'for', 'function',
'if', 'in', 'instanceof',
'new', 'null',
'return',
'switch',
'this', 'throw', 'true', 'try', 'typeof',
'var', 'void',
'while', 'with'
)
the array() calling protocol came about after MediaWiki 1.4rc1.

Definition at line 1721 of file jsminplus.php.

◆ $lineno

JSTokenizer::$lineno

Definition at line 1719 of file jsminplus.php.

Referenced by get(), and init().

◆ $lookahead

JSTokenizer::$lookahead = 0

Definition at line 1714 of file jsminplus.php.

Referenced by peek().

◆ $opRegExp

JSTokenizer::$opRegExp
private

Definition at line 1745 of file jsminplus.php.

◆ $opTypeNames

JSTokenizer::$opTypeNames
private
Initial value:
';', ',', '?', ':', '||', '&&', '|', '^',
'&', '===', '==', '=', '!==', '!=', '<<', '<=',
'<', '>>>', '>>', '>=', '>', '++', '--', '+',
'-', '*', '/', '%', '!', '~', '.', '[',
']', '{', '}', '(', ')', '@*/'
)

Definition at line 1736 of file jsminplus.php.

◆ $scanNewlines

JSTokenizer::$scanNewlines = false

Definition at line 1715 of file jsminplus.php.

◆ $scanOperand

JSTokenizer::$scanOperand = true

Definition at line 1716 of file jsminplus.php.

◆ $source

JSTokenizer::$source
private

Definition at line 1710 of file jsminplus.php.

Referenced by init().

◆ $tokenIndex

JSTokenizer::$tokenIndex = 0

Definition at line 1713 of file jsminplus.php.

Referenced by currentToken(), and get().

◆ $tokens

JSTokenizer::$tokens = array()

Definition at line 1712 of file jsminplus.php.


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