class Fast::Parent

Sometimes you want to check some children but get the parent element, for such cases, parent can be useful. Example: You're searching for `int` usages in your code. But you don't want to check the integer itself, but who is using it: `^^(int _)` will give you the variable being assigned or the expression being used.

Public Instance Methods

match?(node) click to toggle source
# File lib/fast.rb, line 624
def match?(node)
  node.each_child_node.any?(&method(:match_node))
end
Also aliased as: match_node
match_node(node)
Alias for: match?
to_s() click to toggle source
# File lib/fast.rb, line 628
def to_s
  "^#{token}"
end