Returns a list of token parsers this extensions provides.

@return array An array of token parsers
193219
public function getTokenParsers()
    {
        return [
            new PageTokenParser,
            new PartialTokenParser,
            new ContentTokenParser,
            new PutTokenParser,
            new PlaceholderTokenParser,
            new DefaultTokenParser,
            new FrameworkTokenParser,
            new ComponentTokenParser,
            new FlashTokenParser,
            new ScriptsTokenParser,
            new StylesTokenParser,
        ];
    }
1161034
public function listLanguages(): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/languages', $this->getOwner(),
            $this->getRepo()));
    }
364473
protected function lexArgumentsDefinition(): array
    {
        $parseFunction = function (): InputValueDefinitionNode {
            return $this->lexInputValueDefinition();
        };

        return $this->peek(TokenKindEnum::PAREN_L)
            ? $this->many(
                TokenKindEnum::PAREN_L,
                $parseFunction,
                TokenKindEnum::PAREN_R
            )
            : [];
    }
605408
public function getInvocations(): array
    {
        if (empty($this->invocations)) {
            $this->locateInvocations($this->getTokens());
        }

        return $this->invocations;
    }
375017
public function getTokens()
    {
        fseek($this->stream, 0);
        $this->buffer = new StreamBuffer($this->stream, static::BUFFER_SIZE, $this->minLength);
        $this->buffer->read();

        /** @var Token $last */
        $last = null;

        while (!$this->buffer->isEof()) {
            foreach ($this->state->match($this->buffer) as $token) {
                if ($token[0] == Token::T_BOM) {
                    $this->changeEncoding($token[1]);
                }

                $this->state = $this->state->getNextState($token[0]);

                // merge tokens together to condense T_CONTENT tokens
                if ($token[0] == Token::T_CONTENT) {
                    if (!is_null($last)) {
                        $last[1] .= $token[1];
                        $last[3] = strlen($last[1]);
                    } else {
                        $last = $token;
                    }
                } else {
                    if (!is_null($last)) {
                        yield $last;
                        $last = null;
                    }
                    yield $token;
                }

                $this->buffer->move($token[3]);
                $this->buffer->read();
            }
        }

        if (!is_null($last)) {
            yield $last;
        }

        fclose($this->stream);
    }
619478
public static function parser()
	{
		if ( ! empty(static::$_parser))
		{
			return static::$_parser;
		}

		$options = array(
			// TODO: set 'logger' with Monolog instance.
			'cache'   => \Config::get('parser.View_Mustache.environment.cache_dir', APPPATH.'cache'.DS.'mustache'.DS),
			'charset' => \Config::get('parser.View_Mustache.environment.charset', 'UTF-8'),
		);

		if ($partials = \Config::get('parser.View_Mustache.environment.partials', array())) {
			$options['partials'] = $partials;
		}

		if ($helpers = \Config::get('parser.View_Mustache.environment.helpers', array())) {
			$options['helpers'] = $helpers;
		}

		static::$_parser = new Mustache_Engine($options);

		return static::$_parser;
	}
64748
protected function getTagAttributes()
    {
        $stream = $this->parser->getStream();
        $attributes = [];
        $lineno = $stream->getCurrent()->getLine();
        $name = $stream->getSourceContext()->getName();

        if (!$stream->test(Token::BLOCK_END_TYPE)) {
            do {
                $this->validateAttributeType($stream, 'name', ['NAME', 'STRING']);
                $attr = $stream->getCurrent()->getValue();
                $stream->next();
                $this->validateAttributeOperator($stream, $attr);
                $stream->next();
                $this->validateAttributeType($stream, 'value', ['NAME', 'STRING', 'NUMBER']);

                $attributes[$attr] = $this->parser->getExpressionParser()->parseExpression()->getAttribute('value');
            } while (!$stream->test(Token::BLOCK_END_TYPE));
        }

        return $this->formatAttributes($attributes, $lineno, $name);
    }
164931
public function getSupportedLanguages(): array
    {
        if (null === $this->supportedLanguages) {
            $this->supportedLanguages = [];
            $files = new \DirectoryIterator($this->getDictionaryFolder());
            foreach ($files as $file) {
                if ($file->getExtension() === 'aff') {
                    $this->supportedLanguages[] = $file->getBasename('.aff');
                }
            }
            sort($this->supportedLanguages);
        }

        return $this->supportedLanguages;
    }
