Skip to content
This repository was archived by the owner on Dec 31, 2017. It is now read-only.
This repository was archived by the owner on Dec 31, 2017. It is now read-only.

The inline "doc hint" for return value type is not taken into account. #24

@pruzand

Description

@pruzand

Hi,

It seems the current parser does not take into account the "documentation hint" that may be specified for the return value.

For ex:

    bar : function(){
        return "asdf";
    },
    getBarFoo:function(){
        // summary:
        //      adf askdfj asdf asdf asdf 
        var a = this.bar();
        return a;   // String
    },

which gives:

  <method name="bar" scope="prototype" type="function" from="dojox/geo/openlayers/Map">
    <parameters/>
    <return-types>
      <return-type type="string"/>
    </return-types>
  </method>
  <method name="getBarFoo" scope="prototype" type="function" from="dojox/geo/openlayers/Map">
    <parameters/>
    <return-types>
      <return-type type="undefined"/>
    </return-types>
    <summary>adf askdfj asdf asdf asdf</summary>
  </method>

Also, if the keywod "returns" is used, it adds an extra any element:
bar : function(){
// summary:
// adf asdf alsfqwe
// returns:
// something interesting.
return "asdf";
},

gives:

  <method name="bar" scope="prototype" type="function" from="dojox/geo/openlayers/Map">
    <parameters/>
    <return-types>
      <return-type type="any"/>
      <return-type type="string"/>
    </return-types>
    <return-description>something interesting.</return-description>
    <summary>adf asdf alsfqwe</summary>
  </method>

cc @cjolif

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions