Loading lib/jsduck/js/rkelly_parser.rb→lib/jsduck/js/parser.rb +4 −4 Original line number Diff line number Diff line Loading @@ -5,10 +5,10 @@ require 'rkelly' module JsDuck module Js # An alternative JsDuck::Js::Parser implementation that uses # RKelly instead of Esprima. class RKellyParser RKELLY = RKelly::Parser.new # A JavaScript parser implementation that uses RKelly and adapts # its output to be the same as the old Esprima parser used to # produce. class Parser ADAPTER = Js::RKellyAdapter.new def initialize(input, options={}) Loading lib/jsduck/parser.rb +2 −2 Original line number Diff line number Diff line require 'jsduck/js/rkelly_parser' require 'jsduck/js/parser' require 'jsduck/js/ast' require 'jsduck/css/parser' require 'jsduck/doc/parser' Loading Loading @@ -41,7 +41,7 @@ module JsDuck if filename =~ /\.s?css$/ docs = Css::Parser.new(contents, options).parse else docs = Js::RKellyParser.new(contents, options).parse docs = Js::Parser.new(contents, options).parse docs = Js::Ast.new(docs).detect_all! end end Loading spec/js_rkelly_parser_spec.rb→spec/js_parser_spec.rb +3 −3 Original line number Diff line number Diff line require "jsduck/js/rkelly_parser" require "jsduck/js/parser" describe JsDuck::Js::RKellyParser do describe JsDuck::Js::Parser do def parse(input) JsDuck::Js::RKellyParser.new(input).parse JsDuck::Js::Parser.new(input).parse end describe "parsing two comments" do Loading Loading
lib/jsduck/js/rkelly_parser.rb→lib/jsduck/js/parser.rb +4 −4 Original line number Diff line number Diff line Loading @@ -5,10 +5,10 @@ require 'rkelly' module JsDuck module Js # An alternative JsDuck::Js::Parser implementation that uses # RKelly instead of Esprima. class RKellyParser RKELLY = RKelly::Parser.new # A JavaScript parser implementation that uses RKelly and adapts # its output to be the same as the old Esprima parser used to # produce. class Parser ADAPTER = Js::RKellyAdapter.new def initialize(input, options={}) Loading
lib/jsduck/parser.rb +2 −2 Original line number Diff line number Diff line require 'jsduck/js/rkelly_parser' require 'jsduck/js/parser' require 'jsduck/js/ast' require 'jsduck/css/parser' require 'jsduck/doc/parser' Loading Loading @@ -41,7 +41,7 @@ module JsDuck if filename =~ /\.s?css$/ docs = Css::Parser.new(contents, options).parse else docs = Js::RKellyParser.new(contents, options).parse docs = Js::Parser.new(contents, options).parse docs = Js::Ast.new(docs).detect_all! end end Loading
spec/js_rkelly_parser_spec.rb→spec/js_parser_spec.rb +3 −3 Original line number Diff line number Diff line require "jsduck/js/rkelly_parser" require "jsduck/js/parser" describe JsDuck::Js::RKellyParser do describe JsDuck::Js::Parser do def parse(input) JsDuck::Js::RKellyParser.new(input).parse JsDuck::Js::Parser.new(input).parse end describe "parsing two comments" do Loading