| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 53 | public static function matchToken($string, $cursor) |
||
| 54 | { |
||
| 55 | $string = substr($string, $cursor); |
||
| 56 | foreach (Tokens::$terminalTokens as $regex => $token) { |
||
| 57 | if (preg_match($regex, $string, $matches)) { |
||
| 58 | return [ |
||
| 59 | 'match' => $matches[1], |
||
| 60 | 'token' => $token, |
||
| 61 | ]; |
||
| 62 | } |
||
| 63 | } |
||
| 64 | |||
| 65 | return false; |
||
| 66 | } |
||
| 67 | } |
||
| 68 |