/sources/js_lex.php

Description
Functions
init__js_lex (line 24)

Standard code module initialisation function.

void init__js_lex ()
js_die_error (line 552)

Make a JS error (critically).

  • return: Always NULL (NULL: exit)
?boolean js_die_error (string $system, integer $pos, string $line, string $message, integer $i)
  • string $system: The system causing the error
  • integer $pos: The position
  • string $line: The line
  • string $message: The error
  • integer $i: The global position
js_lex (line 190)

Lex some Javascript code.

  • return: List of lexed tokens
list js_lex (string $text)
  • string $text: The code
js_log_warning (line 568)

Log a warning when lexing/parsing/checking.

void js_log_warning (string $system, string $warning, [integer $i = -1], [boolean $absolute = false])
  • string $system: The system causing the error
  • string $warning: The warning
  • integer $i: The global position
  • boolean $absolute: Whether the position is a string offset (as opposed to a token position)
js_pos_to_line_details (line 526)

Convert a position to a triplet of details about the line it is on.

  • return: The quartet of details (line offset, line number, the line, the absolute position)
list js_pos_to_line_details (integer $i, [boolean $absolute = false])
  • integer $i: The position
  • boolean $absolute: Whether the position is a string offset (as opposed to a token position)
lex__get_next_char (line 497)

Get the next character whilst lexing

  • return: Get triplet about the next character (whether end reached, new position, character)
list lex__get_next_char (integer $i)
  • integer $i: Get character at this position
lex__get_next_chars (line 512)

Get the next characters whilst lexing

  • return: Get triplet about the next character (whether end reached, new position, characters)
list lex__get_next_chars (integer $i, integer $num)
  • integer $i: Get character at this position
  • integer $num: How many to get
_strlen_sort (line 587)

Helper function for usort to sort a list by string length.

  • return: The comparison result
integer _strlen_sort (string $a, string $b)
  • string $a: The first string to compare
  • string $b: The second string to compare

Documentation generated on Sun, 02 Jan 2011 23:16:49 +0000 by phpDocumentor 1.4.3