'use strict'; /*@ Ox.doc Generates documentation for annotated JavaScript (source) -> <[o]> Array of doc objects (file, callback) -> undefined (files, callback) -> undefined source JavaScript source code file JavaScript file files <[s]> Array of javascript files callback Callback function doc <[o]> Array of doc objects arguments <[o]|u> Arguments (array of doc objects) Present if the type of the item is "function". description Multi-line description with optional markup See Ox.sanitizeHTML for details events <[o]|u> Events (array of doc objects) Present if the item fires any events file File name line Line number name Name of the item properties <[o]|u> Properties (array of doc objects) Present if the type of the item is "event", "function" or "object". section Section in the file source <[o]> Source code (array of tokens) column Column 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) Present if the type of the item is "function". tests <[o]> Tests (array of test objects) type Type of the item > Ox.test.doc[0].name 'My.FOO' > Ox.test.doc[0].types ['number'] > Ox.test.doc[0].summary '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 ['number'] > Ox.test.doc[1].usage[0].summary 'Bar per baz, or NaN' @*/ Ox.doc = (function() { var re = { item: /^(.+?) <(.+?)> (.+?)$/, multiline: /^\/\*\@.*?\n([\w\W]+)\n.*?\@?\*\/$/, script: /\n(\s*