private string ParseStringConstant(string code, Position position, List<Index> indices)
{
string result = "";
indices.Add(new Index(position.LineNumber, position.CharNumber));
position.MoveIndex();
while ((code.Length > position.CurrentIndex) && (code[position.CurrentIndex] != '"'))
{
result += code[position.CurrentIndex];
indices.Add(new Index(position.LineNumber, position.CharNumber));
position.MoveIndex();
}
if (code.Length > position.CurrentIndex) // record last (")
{
indices.Add(new Index(position.LineNumber, position.CharNumber));
position.MoveIndex();
}
return result;
}