class Prism::Serialize::Loader

def load_tokens_result

def load_tokens_result
  tokens = load_tokens
  encoding = load_encoding
  load_start_line
  load_line_offsets
  comments, magic_comments, data_loc, errors, warnings = load_metadata
  tokens.each { |token,| token.value.force_encoding(encoding) }
  raise "Expected to consume all bytes while deserializing" unless @io.eof?
  LexResult.new(tokens, comments, magic_comments, data_loc, errors, warnings, @source)
end