247351
private function getControlStructureTokens()
    {
        static $tokens = null;

        if (null === $tokens) {
            $tokens = [
                T_IF,
                T_ELSEIF,
                T_FOR,
                T_FOREACH,
                T_WHILE,
                T_DO,
                T_CATCH,
                T_SWITCH,
                T_DECLARE,
            ];
        }

        return $tokens;
    }
486036
public function getTokens()
    {
        $conditions = '';
        $params = array();
        $records = Oauth_TokenRecord::model()->findAll($conditions, $params);
        return Oauth_TokenModel::populateModels($records);
    }
220676
public function getTokenMappings()
    {
        // Create Mappings Array:
        
        $mappings = [];
        
        // Define Mappings Array:
        
        if (is_array($this->owner->config()->token_mappings)) {
            
            foreach ($this->owner->config()->token_mappings as $name => $spec) {
                
                if (!is_array($spec)) {
                    $spec = ['property' => $spec];
                }
                
                $mappings[$name] = $spec;
                
            }
            
        }
        
        // Answer Mappings Array:
        
        return $mappings;
    }
807579
public function getTags()
    {
        $tags = array();
        foreach ($this->getTokenParsers()->getParsers() as $parser) {
            if ($parser instanceof Twig_TokenParserInterface) {
                $tags[$parser->getTag()] = $parser;
            }
        }

        return $tags;
    }
1315408
protected function _parseTokens()
    {
        for ($index = 0; $index < $this->_length; ++$index) {
            $token = $this->_password[$index];
            $tokenAsciiValue = ord($token);

            if ($tokenAsciiValue >= 48 && $tokenAsciiValue <= 57) {
                $tokenClass = self::CLASS_NUMBER;
            } elseif ($tokenAsciiValue >= 65 && $tokenAsciiValue <= 90) {
                $tokenClass = self::CLASS_UPPER;
            } elseif ($tokenAsciiValue >= 97 && $tokenAsciiValue <= 122) {
                $tokenClass = self::CLASS_LOWER;
            } else {
                $tokenClass = self::CLASS_SYMBOL;
            }

            // Track the number and index of tokens belonging to class
            ++$this->_tokenCounts[$tokenClass];
            $this->_tokenIndices[$tokenClass][] = $index;

            // Members of UPPER and LOWER also belong to LETTER
            if ($tokenClass == self::CLASS_UPPER || $tokenClass == self::CLASS_LOWER) {
                ++$this->_tokenCounts[self::CLASS_LETTER];
                $this->_tokenIndices[self::CLASS_LETTER][] = $index;
            }

            // Track the number of times this token appears
            if (array_key_exists($token, $this->_tokens)) {
                $this->_tokens[$token] += 1;
            } else {
                $this->_tokens[$token] = 1;
            }
        }
    }
1026689
public function getLanguages()
    {
        if (!is_array($this->languages)) {
            LanguageDetector::detect($this, $this->getAcceptLanguage());
        }

        return $this->languages;
    }
1352183
private function parseRule()
    {
        $newToken = $this->tokens[$this->index];
        $set = false;
        if ($this->index > 0) {
            $prevToken = &$this->tokens[$this->index-1];
            $prevTokenType = &$prevToken[0];
            $prevTokenText = &$prevToken[1];
            $concat = false;

            $map = array(
                'DOT' => 'CLASS_SELECTOR',
                'HASH' => 'ID_SELECTOR',
                'COLON' => 'PSEUDO_SELECTOR',
                'DOUBLE_COLON' => 'PSEUDO_SELECTOR'
            );
            if (isset($map[$prevTokenType])) {
                // mark the prev token for deletion and concat into one.
                $newToken[0] = $map[$prevTokenType];
                $prevTokenType = self::$deleteToken;
                $newToken[1] = $prevTokenText . $newToken[1];
                $set = true;
            }
        }
        if (!$set) {
            // must be an element
            $newToken[0] = 'ELEMENT_SELECTOR';
        }
        $this->tokens[$this->index] = $newToken;
    }
1066812
protected function getLanguageHelpers()
    {
        return [
            'lang' => function ($args, $named) {
                return Lang::get($args[0], $named);
            },
            'choice' => function ($args, $named) {
                return Lang::choice($args[0], $args[1], $named);
            }
        ];
    }
258222
private function loadSubTokenPositions(): array
    {
        return TokenHelper::findNextAll(
            $this->file->getBaseFile(),
            $this->sortedTokens,
            $this->stackPos,
            $this->token['scope_closer']
        );
    }