Loading lib/jsduck/js_parser.rb +13 −1 Original line number Diff line number Diff line Loading @@ -106,6 +106,16 @@ module JsDuck } end # <ext-emptyfn> := "Ext" "." "emptyFn" def ext_emptyfn match(:ident, ".", "emptyFn") return { :type => :function, :name => "", :params => [], } end # <function-parameters> := "(" [ <ident> [ "," <ident> ]* ] ")" def function_parameters match("(") Loading Loading @@ -157,12 +167,14 @@ module JsDuck return chain end # <expression> := <function> | <ext-extend> | <ext-base-css-prefix> | <literal> # <expression> := <function> | <ext-extend> | <ext-emptyfn> | <ext-base-css-prefix> | <literal> def expression if look(:function) function elsif ext_look(:ns, ".", "extend") ext_extend elsif ext_look(:ns, ".", "emptyFn") ext_emptyfn elsif ext_look(:ns, ".", "baseCSSPrefix", "+", :string) ext_base_css_prefix else Loading spec/aggregator_methods_and_events_spec.rb +7 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,13 @@ describe JsDuck::Aggregator do it_should_behave_like "method documentation" end describe "Ext.emptyFn in object-literal" do before do @doc = parse("/** Some function */ foo: Ext.emptyFn")[0] end it_should_behave_like "method documentation" end describe "anonymous function" do before do @doc = parse("/** Some function */ function() {}")[0] Loading Loading
lib/jsduck/js_parser.rb +13 −1 Original line number Diff line number Diff line Loading @@ -106,6 +106,16 @@ module JsDuck } end # <ext-emptyfn> := "Ext" "." "emptyFn" def ext_emptyfn match(:ident, ".", "emptyFn") return { :type => :function, :name => "", :params => [], } end # <function-parameters> := "(" [ <ident> [ "," <ident> ]* ] ")" def function_parameters match("(") Loading Loading @@ -157,12 +167,14 @@ module JsDuck return chain end # <expression> := <function> | <ext-extend> | <ext-base-css-prefix> | <literal> # <expression> := <function> | <ext-extend> | <ext-emptyfn> | <ext-base-css-prefix> | <literal> def expression if look(:function) function elsif ext_look(:ns, ".", "extend") ext_extend elsif ext_look(:ns, ".", "emptyFn") ext_emptyfn elsif ext_look(:ns, ".", "baseCSSPrefix", "+", :string) ext_base_css_prefix else Loading
spec/aggregator_methods_and_events_spec.rb +7 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,13 @@ describe JsDuck::Aggregator do it_should_behave_like "method documentation" end describe "Ext.emptyFn in object-literal" do before do @doc = parse("/** Some function */ foo: Ext.emptyFn")[0] end it_should_behave_like "method documentation" end describe "anonymous function" do before do @doc = parse("/** Some function */ function() {}")[0] Loading