Class: SyntaxTree::Index::ParserBackend::ConstantNameVisitor
Instance Method Summary
collapse
valid_visit_methods, #visit, #visit_all, #visit_child_nodes, visit_method, visit_methods
Instance Method Details
#visit_const_path_ref(node) ⇒ Object
458
459
460
|
# File 'lib/syntax_tree/index.rb', line 458
def visit_const_path_ref(node)
visit(node.parent) << node.constant.value.to_sym
end
|
#visit_const_ref(node) ⇒ Object
454
455
456
|
# File 'lib/syntax_tree/index.rb', line 454
def visit_const_ref(node)
[node.constant.value.to_sym]
end
|
#visit_var_ref(node) ⇒ Object
462
463
464
|
# File 'lib/syntax_tree/index.rb', line 462
def visit_var_ref(node)
[node.value.value.to_sym]
end
|