src/Support/LightnCandy.php
protected static function setupToken(&$context, $left = '{{', $right = '}}')
    {
        parent::setupToken($context, $left, $right);

        if (self::$compileHelpersOnly) {
            $helperTokens = array();
            foreach ($context['helpers'] as $helper => $value) {
                $helperTokens[] = $helper . '.*?';
            }
            $helperTokens = implode('|', $helperTokens);

            $context['tokens']['search'] = "/^(.*?)(\\s*)($left)(~?)([\\^#\\/!&>]?)(" . $helperTokens . ")(~?)($right)(\\s*)(.*)\$/s";
        }
    }
protected static function setupToken(&$context, $left = '{{', $right = '}}')
    {
        parent::setupToken($context, $left, $right);

        if (self::$compileHelpersOnly) {
            $helperTokens = array();
            foreach ($context['helpers'] as $helper => $value) {
                $helperTokens[] = $helper . '.*?';
            }
            $helperTokens = implode('|', $helperTokens);

            $context['tokens']['search'] = "/^(.*?)(\\s*)($left)(~?)([\\^#\\/!&>]?)(" . $helperTokens . ")(~?)($right)(\\s*)(.*)\$/s";
        }
    }
protected static function setupToken ( & $ context , $ left = '{{' , $ right = '}}' ) { parent :: setupToken ( $ context , $ left , $ right ) ; if ( self :: $ compileHelpersOnly ) { $ helperTokens = array ( ) ; foreach ( $ context [ 'helpers' ] as $ helper => $ value ) { $ helperTokens [ ] = $ helper . '.*?' ; } $ helperTokens = implode ( '|' , $ helperTokens ) ; $ context [ 'tokens' ] [ 'search' ] = "/^(.*?)(\\s*)($left)(~?)([\\^#\\/!&>]?)(" . $ helperTokens . ")(~?)($right)(\\s*)(.*)\$/s" ; } }
Setup token delimiter by default or provided string

@param array<string,array|string|integer> $context Current context
@param string $left left string of a token
@param string $right right string of a token
Setup token delimiter by default or provided string