Module: Leftovers::Parser

Defined in:
lib/leftovers/parser.rb

Constant Summary collapse

PARSER =
parser

Class Method Summary collapse

Class Method Details

.parse_with_comments(string, file = '(string)', line = 1) ⇒ Object

mostly copied from github.com/whitequark/parser/blob/master/lib/parser/base.rb but with our parser



11
12
13
14
# File 'lib/leftovers/parser.rb', line 11

def parse_with_comments(string, file = '(string)', line = 1)
  PARSER.reset
  PARSER.parse_with_comments(new_source_buffer(string, file, line))
end