Method: Parser::Base.parse_file_with_comments
- Defined in:
- lib/parser/base.rb
permalink .parse_file_with_comments(filename) ⇒ Array
Parses Ruby source code by reading it from a file and returns the AST and
comments. If the source cannot be parsed, SyntaxError is raised and a
diagnostic is printed to stderr
.
77 78 79 |
# File 'lib/parser/base.rb', line 77 def self.parse_file_with_comments(filename) parse_with_comments(File.read(filename), filename) end |