Parses a quoted string, which is either a "normal string" or a """long string""".
@ignore
string $quote The type of quote to use (either ' or "):
protected function parseQuotedString($quote) {
$result = null;
// First character should be ' or "
$this
->verifyCharacter($this
->read(), $quote);
// Check for long-string, which starts and ends with three double quotes
$c2 = $this
->read();
$c3 = $this
->read();
if ($c2 == $quote && $c3 == $quote) {
// Long string
$result = $this
->parseLongString($quote);
}
else {
// Normal string
$this
->unread($c3);
$this
->unread($c2);
$result = $this
->parseString($quote);
}
// Unescape any escape sequences
return $this
->unescapeString($result);
}