Commit 5cc9589b authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Fix strange syntax error with Ruby 1.8.7.

Wrote the SourceFileParser#parse in different way.
parent 4705e26b
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -29,10 +29,11 @@ module JsDuck
    def parse(contents, filename="", options={})
      @doc_ast.filename = filename

      parse_js_or_css(contents, filename, options)
        .map {|docset| expand(docset) }
        .flatten
        .map {|docset| merge(docset) }
      parse_js_or_css(contents, filename, options).map do |docset|
        expand(docset)
      end.flatten.map do |docset|
        merge(docset)
      end
    end

    private