Skip to content
instance method

Prism::Translation::Parser::Compiler#srange_semicolon

srange_semicolon(start_offset, end_offset)

Constructs a new source range by finding a semicolon between the given start offset and end offset. If the semicolon is not found, it returns nil. Importantly it does not search past newlines or comments.

Note that end_offset is allowed to be nil, in which case this will search until the end of the string.