module RubyCritic::Parser

Public Class Methods

parse(content) click to toggle source
# File lib/rubycritic/analysers/helpers/parser.rb, line 8
def self.parse(content)
  ::Parser::CurrentRuby.parse(content) || AST::EmptyNode.new
rescue ::Parser::SyntaxError
  AST::EmptyNode.new
end