module SyntaxTree::Translation
def self.to_parser(node, buffer)
the whitequark/parser gem. We don't explicitly list it as a dependency
This method translates the given node into the representation defined by
def self.to_parser(node, buffer) require "parser" require_relative "translation/parser" node.accept(Parser.new(buffer)) end
def self.to_rubocop_ast(node, buffer)
the rubocop/rubocop-ast gem. We don't explicitly list it as a dependency
This method translates the given node into the representation defined by
def self.to_rubocop_ast(node, buffer) require "rubocop/ast" require_relative "translation/parser" require_relative "translation/rubocop_ast" node.accept(RuboCopAST.new(buffer)) end