%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/geotechnics/api/vendor/doctrine/lexer/tests/Doctrine/Common/Lexer/
Upload File :
Create Path :
Current File : /var/www/html/geotechnics/api/vendor/doctrine/lexer/tests/Doctrine/Common/Lexer/ConcreteLexer.php

<?php

namespace Doctrine\Tests\Common\Lexer;

use Doctrine\Common\Lexer\AbstractLexer;

class ConcreteLexer extends AbstractLexer
{
    const INT = 'int';

    protected function getCatchablePatterns()
    {
        return array(
            '=|<|>',
            '[a-z]+',
            '\d+',
        );
    }

    protected function getNonCatchablePatterns()
    {
        return array(
            '\s+',
            '(.)',
        );
    }

    protected function getType(&$value)
    {
        if (is_numeric($value)) {
            $value = (int)$value;

            return 'int';
        }
        if (in_array($value, array('=', '<', '>'))) {
            return 'operator';
        }
        if (is_string($value)) {
            return 'string';
        }

        return;
    }

    protected function getModifiers()
    {
        return parent::getModifiers().'u';
    }
}

Zerion Mini Shell 1.0