Sha256: 7dff3b4c293999c2f6b460786c54af9ed028cd944c276a5fe7f1e6cef031ec8f

Contents?: true

Size: 277 Bytes

Versions: 1

Compression:

Stored size: 277 Bytes

Contents

relative 'syntax_finder'

# Cound up all of regexps.

class RegexpFinder < SyntaxFinder
  def look node
    if node.type == :regular_expression_node
      # pp [[nloc(node), nlines(node).lines]] unless @@opt[:quiet]
      inc :regexp
      inc node.unescaped
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
syntax_finder-0.1.0 samples/all_regexp_finder.rb