protected function parseBlocks()
    {
        $this->blocks = array();
        $currentBlock = '';
        // Do we need insideSingleLineBlock? It doesn't seem to be used anywhere
        // Original Ruby version of KSS had it but I'm not seeing a purpose to it
        $insideSingleLineBlock = false;
        $insideMultiLineBlock = false;

        foreach ($this->file as $line) {
            $isSingleLineComment = self::isSingleLineComment($line);
            $isStartMultiLineComment = self::isStartMultiLineComment($line);
            $isEndMultiLineComment = self::isEndMultiLineComment($line);

            if ($isSingleLineComment) {
                $parsed = self::parseSingleLineComment($line);

                if ($insideSingleLineBlock) {
                    $currentBlock .= "\n";
                } else {
                    $insideSingleLineBlock = true;
                }

                $currentBlock .= $parsed;
            }

            if ($isStartMultiLineComment || $insideMultiLineBlock) {
                $parsed = self::parseMultiLineComment($line);

                if ($insideMultiLineBlock) {
                    $currentBlock .= "\n";
                } else {
                    $insideMultiLineBlock = true;
                }

                $currentBlock .= $parsed;
            }

            if ($isEndMultiLineComment) {
                $insideMultiLineBlock = false;
            }

            // If we're not in a comment then end the current block and go to
            // the next one
            if (!$isSingleLineComment && !$insideMultiLineBlock) {
                if (!empty($currentBlock)) {
                    $this->blocks[] = $this->normalize($currentBlock);
                    $insideSingleLineBlock = false;
                    $currentBlock = '';
                }
            }
        }

        $this->parsed = true;
        return $this->blocks;
    }