summaryrefslogtreecommitdiff
path: root/inc/parser/lexer.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/parser/lexer.php')
-rw-r--r--inc/parser/lexer.php25
1 files changed, 15 insertions, 10 deletions
diff --git a/inc/parser/lexer.php b/inc/parser/lexer.php
index 2e84eca7c..b46a5f505 100644
--- a/inc/parser/lexer.php
+++ b/inc/parser/lexer.php
@@ -56,12 +56,12 @@ class Doku_LexerParallelRegex {
/**
* Adds a pattern with an optional label.
*
- * @param mixed $pattern Perl style regex. Must be UTF-8
+ * @param mixed $pattern Perl style regex. Must be UTF-8
* encoded. If its a string, the (, )
* lose their meaning unless they
* form part of a lookahead or
* lookbehind assertation.
- * @param string $label Label of regex to be returned
+ * @param bool|string $label Label of regex to be returned
* on a match. Label must be ASCII
* @access public
*/
@@ -151,7 +151,8 @@ class Doku_LexerParallelRegex {
* "or" operator. Caches the regex.
* Will automatically escape (, ) and / tokens.
*
- * @param array $patterns List of patterns in order.
+ * @internal array $_patterns List of patterns in order.
+ * @return null|string
* @access private
*/
function _getCompoundedRegex() {
@@ -297,6 +298,7 @@ class Doku_Lexer {
*/
function Doku_Lexer(&$parser, $start = "accept", $case = false) {
$this->_case = $case;
+ /** @var Doku_LexerParallelRegex[] _regexes */
$this->_regexes = array();
$this->_parser = &$parser;
$this->_mode = new Doku_LexerStateStack($start);
@@ -425,11 +427,13 @@ class Doku_Lexer {
* Sends the matched token and any leading unmatched
* text to the parser changing the lexer to a new
* mode if one is listed.
- * @param string $unmatched Unmatched leading portion.
- * @param string $matched Actual token match.
- * @param string $mode Mode after match. A boolean
+ * @param string $unmatched Unmatched leading portion.
+ * @param string $matched Actual token match.
+ * @param bool|string $mode Mode after match. A boolean
* false mode causes no change.
- * @param int $pos Current byte index location in raw doc
+ * @param int $initialPos
+ * @param int $matchPos
+ * Current byte index location in raw doc
* thats being parsed
* @return boolean False if there was any error
* from the parser.
@@ -498,11 +502,12 @@ class Doku_Lexer {
* Calls the parser method named after the current
* mode. Empty content will be ignored. The lexer
* has a parser handler for each mode in the lexer.
- * @param string $content Text parsed.
- * @param boolean $is_match Token is recognised rather
+ * @param string $content Text parsed.
+ * @param boolean $is_match Token is recognised rather
* than unparsed data.
- * @param int $pos Current byte index location in raw doc
+ * @param int $pos Current byte index location in raw doc
* thats being parsed
+ * @return bool
* @access private
*/
function _invokeParser($content, $is_match, $pos) {