Class: Ikra::AST::Builder

Inherits:
Object show all
Defined in:
lib/ast/builder.rb

Overview

Builds an Ikra (Ruby) AST from a Parser RubyGem AST

Direct Known Subclasses

HostSectionBuilder

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_parser_ast(node) ⇒ Object



8
9
10
# File 'lib/ast/builder.rb', line 8

def self.from_parser_ast(node)
    return self.new.from_parser_ast(node)
end

Instance Method Details

#from_parser_ast(node) ⇒ Object



12
13
14
# File 'lib/ast/builder.rb', line 12

def from_parser_ast(node)
    return RootNode.new(single_child: translate_node(node))
end