class RuboCop::AST::ProcessedSource
def parse(source, ruby_version, parser_engine)
def parse(source, ruby_version, parser_engine) buffer_name = @path || STRING_SOURCE_NAME @buffer = Parser::Source::Buffer.new(buffer_name, 1) begin @buffer.source = source rescue EncodingError, Parser::UnknownEncodingInMagicComment => e @parser_error = e @ast = nil @comments = [] @tokens = [] return end @ast, @comments, @tokens = tokenize(create_parser(ruby_version, parser_engine)) end