syntax_tree-translator 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SyntaxTree
4
+ module Translator
5
+ class RuboCop < Parser
6
+ private
7
+
8
+ def s(type, children = [], opts = {})
9
+ ::RuboCop::AST::Builder::NODE_MAP.fetch(type, ::RuboCop::AST::Node).new(type, children, opts)
10
+ end
11
+ end
12
+ end
13
+ end