protected static function doElse(&$context, $vars) {
        if ($context['level'] == 0) {
            $context['error'][] = '{{else}} only valid in if, unless, each, and #section context';
        }

        if (isset($vars[1][0])) {
            $token = $context['currentToken'];
            $context['currentToken'][Token::POS_RSPACE] = "{{#{$vars[1][0]} " . preg_replace('/^\\s*else\\s+' . $vars[1][0] . '\\s*/', '', $token[Token::POS_INNERTAG]) . '}}' . $context['currentToken'][Token::POS_RSPACE];
            array_unshift($context['elselvl'][0], $vars[1][0]);
            $context['elsechain'] = true;
        }

        return ++$context['usedFeature']['else'];
    }