mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Added example of e4x. Changed @variable tag to @var.
This commit is contained in:
parent
39a7ec5f19
commit
cc001da8a5
@ -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).
|
||||
@ -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
10
test/samples/etc_e4x.js
Normal 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
|
||||
}
|
||||
@ -16,13 +16,13 @@ this.globalprop = {
|
||||
})(mylib);
|
||||
|
||||
var go = {
|
||||
/** @variable */
|
||||
/** @var */
|
||||
gp: true
|
||||
};
|
||||
|
||||
/** @variable */
|
||||
/** @var */
|
||||
var foo,
|
||||
/** @variable */
|
||||
/** @var */
|
||||
bar;
|
||||
|
||||
|
||||
|
||||
@ -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];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user