code
stringlengths
1
2.08M
language
stringclasses
1 value
// Copyright 2008 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2007 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2009 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2008 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2008 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2008 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2010 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2008 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2007 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2007 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2007 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2010 Google Inc. All Rights Reserved // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
JavaScript
// Copyright 2006 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2008 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2007 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2006 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2007 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
// Copyright 2010 Google Inc. All Rights Reserved. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable l...
JavaScript
// Copyright 2008 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requ...
JavaScript
/*jslint onevar: false, plusplus: false */ /* JS Beautifier --------------- Written by Einar Lielmanis, <einar@jsbeautifier.org> http://jsbeautifier.org/ Originally converted to javascript by Vital, <vital76@gmail.com> You are free to use this in any way you want, in case you find this useful or worki...
JavaScript
/** Called automatically by JsDoc Toolkit. */ function publish(symbolSet) { publish.conf = { // trailing slash expected for dirs ext: ".html", outDir: JSDOC.opt.d || SYS.pwd+"../out/jsdoc/", templatesDir: JSDOC.opt.t || SYS.pwd+"../templates/jsdoc/", symbolsDir: "symbols/", srcDir: ...
JavaScript
load("app/frame/Dumper.js"); function symbolize(opt) { symbols = null; JSDOC.JsDoc(opt); symbols = JSDOC.JsDoc.symbolSet; } var testCases = [ function() { symbolize({a:true, p:true, _: [SYS.pwd+"test/overview.js"]}); //print(Dumper.dump(symbols)); is('symbols.getSymbolByName("My Cool Library").na...
JavaScript
/** * @fileOverview * A bootstrap script that creates some basic required objects * for loading other scripts. * @author Michael Mathews, micmath@gmail.com * @version $Id: run.js 756 2009-01-07 21:32:58Z micmath $ */ /** * @namespace Keep track of any messages from the running script. */ LOG = { w...
JavaScript
JSDOC.PluginManager.registerPlugin( "JSDOC.tagParamConfig", { onDocCommentTags: function(comment) { var currentParam = null; var tags = comment.tags; for (var i = 0, l = tags.length; i < l; i++) { if (tags[i].title == "param") { if (tags[i].name.indexOf(".") == -1) { currentPa...
JavaScript
JSDOC.PluginManager.registerPlugin( "JSDOC.tagSynonyms", { onDocCommentSrc: function(comment) { comment.src = comment.src.replace(/@methodOf\b/i, "@function\n@memberOf"); comment.src = comment.src.replace(/@fieldOf\b/i, "@field\n@memberOf"); }, onDocCommentTags: function(comment) { for (var...
JavaScript
JSDOC.PluginManager.registerPlugin( "JSDOC.publishSrcHilite", { onPublishSrc: function(src) { if (src.path in JsHilite.cache) { return; // already generated src code } else JsHilite.cache[src.path] = true; try { var sourceCode = IO.readFile(src.path); } catch(e) { print...
JavaScript
JSDOC.PluginManager.registerPlugin( "JSDOC.frameworkPrototype", { onPrototypeClassCreate: function(classCreator) { var desc = ""; if (classCreator.comment) { desc = classCreator.comment; } var insert = desc+"/** @name "+classCreator.name+"\n@constructor\n@scope "+classCreator.name+".prototyp...
JavaScript
JSDOC.PluginManager.registerPlugin( "JSDOC.commentSrcJson", { onDocCommentSrc: function(comment) { var json; if (/^\s*@json\b/.test(comment)) { comment.src = new String(comment.src).replace("@json", ""); eval("json = "+comment.src); var tagged = ""; for (var i in json) { var t...
JavaScript
JSDOC.PluginManager.registerPlugin( "JSDOC.functionCall", { onFunctionCall: function(functionCall) { if (functionCall.name == "dojo.define" && functionCall.arg1) { functionCall.doc = "/** @lends "+eval(functionCall.arg1)+".prototype */"; } } } );
JavaScript
JSDOC.PluginManager.registerPlugin( "JSDOC.symbolLink", { onSymbolLink: function(link) { // modify link.linkPath (the href part of the link) // or link.linkText (the text displayed) // or link.linkInner (the #name part of the link) } } );
JavaScript
/**@constructor*/ function Foo() { /** @public @static @field */ var bar = function(x) { } }
JavaScript
/** @class @inherits Bar#zop as #my_zop */ function Foo() { /** this is a zip. */ this.zip = function() {} /** from Bar */ this.my_zop = new Bar().zop; } /** @class @borrows Foo#zip as this.my_zip */ function Bar() { /** this is a zop. */ this.zop = function() {} /** from Foo */ th...
JavaScript
/** @constructor */ function Foo() { var bar = 1; bar = 2; // redefining a private this.baz = 1; baz = 2; // global /** a private */ var blap = { /** in here */ tada: 1 } }
JavaScript
// testing circular borrows /** @class @borrows Bar#zop as this.my_zop */ function Foo() { /** this is a zip. */ this.zip = function() {} this.my_zop = new Bar().zop; } /** @class @borrows Foo#zip as this.my_zip */ function Bar() { /** this is a zop. */ this.zop = function() {} this...
JavaScript
/** @namespace */ myProject = myProject || {}; /** @namespace */ myProject.myModule = (function () { /** describe myPrivateVar here */ var myPrivateVar = ""; var myPrivateMethod = function () { } /** @scope myProject.myModule */ return { myPublicMethod: function () { } }; })();
JavaScript
function example(/**Circle*/a, b) { /** a global defined in function */ var number = a; var hideNumber = function(){ } setNumber = function(){ } alert('You have chosen: ' + b); } function initPage() { var supported = document.createElement && document.getElementsByTagName; if (!supported) r...
JavaScript
/** the options */ opt = Opt.get( arguments, { d: "directory", c: "conf", "D[]": "define" } ); /** configuration */ opt.conf = { /** keep */ keep: true, /** base */ base: getBase(this, {p: properties}) }
JavaScript
/** an anonymous constructor executed inline */ a = new function() { /** a.b*/ this.b = 1; /** a.f */ this.f = function() { /** a.c */ this.c = 2; } } /** named function executed inline */ bar1 = function Zoola1() { /** property of global */ this.g = 1; }(); /** na...
JavaScript
String.prototype.reverse = function() { } String.prototype.reverse.utf8 = function() { } Function.count = function() { } /** @memberOf Function */ Function.count.reset = function() { } /** @memberOf Function */ count.getValue = function() { } /** @memberOf Function.prototype */ getSig = function(...
JavaScript
startOver = function(){ }
JavaScript
/** * A test constructor. * @constructor * @ignore */ function Ignored() { /** a method */ this.bar = function() { } }
JavaScript
/** * @param {Page[]} pages * @param {number} [id] Specifies the id, if applicable. * @param {String} [title = This is untitled.] Specifies the title. */ function Document(pages, id, title){ }
JavaScript
/** * @constructor * @param person The person. * @param {string} person.name The person's name. * @config {integer} age The person's age. * @config [id=1] Optional id number to use. * @param connection */ function Contact(person, connection) { } /** * @constructor * @param persons * @config {...
JavaScript
var Person = makeClass( /** @scope Person */ { /** This is just another way to define a constructor. @constructs @param {string} name The name of the person. */ initialize: function(name) { this.name = name; }, ...
JavaScript
/** @constructor */ function Layout(p) { this.init = function(p) { } this.getId = function() { } /** @type Page */ this.orientation = "landscape"; } /** @constructor @augments Layout */ function Page() { this.reset = function(b) { } } /** @extends Page @constructor */ function T...
JavaScript
/** Get the entire flavor. @name flavor^3 @function @returns {Object} The entire flavor hash. */ /** Get a named flavor. @name flavor^2 @function @param {String} name The name of the flavor to get. @returns {String} The value of that flavor. */ /** Set the flavor. @param {String} name The na...
JavaScript
/** @constructor */ pack = function() { this.init = function(){} function config(){} } pack.build = function(task) {}; /** @memberOf pack */ pack.install = function() {} /** @memberOf pack */ pack.install.overwrite = function() {} /** @memberOf pack */ clean = function() {} /** @memberOf pack-...
JavaScript
// /**#=+ // * { // * 'D': 'Date.prototype', // * '$N': 'Number' // * } // */ // var D = Date.prototype, // $N = Number; // // D.locale = function(){ // }; // // /** // @return {string} The cardinal number string. // */ // $N.nth = function(n){ // }; // // LOAD.file = function(){ // } // ...
JavaScript
/** @constructor */ function LibraryItem() { this.reserve = function() { } } /** @constructor */ function Junkmail() { this.annoy = function() { } } /** @inherits Junkmail.prototype.annoy as pester @augments ThreeColumnPage @augments LibraryItem @constructor */ function NewsletterPage() { ...
JavaScript
/** * @overview This "library" contains a * lot of classes and functions. * @example <pre> var x (x < 1); alert("This 'is' \"code\""); </pre> * @name My Cool Library * @author Joe Smith jsmith@company.com * @version 0.1 */ /** * Gets the current foo * @param {String} fo...
JavaScript
/** @class */ function thisiscode() { }
JavaScript
/** * @constructor */ function Outer() { /** * @constructor */ function Inner(name) { /** The name of this. */ this.name = name; } this.open = function(name) { return (new Inner(name)); } }
JavaScript
/** @name Response @class */ Response.prototype = { /** @name Response#text @function @description Gets the body of the response as plain text @returns {String} Response as text */ text: function() { return this.nativeResponse.responseText; } }
JavaScript
/**#nocode+*/ /** @name star @function */ function blahblah() { } /**#nocode-*/ function yaddayadda() { }
JavaScript
/** @constructor */ function Zop() { } /** @class */ Foo = function(id) { // this is a bit twisted, but if you call Foo() you will then // modify Foo(). This is kinda, sorta non-insane, because you // would have to call Foo() 100% of the time to use Foo's methods Foo.prototype.methodOne = function(bar)...
JavaScript
/** * @fileoverview This file is to be used for testing the JSDoc parser * It is not intended to be an example of good JavaScript OO-programming, * nor is it intended to fulfill any specific purpose apart from * demonstrating the functionality of the * <a href='http://sourceforge.net/projects/jsdoc'>JSDoc<...
JavaScript
/** @constructor */ function Circle(){} /** @constructor @memberOf Circle# */ Circle.prototype.Tangent = function(){}; // renaming Circle#Tangent to Circle#Circle#Tangent /** @memberOf Circle#Tangent# */ Circle.prototype.Tangent.prototype.getDiameter = function(){};
JavaScript
/** @class */ var Person = Class.create( /** @lends Person.prototype */ { initialize: function(name) { this.name = name; }, say: function(message) { return this.name + ': ' + message; } } ); /** @lends Person.prototype */ { ...
JavaScript
/** * Builtin object. * @class * @name Array */ /**#@+ * Extension to builtin array. * @memberOf Array * @method */ /** * @returns Boolen if some array members... */ Array.prototype.some = function(){}; /** * Change every element of an array. * @returns Filtered array copy. */ A...
JavaScript
/** @namespace This is the first namespace. */ ns1 = {}; /** This is the second namespace. @namespace */ ns1.ns2 = {}; /** This part of ns1.ns2 @constructor */ ns1.ns2.Function1 = function() { }; ns1.staticFunction = function() { }; /** A static field in a namespace. */ ns1.ns2.staticFi...
JavaScript
/** * @name Foo * @class */ /**#@+ * @memberOf Foo# * @field */ /** * @name bar * @type Object[] */ /**#@-*/ /** * @name Foo2 * @class */ /**#@+ * @memberOf Foo2# * @field */ /** * @name bar * @type Object[] */ /**#@-*/
JavaScript
/** @constructor */ function Layout(p) { /** initilize 1 */ this.init = function(p) { } /** get the id */ this.getId = function() { } /** @type string */ this.orientation = "landscape"; function getInnerElements(elementSecretId){ } } /** A static method. */ Layout.units = function()...
JavaScript
/** * @param {Object} object * @return {string} */ function valueOf(object) {} /** * @param {Object} object * @return {string} */ function toString(object) {} /** * @param {Object} object * @return {string} */ function toSource(object) {} /** * @param {Object} object * @return {string}...
JavaScript
/** * @Constructor * @desc 配置文件 * @class 什么也不返回 */ function Test(conf) { // do something; }
JavaScript
/** the parent */ var box = {}; /** @namespace */ box.holder = {} box.holder.foo = function() { /** the counter */ this.counter = 1; } box.holder.foo(); print(box.holder.counter);
JavaScript
/** * @constructor */ function Foo() { /** @memberOf Foo.prototype */ function bar(a, b) { } /** @memberOf Foo */ var zip = function(p, q) { } /** @memberOf Foo */ function zop( x,y ) { } /** @memberOf Foo ...
JavaScript
/** @namespace */ var mxn = {}; (function(){ /** @exports Map as mxn.Map */ var Map = /** @constructor */ mxn.Map = function() { }; /** A method. */ Map.prototype.doThings = function() { }; })();
JavaScript
/** * @name bar * @namespace */ new function() { /** * @name bar-foo * @function * @param {number} x */ function foo(x) { } }
JavaScript
/** @constructor @param columns The number of columns. */ function Layout(/**int*/columns){ /** @param [id] The id of the element. @param elName The name of the element. */ this.getElement = function( /** string */ elName, /** number|string */ id ) { }; /** @constructor */ this...
JavaScript
/** ecks */ var x = [1, 2, 4]; var y = { foo: function(){ } } bar = function() { } function zop() { }
JavaScript
/** * @name Kitchen * @constructor * @fires Bakery#event:donutOrdered */ /** * Fired when some cake is eaten. * @name Kitchen#event:cakeEaten * @function * @param {Number} pieces The number of pieces eaten. */ /** * Find out if cake was eaten. * @name Kitchen#cakeEaten * @function * @par...
JavaScript
/** * @version $Id: main.js 847 2010-07-03 08:03:44Z micmath $ */ function main() { IO.include("lib/JSDOC.js"); IO.includeDir("plugins/"); // process the options // the -c option: options are defined in a configuration file if (JSDOC.opt.c) { eval("JSDOC.conf = " + IO.readFile(JSDOC.opt.c)); ...
JavaScript
/** * This is the main container for the XMLDOC handler. * @namespace * @author Brett Fattori (bfattori@fry.com) * @version $Revision: 498 $ */ XMLDOC = { }; /** The current version string of this application. */ XMLDOC.VERSION = "1.0"; /** Include the library necessary to handle XML files */ IO....
JavaScript
LOG.inform("XMLDOC.DomReader loaded"); XMLDOC.DomReader = function(root) { this.dom = root; /** * The current node the reader is on */ this.node = root; /** * Get the current node the reader is on * @type XMLDOC.Parser.node */ XMLDOC.DomReader.prototype.getNode = fu...
JavaScript
LOG.inform("XMLDOC.Parser loaded"); /** * XML Parser object. Returns an {@link #XMLDOC.Parser.node} which is * the root element of the parsed document. * <p/> * By default, this parser will only handle well formed XML. To * allow the parser to handle HTML, set the <tt>XMLDOC.Parser.strictMode</tt> * va...
JavaScript
LOG.inform("XMLDOC.symbolize loaded"); /** * Convert the source file to a set of symbols */ XMLDOC.symbolize = function(srcFile, src) { LOG.inform("Symbolizing file '" + srcFile + "'"); // XML files already have a defined structure, so we don't need to // do anything but parse them. The DOM rea...
JavaScript
/** This is the main container for the FOODOC handler. @namespace */ FOODOC = { }; /** The current version string of this application. */ FOODOC.VERSION = "1.0"; FOODOC.handle = function(srcFile, src) { LOG.inform("Handling file '" + srcFile + "'"); return [ new JSDOC.Symbol( "foo", ...
JavaScript
IO.include("frame/Opt.js"); IO.include("frame/Chain.js"); IO.include("frame/Link.js"); IO.include("frame/String.js"); IO.include("frame/Hash.js"); IO.include("frame/Namespace.js"); //IO.include("frame/Reflection.js"); /** A few helper functions to make life a little easier. */ function defined(o) { return...
JavaScript
// try: java -jar ../../jsrun.jar runner.js load("TestDoc.js"); TestDoc.prove("../frame/Opt.js"); TestDoc.prove("../lib/JSDOC.js"); TestDoc.prove("../frame/String.js"); TestDoc.prove("../lib/JSDOC/DocTag.js"); TestDoc.prove("../lib/JSDOC/DocComment.js"); TestDoc.prove("../lib/JSDOC/TokenReader.js"); TestDoc...
JavaScript
var TestDoc = { fails: 0, plans: 0, passes: 0, results: [] }; TestDoc.record = function(result) { TestDoc.results.push(result); if (typeof result.verdict == "boolean") { if (result.verdict === false) TestDoc.fails++; if (result.verdict === true) TestDoc.passes++; } } TestDoc.prove = function...
JavaScript
/** * @class <pre> This is a lightly modified version of Kevin Jones' JavaScript library Data.Dump. To download the original visit: <a href="http://openjsan.org/doc/k/ke/kevinj/Data/Dump/">http://openjsan.org/doc/k/ke/kevinj/Data/Dump/</a> AUTHORS The Data.Dump JavaScript module is written by Kevin Jone...
JavaScript
/** @name String @class Additions to the core string object. */ /** @author Steven Levithan, released as public domain. */ String.prototype.trim = function() { var str = this.replace(/^\s+/, ''); for (var i = str.length - 1; i >= 0; i--) { if (/\S/.test(str.charAt(i))) { str = str.substring(0, i + 1...
JavaScript
_global_ = this; function Namespace(name, f) { var n = name.split("."); for (var o = _global_, i = 0, l = n.length; i < l; i++) { o = o[n[i]] = o[n[i]] || {}; } if (f) f(); }
JavaScript
/**@constructor*/ function Reflection(obj) { this.obj = obj; } Reflection.prototype.getConstructorName = function() { if (this.obj.constructor.name) return this.obj.constructor.name; var src = this.obj.constructor.toSource(); var name = src.substring(name.indexOf("function")+8, src.indexOf('(')).replace(/ ...
JavaScript
/** @constructor @example var _index = new Hash(); _index.set("a", "apple"); _index.set("b", "blue"); _index.set("c", "coffee"); for (var p = _index.first(); p; p = _index.next()) { print(p.key+" is for "+p.value); } */ var Hash = function() { this._map = {}; this._keys = []; this._vals...
JavaScript
/**@constructor*/ function ChainNode(object, link) { this.value = object; this.link = link; // describes this node's relationship to the previous node } /**@constructor*/ function Chain(valueLinks) { this.nodes = []; this.cursor = -1; if (valueLinks && valueLinks.length > 0) { this.push(valueLinks...
JavaScript
/** @namespace */ Opt = { /** * Get commandline option values. * @param {Array} args Commandline arguments. Like ["-a=xml", "-b", "--class=new", "--debug"] * @param {object} optNames Map short names to long names. Like {a:"accept", b:"backtrace", c:"class", d:"debug"}. * @return {object} Short names and ...
JavaScript
/** Handle the creation of HTML links to documented symbols. @constructor */ function Link() { this.alias = ""; this.src = ""; this.file = ""; this.text = ""; this.innerName = ""; this.classLink = false; this.targetName = ""; this.target = function(targetName) { if (defined(targetName)) this.t...
JavaScript
/** * @fileOverview * @name JsTestrun * @author Michael Mathews micmath@gmail.com * @url $HeadURL: http://jsdoc-toolkit.googlecode.com/svn/trunk/jsdoc-toolkit/app/frame/Testrun.js $ * @revision $Id: Testrun.js 418 2008-01-15 21:40:33Z micmath $ * @license <a href="http://en.wikipedia.org/wiki/MIT_License">X...
JavaScript
/** @overview @date $Date: 2010-07-03 00:55:05 -0700 (Sat, 03 Jul 2010) $ @version $Revision: 846 $ @location $HeadURL: http://jsdoc-toolkit.googlecode.com/svn/trunk/jsdoc-toolkit/app/lib/JSDOC.js $ @name JSDOC.js */ /** This is the main container for the JSDOC application. @namespace */ JSDOC = {...
JavaScript
if (typeof JSDOC == "undefined") JSDOC = {}; /** @constructor */ JSDOC.Token = function(data, type, name) { this.data = data; this.type = type; this.name = name; } JSDOC.Token.prototype.toString = function() { return "<"+this.type+" name=\""+this.name+"\">"+this.data+"</"+this.type+">"; } JSDOC....
JavaScript
if (typeof JSDOC == "undefined") JSDOC = {}; /** Create a new DocComment. This takes a raw documentation comment, and wraps it in useful accessors. @class Represents a documentation comment object. */ JSDOC.DocComment = function(/**String*/comment) { this.init(); if (typeof comment != "undefined") { ...
JavaScript
if (typeof JSDOC == "undefined") JSDOC = {}; /** @constructor */ JSDOC.TokenStream = function(tokens) { this.tokens = (tokens || []); this.rewind(); } /** @constructor @private */ function VoidToken(/**String*/type) { this.toString = function() {return "<VOID type=\""+type+"\">"}; this.is = fun...
JavaScript
/** @constructor */ JSDOC.SymbolSet = function() { this.init(); } JSDOC.SymbolSet.prototype.init = function() { this._index = new Hash(); } JSDOC.SymbolSet.prototype.keys = function() { return this._index.keys(); } JSDOC.SymbolSet.prototype.hasSymbol = function(alias) { return this._index.hasKey(al...
JavaScript
/** @namespace Holds functionality related to running plugins. */ JSDOC.PluginManager = { } /** @param name A unique name that identifies that plugin. @param handlers A collection of named functions. The names correspond to hooks in the core code. */ JSDOC.PluginManager.registerPlugin = function(/**String...
JavaScript
if (typeof JSDOC == "undefined") JSDOC = {}; /** @constructor */ JSDOC.DocTag = function(src) { this.init(); if (typeof src != "undefined") { this.parse(src); } } /** Create and initialize the properties of this. */ JSDOC.DocTag.prototype.init = function() { this.title = ""; this.ty...
JavaScript
if (typeof JSDOC == "undefined") JSDOC = {}; /** @constructor */ JSDOC.Walker = function(/**JSDOC.TokenStream*/ts) { this.init(); if (typeof ts != "undefined") { this.walk(ts); } } JSDOC.Walker.prototype.init = function() { this.ts = null; var globalSymbol = new JSDOC.Symbol("_global_", [], "GLOBAL", new JSDO...
JavaScript
if (typeof JSDOC == "undefined") JSDOC = {}; /** @class Search a {@link JSDOC.TextStream} for language tokens. */ JSDOC.TokenReader = function() { this.keepDocs = true; this.keepWhite = false; this.keepComments = false; } /** @type {JSDOC.Token[]} */ JSDOC.TokenReader.prototype.tokenize = function...
JavaScript
/** @constructor */ JSDOC.JsPlate = function(templateFile) { if (templateFile) this.template = IO.readFile(templateFile); this.templateFile = templateFile; this.code = ""; this.parse(); } JSDOC.JsPlate.prototype.parse = function() { this.template = this.template.replace(/\{#[\s\S]+?#\}/gi, ""); t...
JavaScript
/** @constructor @param [opt] Used to override the commandline options. Useful for testing. @version $Id: JsDoc.js 831 2010-03-09 14:24:56Z micmath $ */ JSDOC.JsDoc = function(/**object*/ opt) { if (opt) { JSDOC.opt = opt; } if (JSDOC.opt.h) { JSDOC.usage(); quit(); } // defend against ...
JavaScript