|
|
|
@ -349,7 +349,7 @@ class Specs
|
|
|
|
|
has_bugs
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def self.parse(file_name : String) : Specs | Nil
|
|
|
|
|
def self.parse(file_name : String, options : Hash(String, String) | Nil = nil) : Specs | Nil
|
|
|
|
|
begin
|
|
|
|
|
content = File.read(file_name)
|
|
|
|
|
content = content.rchop
|
|
|
|
@ -360,6 +360,12 @@ class Specs
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
specs = Specs.new
|
|
|
|
|
unless options.nil?
|
|
|
|
|
options.each do |opt, val|
|
|
|
|
|
specs.assignments[opt] = StringContainer.new val
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
tree = Pegasus::Generated.process(content)
|
|
|
|
|
specs.parse_tree tree
|
|
|
|
|
|
|
|
|
|