2018-04-26 11:31:37 +02:00
|
|
|
require_relative "../helper"
|
2019-02-12 21:41:42 +01:00
|
|
|
|
|
|
|
module Parfait
|
|
|
|
class ParfaitRewriter < AST::Processor
|
|
|
|
include AST::Sexp
|
|
|
|
|
|
|
|
def rewrite(input)
|
2019-03-07 09:47:48 +01:00
|
|
|
ast = Parser::CurrentRuby.parse( input )
|
2019-02-12 21:41:42 +01:00
|
|
|
new_ast = process(ast)
|
|
|
|
new_ast.to_s
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|