Fetch the end character offset of the value.
Fetch the start character column of the value.
Fetch the end character column of the value.
Create a code units cache for the given encoding.
Create a code units cache for the given encoding from the source.
Prism
deals with offsets in bytes, while the parser gem deals with offsets in characters. We need to handle this conversion in order to build the parser gem AST.
If the bytesize of the source is the same as the length, then we can just use the offset directly. Otherwise, we build an array where the index is the byte offset and the value is the character offset.
Visit a pattern within a pattern match. This is used to bypass the parenthesis node that can be used to wrap patterns.
foo(*bar) ^^^^
def foo((bar, *baz)); end ^^^^
def foo(); bar(); end ^
A list of statements.