SassParser::setIndentChar PHP Method

setIndentChar() public method

The first character of the first indented line determines the character. If this is a space the number of spaces determines the indentSpaces; this is always 1 if the indent character is a tab. Only used for .sass files.
public setIndentChar ( )
    public function setIndentChar()
    {
        foreach ($this->source as $l => $source) {
            if (!empty($source) && in_array($source[0], $this->indentChars)) {
                $this->indentChar = $source[0];
                for ($i = 0, $len = strlen($source); $i < $len && $source[$i] == $this->indentChar; $i++) {
                }
                if ($i < $len && in_array($source[$i], $this->indentChars)) {
                    $this->line = ++$l;
                    $this->source = $source;
                    if ($this->debug) {
                        throw new SassException('Mixed indentation not allowed', $this);
                    }
                }
                $this->indentSpaces = $this->indentChar == ' ' ? $i : 1;
                return;
            }
        }
        // foreach
        $this->indentChar = ' ';
        $this->indentSpaces = 2;
    }