From f7e58b05e9b5979fb428ccebb861fdbb4388e5dd Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 30 May 2012 00:26:25 +0200 Subject: [PATCH] update Ox.doc; add (some) inline comments in Ox.test --- source/Ox/js/JavaScript.js | 78 ++++++++++++++++++++++++++++---------- 1 file changed, 57 insertions(+), 21 deletions(-) diff --git a/source/Ox/js/JavaScript.js b/source/Ox/js/JavaScript.js index eaa56e35..6ac7fd89 100644 --- a/source/Ox/js/JavaScript.js +++ b/source/Ox/js/JavaScript.js @@ -20,6 +20,8 @@ Ox.doc Generates documentation for annotated JavaScript file File name line Line number name Name of the item + order <[s]> Order of signature, arguments, properties + Present if the type of the item is "function" properties <[o]|u> Properties (array of doc objects) Present if the type of the item is "event", "function" @@ -30,10 +32,10 @@ Ox.doc Generates documentation for annotated JavaScript line Line type Type (see Ox.tokenize for a list of types) value Value - summary One-line summary - usage <[o]> Usage (array of doc objects) + returns <[o]> Return values (array of doc objects) Present if the type of the item is "function". + summary One-line summary tests <[o]> Tests (array of test objects) expected Expected result statement Statement @@ -66,9 +68,9 @@ Ox.doc Generates documentation for annotated JavaScript 'Magic constant' > Ox.test.doc[1].description 'Bar per baz is a good indicator of an item\'s foo-ness.' - > Ox.test.doc[1].usage[0].types + > Ox.test.doc[1].signature[0].types ['number'] - > Ox.test.doc[1].usage[0].summary + > Ox.test.doc[1].signature[0].summary 'Bar per baz, or NaN' > Ox.test.doc[1].tests[1] {expected: 'NaN', statement: 'My.foo({})'} @@ -78,9 +80,9 @@ Ox.doc = (function() { item: /^(.+?) <(.+?)> (.+?)$/, multiline: /^\/\*\@.*?\n([\w\W]+)\n.*?\@?\*\/$/, script: /\n(\s*