@@ -73,6 +73,11 @@ discard block |
||
| 73 | 73 | return $shortcodes; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | + /** |
|
| 77 | + * @param string|null $bbCode |
|
| 78 | + * @param null|string $content |
|
| 79 | + * @param string $text |
|
| 80 | + */ |
|
| 76 | 81 | private function getObject($name, $parameters, $bbCode, $offset, $content, $text) |
| 77 | 82 | { |
| 78 | 83 | return new ParsedShortcode(new Shortcode($name, $parameters, $content, $bbCode), $text, $offset); |
@@ -254,11 +259,18 @@ discard block |
||
| 254 | 259 | return $backtrack; |
| 255 | 260 | } |
| 256 | 261 | |
| 262 | + /** |
|
| 263 | + * @param integer $type |
|
| 264 | + */ |
|
| 257 | 265 | private function lookahead($type) |
| 258 | 266 | { |
| 259 | 267 | return $this->position < $this->tokensCount && $this->tokens[$this->position][0] === $type; |
| 260 | 268 | } |
| 261 | 269 | |
| 270 | + /** |
|
| 271 | + * @param null|integer $type |
|
| 272 | + * @param boolean $ws |
|
| 273 | + */ |
|
| 262 | 274 | private function match($type, $ws) |
| 263 | 275 | { |
| 264 | 276 | if($this->position >= $this->tokensCount) { |
@@ -280,6 +292,9 @@ discard block |
||
| 280 | 292 | |
| 281 | 293 | /* --- LEXER ----------------------------------------------------------- */ |
| 282 | 294 | |
| 295 | + /** |
|
| 296 | + * @param string $text |
|
| 297 | + */ |
|
| 283 | 298 | private function tokenize($text) |
| 284 | 299 | { |
| 285 | 300 | $count = preg_match_all($this->lexerRegex, $text, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE); |