private void ScanMultiLineString(LineProgress p)
{
p.StartNaturalText();
while (!p.EndOfLine)
{
if (p.Char() == '"' && p.NextChar() == '"') // "" is allowed within multiline string.
{
p.Advance(2);
}
else if (p.Char() == '"') // end of multi-line string
{
p.EndNaturalText();
p.Advance();
p.State = State.Default;
return;
}
else
{
p.Advance();
}
}
// End of line. Emit as human readable, but remain in MultiLineString state.
p.EndNaturalText();
Debug.Assert(p.State == State.MultiLineString);
}