class SyntaxTree::Parser::MultiByteString
the index of the character within the string.
build up an array of indices, such that array will be equal to
that there are characters in the string that are multi-byte, so we will
Represents a line in the source. If this class is being used, it means
def [](byteindex)
there's a BOM at the beginning of the file, which is the reason we need
Technically it's possible for the column index to be a negative value if
def [](byteindex) indices[[byteindex, 0].max] end
def initialize(start, line)
def initialize(start, line) @start = start @indices = [] line .each_char .with_index(start) do |char, index| char.bytesize.times { @indices << index } end end