Method: Parser::Base.parse_file_with_comments
- Defined in:
- lib/parser/base.rb
.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.
80 81 82 |
# File 'lib/parser/base.rb', line 80 def self.parse_file_with_comments(filename) parse_with_comments(File.read(filename), filename) end |