class SyntaxTree::Index::ParserBackend
This backend creates the index using the Syntax Tree parser and a visitor. It is not as fast as using the instruction sequences directly, but is supported on all runtimes.
Public Instance Methods
index(source)
click to toggle source
# File lib/syntax_tree/index.rb, line 659 def index(source) SyntaxTree.parse(source).accept(IndexVisitor.new) end
index_file(filepath)
click to toggle source
# File lib/syntax_tree/index.rb, line 663 def index_file(filepath) index(SyntaxTree.read(filepath)) end