Class: JsDuck::Js::RKellyAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/jsduck/js/rkelly_adapter.rb

Overview

Converts RKelly AST into Esprima AST.

Instance Method Summary collapse

Instance Method Details

#adapt(node) ⇒ Object



8
9
10
11
12
# File 'lib/jsduck/js/rkelly_adapter.rb', line 8

def adapt(node)
  ast = adapt_root(node)
  ast["comments"] = node.comments.map {|c| adapt_comment(c) }
  ast
end