TextPosition0 HTMLDocumentParser::textPosition() const
{
    const SegmentedString& currentString = m_input.current();
    WTF::ZeroBasedNumber line = currentString.currentLine();
    WTF::ZeroBasedNumber column = currentString.currentColumn();
    ASSERT(m_tokenizer->lineNumber() == line.zeroBasedInt());

    return TextPosition0(line, column);
}
Пример #2
0
void SegmentedString::setCurrentPosition(WTF::ZeroBasedNumber line, WTF::ZeroBasedNumber columnAftreProlog, int prologLength)
{
    m_currentLine = line.zeroBasedInt();
    m_numberOfCharactersConsumedPriorToCurrentLine = numberOfCharactersConsumed() + prologLength - columnAftreProlog.zeroBasedInt();
}