protected function emitToken($token, $checkStream = true, $dry = false) { parent::emitToken($token, $checkStream, $dry); // XXX: The tests should really include the parse errors, but I'm lazy. switch ($token['type']) { case self::PARSEERROR: return; case self::CHARACTER: if ($this->characterTokens) { array_pop($this->outputLines); array_pop($this->outputCols); } $this->characterTokens[] = $token; default: $this->outputLines[] = $this->stream()->getCurrentLine(); $this->outputCols[] = $this->stream()->getColumnOffset(); } if ($token['type'] !== self::CHARACTER) { $this->characterTokens = array(); } }