Module: RubyCritic::Parser
- Defined in:
- lib/rubycritic/analysers/helpers/parser.rb
Class Method Summary collapse
Class Method Details
.parse(content) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/rubycritic/analysers/helpers/parser.rb', line 5 def self.parse(content) parser = parser_class require 'rubycritic/analysers/helpers/ast_node' parser.parse(content) || AST::EmptyNode.new rescue ::Parser::SyntaxError AST::EmptyNode.new end |