module Prism::Serialize

def self.load(input, serialized)

Deserialize the AST represented by the given string into a parse result.
def self.load(input, serialized)
  input = input.dup
  source = Source.new(input)
  loader = Loader.new(source, serialized)
  result = loader.load_result
  input.force_encoding(loader.encoding)
  result
end

def self.load_tokens(source, serialized)

result.
Deserialize the tokens represented by the given string into a parse
def self.load_tokens(source, serialized)
  Loader.new(source, serialized).load_tokens_result
end