Added example of e4x. Changed @variable tag to @var.

This commit is contained in:
Michael Mathews 2010-07-18 19:52:12 +01:00
parent 39a7ec5f19
commit cc001da8a5
5 changed files with 23 additions and 6 deletions

View File

@ -30,3 +30,10 @@ uninterpretted, atomic string in the namepath.
@name chat."#channel".open
*/
chat['#channel'].open = true;
Support For E4X
---
[new] As a benefit of using Rhino's own JavaScript parser, JSDoc has inherited
the ability to parse any source code that Rhino can parse, including the latest
syntax patterns like E4X (ECMAScript for XML).

View File

@ -14,7 +14,7 @@
/*synonym => canonical*/
'description': 'desc',
'function': 'method',
'variable': 'property',
'var': 'property',
'field': 'property',
'return': 'returns',
'member': 'memberof',

10
test/samples/etc_e4x.js Normal file
View File

@ -0,0 +1,10 @@
/** @var */
var exampleDocs = <>
<example>/** @function */ function foo(){}</example>
<example>/** @var */ var x = 1;</example>
</>;
/** @function */
function show() {
alert(example.length()); // shows 2
}

View File

@ -16,13 +16,13 @@ this.globalprop = {
})(mylib);
var go = {
/** @variable */
/** @var */
gp: true
};
/** @variable */
/** @var */
var foo,
/** @variable */
/** @var */
bar;

View File

@ -69,7 +69,7 @@
});
});
describe('A doclet with a named @variable tag and a description', function() {
describe('A doclet with a named @var tag and a description', function() {
it('should have an `isa` property set to "property"', function() {
var doclet = doclets[5].toObject();
expect(doclet).to(have_property, 'isa');
@ -127,7 +127,7 @@
@property {string} zip
*/
/** @variable zub - The description here. */
/** @var zub - The description here. */
/** @property {Function} */
onShow = callbacks[0];