Michael,
Yes, OMG IDL is text based, and here is an example (DOM CORE) from the
Web Consortium site:
http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/idl-definitions.html
For example, this piece of Node definition:
interface Node {
...
Node appendChild(in Node newChild)
raises(DOMException);
boolean hasChildNodes();
...
};
describes a well known appendChild method. what's nice in these
definitions is argument type information.
I would be happy to see something like this (just typed looking at
some other code):
Foo.prototype = {
/**
* method_1
* @param (String) bar
* @return (Number)
*/
method_1: function(bar) {
...
return 0;
}
}
presented like this:
interface Foo {
Number method_1 (in String bar);
}
etc.
Regarding the IDL itself, there is a page:
http://www.omg.org/gettingstarted/omg_idl.htm
and
http://www.omg.org/technology/documents/idl2x_spec_catalog.htm
I also described the way it goes in Haskell (w.r.t. inheritance, not
sure if JSDoc deals with that) here:
http://haskell.org/haskellwiki/Haskell_in_web_browser/Basics
However what W3C uses is some alteration of the "original" IDL, and it
looks like it varied slightly from level to level of DOM specs. At
least I had to adjust my utility when switched to Level2.
So I learned more "by example" than "by specification". And my utility
ignores some parts of W3C specs (like exception information) as well.
However the DOM example showed that this approach works in general.
And of course it is at the mercy of the developer to mention correct
argument types. In some cases those are just variable names.
Thanks.
On Mar 27, 10:19 pm, Michael Mathews <
micm...@gmail.com> wrote:
> Hi Dimitry,