sproutcore 1.6.0.rc.1-x86-mingw32 → 1.6.0.rc.2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (217) hide show
  1. data/CHANGELOG +31 -6
  2. data/{History.txt → History.rdoc} +0 -0
  3. data/{README.txt → README.rdoc} +3 -2
  4. data/Rakefile +15 -15
  5. data/{Todo.txt → Todo.rdoc} +0 -0
  6. data/VERSION.yml +1 -1
  7. data/lib/buildtasks/manifest.rake +11 -4
  8. data/lib/buildtasks/target.rake +20 -23
  9. data/lib/frameworks/sproutcore/CHANGELOG.md +36 -0
  10. data/lib/frameworks/sproutcore/frameworks/core_foundation/core.js +2 -42
  11. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/bind.js +2 -1
  12. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/collection.js +3 -1
  13. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/template_helpers/checkbox_support.js +5 -5
  14. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/template_helpers/text_field_support.js +29 -12
  15. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +4 -4
  16. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/mixins/template_helpers/text_field_support.js +9 -0
  17. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/collection.js +110 -0
  18. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template_collection.js +63 -26
  19. data/lib/frameworks/sproutcore/frameworks/datastore/system/child_array.js +25 -5
  20. data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +3 -3
  21. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array.js +26 -3
  22. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/core_methods.js +74 -53
  23. data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +6 -7
  24. data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +6 -3
  25. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +25 -1
  26. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/methods.js +1 -3
  27. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/ui.js +20 -1
  28. data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +1 -1
  29. data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +46 -49
  30. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +23 -0
  31. data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +14 -2
  32. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +2 -76
  33. data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +3348 -1591
  34. data/lib/frameworks/sproutcore/frameworks/runtime/core.js +25 -5
  35. data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +0 -3
  36. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/objectForPropertyPath.js +10 -5
  37. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js +29 -0
  38. data/lib/frameworks/sproutcore/frameworks/runtime/tests/private/observer_queue.js +98 -0
  39. data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +2 -2
  40. data/lib/frameworks/sproutcore/themes/ace/resources/split/split.css +1 -1
  41. data/lib/gen/language/Buildfile +1 -1
  42. data/lib/sproutcore.rb +1 -14
  43. data/lib/sproutcore/buildfile/string_ext.rb +0 -4
  44. data/lib/sproutcore/helpers/cssmin.rb +44 -59
  45. data/lib/sproutcore/helpers/text_helper.rb +11 -13
  46. data/lib/sproutcore/models/manifest.rb +4 -4
  47. data/lib/sproutcore/models/target.rb +11 -110
  48. data/lib/sproutcore/rack.rb +0 -1
  49. data/lib/sproutcore/rack/dev.rb +0 -1
  50. data/lib/sproutcore/rack/proxy.rb +9 -8
  51. data/lib/sproutcore/rack/service.rb +1 -1
  52. data/lib/sproutcore/render_engines/haml.rb +2 -5
  53. data/lib/sproutcore/tools/build.rb +2 -0
  54. data/lib/sproutcore/tools/docs.rb +7 -36
  55. data/lib/sproutcore/tools/manifest.rb +1 -1
  56. data/spec/buildtasks/target_spec.rb +9 -0
  57. data/spec/fixtures/real_world/frameworks/sproutcore/Buildfile +1 -1
  58. data/sproutcore.gemspec +3 -4
  59. data/vendor/chance/lib/chance/instance.rb +5 -8
  60. metadata +41 -207
  61. data/lib/doc_templates/jsdoc/allclasses.tmpl +0 -17
  62. data/lib/doc_templates/jsdoc/allfiles.tmpl +0 -56
  63. data/lib/doc_templates/jsdoc/class.tmpl +0 -487
  64. data/lib/doc_templates/jsdoc/index.tmpl +0 -38
  65. data/lib/doc_templates/jsdoc/publish.js +0 -170
  66. data/lib/doc_templates/jsdoc/static/default.css +0 -162
  67. data/lib/doc_templates/jsdoc/static/header.html +0 -2
  68. data/lib/doc_templates/jsdoc/static/index.html +0 -19
  69. data/lib/doc_templates/jsdoc/symbol.tmpl +0 -35
  70. data/lib/doc_templates/sproutcore/allclasses.tmpl +0 -0
  71. data/lib/doc_templates/sproutcore/allfiles.tmpl +0 -56
  72. data/lib/doc_templates/sproutcore/class.tmpl +0 -674
  73. data/lib/doc_templates/sproutcore/classes-json.tmpl +0 -55
  74. data/lib/doc_templates/sproutcore/index.tmpl +0 -62
  75. data/lib/doc_templates/sproutcore/publish.js +0 -346
  76. data/lib/doc_templates/sproutcore/static/default.css +0 -258
  77. data/lib/doc_templates/sproutcore/static/header.html +0 -2
  78. data/lib/doc_templates/sproutcore/static/index.html +0 -19
  79. data/lib/doc_templates/sproutcore/symbol.tmpl +0 -35
  80. data/lib/frameworks/sproutcore/frameworks/runtime/tests/private/observer_queue/isObservingSuspended.js +0 -55
  81. data/lib/sproutcore/rack/docs.rb +0 -24
  82. data/spec/fixtures/real_world/frameworks/sproutcore/apps/docs/PLACEHOLDER +0 -0
  83. data/vendor/jsdoc/README.txt +0 -151
  84. data/vendor/jsdoc/app/frame.js +0 -33
  85. data/vendor/jsdoc/app/frame/Chain.js +0 -102
  86. data/vendor/jsdoc/app/frame/Dumper.js +0 -144
  87. data/vendor/jsdoc/app/frame/Hash.js +0 -47
  88. data/vendor/jsdoc/app/frame/Link.js +0 -142
  89. data/vendor/jsdoc/app/frame/Namespace.js +0 -10
  90. data/vendor/jsdoc/app/frame/Opt.js +0 -134
  91. data/vendor/jsdoc/app/frame/Reflection.js +0 -26
  92. data/vendor/jsdoc/app/frame/String.js +0 -93
  93. data/vendor/jsdoc/app/frame/Testrun.js +0 -129
  94. data/vendor/jsdoc/app/handlers/FOODOC.js +0 -26
  95. data/vendor/jsdoc/app/handlers/XMLDOC.js +0 -26
  96. data/vendor/jsdoc/app/handlers/XMLDOC/DomReader.js +0 -159
  97. data/vendor/jsdoc/app/handlers/XMLDOC/XMLDoc.js +0 -16
  98. data/vendor/jsdoc/app/handlers/XMLDOC/XMLParse.js +0 -292
  99. data/vendor/jsdoc/app/lib/JSDOC.js +0 -98
  100. data/vendor/jsdoc/app/lib/JSDOC/DocComment.js +0 -200
  101. data/vendor/jsdoc/app/lib/JSDOC/DocTag.js +0 -294
  102. data/vendor/jsdoc/app/lib/JSDOC/JsDoc.js +0 -162
  103. data/vendor/jsdoc/app/lib/JSDOC/JsPlate.js +0 -100
  104. data/vendor/jsdoc/app/lib/JSDOC/Lang.js +0 -144
  105. data/vendor/jsdoc/app/lib/JSDOC/Parser.js +0 -109
  106. data/vendor/jsdoc/app/lib/JSDOC/PluginManager.js +0 -33
  107. data/vendor/jsdoc/app/lib/JSDOC/Symbol.js +0 -681
  108. data/vendor/jsdoc/app/lib/JSDOC/SymbolSet.js +0 -226
  109. data/vendor/jsdoc/app/lib/JSDOC/TextStream.js +0 -41
  110. data/vendor/jsdoc/app/lib/JSDOC/Token.js +0 -18
  111. data/vendor/jsdoc/app/lib/JSDOC/TokenReader.js +0 -332
  112. data/vendor/jsdoc/app/lib/JSDOC/TokenStream.js +0 -133
  113. data/vendor/jsdoc/app/lib/JSDOC/Util.js +0 -32
  114. data/vendor/jsdoc/app/lib/JSDOC/Walker.js +0 -453
  115. data/vendor/jsdoc/app/main.js +0 -74
  116. data/vendor/jsdoc/app/plugins/commentSrcJson.js +0 -19
  117. data/vendor/jsdoc/app/plugins/frameworkPrototype.js +0 -16
  118. data/vendor/jsdoc/app/plugins/functionCall.js +0 -10
  119. data/vendor/jsdoc/app/plugins/publishSrcHilite.js +0 -62
  120. data/vendor/jsdoc/app/plugins/sproutcoreTags.js +0 -26
  121. data/vendor/jsdoc/app/plugins/symbolLink.js +0 -9
  122. data/vendor/jsdoc/app/plugins/tagParamConfig.js +0 -31
  123. data/vendor/jsdoc/app/plugins/tagSynonyms.js +0 -43
  124. data/vendor/jsdoc/app/run.js +0 -346
  125. data/vendor/jsdoc/app/t/TestDoc.js +0 -144
  126. data/vendor/jsdoc/app/t/runner.js +0 -13
  127. data/vendor/jsdoc/app/test.js +0 -304
  128. data/vendor/jsdoc/app/test/addon.js +0 -24
  129. data/vendor/jsdoc/app/test/anon_inner.js +0 -14
  130. data/vendor/jsdoc/app/test/augments.js +0 -31
  131. data/vendor/jsdoc/app/test/augments2.js +0 -26
  132. data/vendor/jsdoc/app/test/borrows.js +0 -41
  133. data/vendor/jsdoc/app/test/borrows2.js +0 -23
  134. data/vendor/jsdoc/app/test/config.js +0 -22
  135. data/vendor/jsdoc/app/test/constructs.js +0 -18
  136. data/vendor/jsdoc/app/test/encoding.js +0 -10
  137. data/vendor/jsdoc/app/test/encoding_other.js +0 -12
  138. data/vendor/jsdoc/app/test/functions_anon.js +0 -39
  139. data/vendor/jsdoc/app/test/functions_nested.js +0 -33
  140. data/vendor/jsdoc/app/test/global.js +0 -13
  141. data/vendor/jsdoc/app/test/globals.js +0 -25
  142. data/vendor/jsdoc/app/test/ignore.js +0 -10
  143. data/vendor/jsdoc/app/test/inner.js +0 -16
  144. data/vendor/jsdoc/app/test/jsdoc_test.js +0 -477
  145. data/vendor/jsdoc/app/test/lend.js +0 -33
  146. data/vendor/jsdoc/app/test/memberof.js +0 -20
  147. data/vendor/jsdoc/app/test/memberof_constructor.js +0 -15
  148. data/vendor/jsdoc/app/test/name.js +0 -19
  149. data/vendor/jsdoc/app/test/namespace_nested.js +0 -23
  150. data/vendor/jsdoc/app/test/nocode.js +0 -13
  151. data/vendor/jsdoc/app/test/oblit_anon.js +0 -20
  152. data/vendor/jsdoc/app/test/overview.js +0 -20
  153. data/vendor/jsdoc/app/test/param_inline.js +0 -37
  154. data/vendor/jsdoc/app/test/params_optional.js +0 -8
  155. data/vendor/jsdoc/app/test/prototype.js +0 -17
  156. data/vendor/jsdoc/app/test/prototype_nested.js +0 -9
  157. data/vendor/jsdoc/app/test/prototype_oblit.js +0 -13
  158. data/vendor/jsdoc/app/test/prototype_oblit_constructor.js +0 -24
  159. data/vendor/jsdoc/app/test/public.js +0 -10
  160. data/vendor/jsdoc/app/test/shared.js +0 -42
  161. data/vendor/jsdoc/app/test/shared2.js +0 -2
  162. data/vendor/jsdoc/app/test/shortcuts.js +0 -22
  163. data/vendor/jsdoc/app/test/static_this.js +0 -13
  164. data/vendor/jsdoc/app/test/synonyms.js +0 -23
  165. data/vendor/jsdoc/app/test/tosource.js +0 -23
  166. data/vendor/jsdoc/app/test/variable_redefine.js +0 -14
  167. data/vendor/jsdoc/changes.txt +0 -47
  168. data/vendor/jsdoc/conf/sample.conf +0 -31
  169. data/vendor/jsdoc/java/build.xml +0 -36
  170. data/vendor/jsdoc/java/build_1.4.xml +0 -36
  171. data/vendor/jsdoc/java/classes/js.jar +0 -0
  172. data/vendor/jsdoc/java/src/JsDebugRun.java +0 -21
  173. data/vendor/jsdoc/java/src/JsRun.java +0 -21
  174. data/vendor/jsdoc/jsdebug.jar +0 -0
  175. data/vendor/jsdoc/jsrun.jar +0 -0
  176. data/vendor/jsdoc/t/TestDoc.js +0 -144
  177. data/vendor/jsdoc/t/runner.js +0 -13
  178. data/vendor/jsdoc/test.js +0 -304
  179. data/vendor/jsdoc/test/addon.js +0 -24
  180. data/vendor/jsdoc/test/anon_inner.js +0 -14
  181. data/vendor/jsdoc/test/augments.js +0 -31
  182. data/vendor/jsdoc/test/augments2.js +0 -26
  183. data/vendor/jsdoc/test/borrows.js +0 -41
  184. data/vendor/jsdoc/test/borrows2.js +0 -23
  185. data/vendor/jsdoc/test/config.js +0 -22
  186. data/vendor/jsdoc/test/constructs.js +0 -18
  187. data/vendor/jsdoc/test/encoding.js +0 -10
  188. data/vendor/jsdoc/test/encoding_other.js +0 -12
  189. data/vendor/jsdoc/test/functions_anon.js +0 -39
  190. data/vendor/jsdoc/test/functions_nested.js +0 -33
  191. data/vendor/jsdoc/test/global.js +0 -13
  192. data/vendor/jsdoc/test/globals.js +0 -25
  193. data/vendor/jsdoc/test/ignore.js +0 -10
  194. data/vendor/jsdoc/test/inner.js +0 -16
  195. data/vendor/jsdoc/test/jsdoc_test.js +0 -477
  196. data/vendor/jsdoc/test/lend.js +0 -33
  197. data/vendor/jsdoc/test/memberof.js +0 -20
  198. data/vendor/jsdoc/test/memberof_constructor.js +0 -15
  199. data/vendor/jsdoc/test/name.js +0 -19
  200. data/vendor/jsdoc/test/namespace_nested.js +0 -23
  201. data/vendor/jsdoc/test/nocode.js +0 -13
  202. data/vendor/jsdoc/test/oblit_anon.js +0 -20
  203. data/vendor/jsdoc/test/overview.js +0 -20
  204. data/vendor/jsdoc/test/param_inline.js +0 -37
  205. data/vendor/jsdoc/test/params_optional.js +0 -8
  206. data/vendor/jsdoc/test/prototype.js +0 -17
  207. data/vendor/jsdoc/test/prototype_nested.js +0 -9
  208. data/vendor/jsdoc/test/prototype_oblit.js +0 -13
  209. data/vendor/jsdoc/test/prototype_oblit_constructor.js +0 -24
  210. data/vendor/jsdoc/test/public.js +0 -10
  211. data/vendor/jsdoc/test/shared.js +0 -42
  212. data/vendor/jsdoc/test/shared2.js +0 -2
  213. data/vendor/jsdoc/test/shortcuts.js +0 -22
  214. data/vendor/jsdoc/test/static_this.js +0 -13
  215. data/vendor/jsdoc/test/synonyms.js +0 -23
  216. data/vendor/jsdoc/test/tosource.js +0 -23
  217. data/vendor/jsdoc/test/variable_redefine.js +0 -14
@@ -1,162 +0,0 @@
1
- /**
2
- @constructor
3
- @param [opt] Used to override the commandline options. Useful for testing.
4
- @version $Id: JsDoc.js 592 2008-05-09 07:43:33Z micmath $
5
- */
6
- JSDOC.JsDoc = function(/**object*/ opt) {
7
- if (opt) {
8
- JSDOC.opt = opt;
9
- }
10
-
11
- // the -c option: use a configuration file
12
- if (JSDOC.opt.c) {
13
- eval("JSDOC.conf = " + IO.readFile(JSDOC.opt.c));
14
-
15
- LOG.inform("Using configuration file at '"+JSDOC.opt.c+"'.");
16
-
17
- for (var c in JSDOC.conf) {
18
- if (c !== "D" && !defined(JSDOC.opt[c])) { // commandline overrules config file
19
- JSDOC.opt[c] = JSDOC.conf[c];
20
- }
21
- }
22
-
23
- if (typeof JSDOC.conf["_"] != "undefined") {
24
- JSDOC.opt["_"] = JSDOC.opt["_"].concat(JSDOC.conf["_"]);
25
- }
26
-
27
- LOG.inform("With configuration: ");
28
- for (var o in JSDOC.opt) {
29
- LOG.inform(" "+o+": "+JSDOC.opt[o]);
30
- }
31
- }
32
-
33
- if (JSDOC.opt.h) {
34
- JSDOC.usage();
35
- quit();
36
- }
37
-
38
- // defend against options that are not sane
39
- if (JSDOC.opt._.length == 0) {
40
- LOG.warn("No source files to work on. Nothing to do.");
41
- quit();
42
- }
43
- if (JSDOC.opt.t === true || JSDOC.opt.d === true) {
44
- JSDOC.usage();
45
- }
46
-
47
- if (typeof JSDOC.opt.d == "string") {
48
- if (!JSDOC.opt.d.charAt(JSDOC.opt.d.length-1).match(/[\\\/]/)) {
49
- JSDOC.opt.d = JSDOC.opt.d+"/";
50
- }
51
- LOG.inform("Output directory set to '"+JSDOC.opt.d+"'.");
52
- IO.mkPath(JSDOC.opt.d);
53
- }
54
- if (JSDOC.opt.e) IO.setEncoding(JSDOC.opt.e);
55
-
56
- // the -r option: scan source directories recursively
57
- if (typeof JSDOC.opt.r == "boolean") JSDOC.opt.r = 10;
58
- else if (!isNaN(parseInt(JSDOC.opt.r))) JSDOC.opt.r = parseInt(JSDOC.opt.r);
59
- else JSDOC.opt.r = 1;
60
-
61
- // the -D option: define user variables
62
- var D = {};
63
- if (JSDOC.opt.D) {
64
- for (var i = 0; i < JSDOC.opt.D.length; i++) {
65
- var defineParts = JSDOC.opt.D[i].split(":", 2);
66
- if (defineParts) D[defineParts[0]] = defineParts[1];
67
- }
68
- }
69
- JSDOC.opt.D = D;
70
- // combine any conf file D options with the commandline D options
71
- if (defined(JSDOC.conf)) for (var c in JSDOC.conf.D) {
72
- if (!defined(JSDOC.opt.D[c])) {
73
- JSDOC.opt.D[c] = JSDOC.conf.D[c];
74
- }
75
- }
76
-
77
- // Load additional file handlers
78
- // the -H option: filetype handlers
79
- JSDOC.handlers = {};
80
- /*
81
- if (JSDOC.opt.H) {
82
- for (var i = 0; i < JSDOC.opt.H.length; i++) {
83
- var handlerDef = JSDOC.opt.H[i].split(":");
84
- LOG.inform("Adding '." + handlerDef[0] + "' content handler from handlers/" + handlerDef[1] + ".js");
85
- IO.include("handlers/" + handlerDef[1] + ".js");
86
- if (!eval("typeof "+handlerDef[1])) {
87
- LOG.warn(handlerDef[1] + "is not defined in "+handlerDef[1] + ".js");
88
- }
89
- else {
90
- JSDOC.handlers[handlerDef[0]] = eval(handlerDef[1]);
91
- }
92
- }
93
- }
94
- */
95
- // Give plugins a chance to initialize
96
- if (defined(JSDOC.PluginManager)) {
97
- JSDOC.PluginManager.run("onInit", this);
98
- }
99
-
100
- JSDOC.opt.srcFiles = this._getSrcFiles();
101
- this._parseSrcFiles();
102
- //var handler = symbols.handler;
103
- this.symbolSet = JSDOC.Parser.symbols;
104
- //this.symbolGroup.handler = handler;
105
- }
106
-
107
- /**
108
- Retrieve source file list.
109
- @returns {String[]} The pathnames of the files to be parsed.
110
- */
111
- JSDOC.JsDoc.prototype._getSrcFiles = function() {
112
- this.srcFiles = [];
113
-
114
- var ext = ["js"];
115
- if (JSDOC.opt.x) {
116
- ext = JSDOC.opt.x.split(",").map(function($) {return $.toLowerCase()});
117
- }
118
-
119
- for (var i = 0; i < JSDOC.opt._.length; i++) {
120
- this.srcFiles = this.srcFiles.concat(
121
- IO.ls(JSDOC.opt._[i], JSDOC.opt.r).filter(
122
- function($) {
123
- var thisExt = $.split(".").pop().toLowerCase();
124
- return (ext.indexOf(thisExt) > -1 || thisExt in JSDOC.handlers); // we're only interested in files with certain extensions
125
- }
126
- )
127
- );
128
- }
129
-
130
- return this.srcFiles;
131
- }
132
-
133
- JSDOC.JsDoc.prototype._parseSrcFiles = function() {
134
- JSDOC.Parser.init();
135
- for (var i = 0, l = this.srcFiles.length; i < l; i++) {
136
- var srcFile = this.srcFiles[i];
137
-
138
- try {
139
- var src = IO.readFile(srcFile);
140
- }
141
- catch(e) {
142
- LOG.warn("Can't read source file '"+srcFile+"': "+e.message);
143
- }
144
-
145
- // Check to see if there is a handler for this file type
146
- // var ext = FilePath.fileExtension(srcFile);
147
- // if (JSDOC.handlers[ext]) {
148
- // LOG.inform(" Using external handler for '" + ext + "'");
149
- //
150
- // symbols = symbols.concat(JSDOC.handlers[ext].handle(srcFile, src));
151
- // symbols.handler = JSDOC.handlers[ext];
152
- // }
153
- // else {
154
- // The default (JSDOC) handler
155
- var tr = new JSDOC.TokenReader();
156
- var ts = new JSDOC.TokenStream(tr.tokenize(new JSDOC.TextStream(src)));
157
-
158
- JSDOC.Parser.parse(ts, srcFile);
159
- // }
160
- }
161
- JSDOC.Parser.finish();
162
- }
@@ -1,100 +0,0 @@
1
- /**
2
- @constructor
3
- */
4
- JSDOC.JsPlate = function(templateFile) {
5
- if (templateFile) this.template = IO.readFile(templateFile);
6
-
7
- this.templateFile = templateFile;
8
- this.code = "";
9
- this.parse();
10
- }
11
-
12
- JSDOC.JsPlate.prototype.parse = function() {
13
- this.template = this.template.replace(/\{#[\s\S]+?#\}/gi, "");
14
- this.code = "var output=``"+this.template;
15
-
16
- this.code = this.code.replace(
17
- /<for +each="(.+?)" +in="(.+?)" *>/gi,
18
- function (match, eachName, inName) {
19
- return "``;\rvar $"+eachName+"_keys = keys("+inName+");\rfor(var $"+eachName+"_i = 0; $"+eachName+"_i < $"+eachName+"_keys.length; $"+eachName+"_i++) {\rvar $"+eachName+"_last = ($"+eachName+"_i == $"+eachName+"_keys.length-1);\rvar $"+eachName+"_key = $"+eachName+"_keys[$"+eachName+"_i];\rvar "+eachName+" = "+inName+"[$"+eachName+"_key];\routput+=``";
20
- }
21
- );
22
- this.code = this.code.replace(/<if test="(.+?)">/g, "``;\rif ($1) { output+=``");
23
- this.code = this.code.replace(/<elseif test="(.+?)"\s*\/>/g, "``;}\relse if ($1) { output+=``");
24
- this.code = this.code.replace(/<else\s*\/>/g, "``;}\relse { output+=``");
25
- this.code = this.code.replace(/<\/(if|for)>/g, "``;\r};\routput+=``");
26
- this.code = this.code.replace(
27
- /\{\+\s*([\s\S]+?)\s*\+\}/gi,
28
- function (match, code) {
29
- code = code.replace(/"/g, "``"); // prevent qoute-escaping of inline code
30
- code = code.replace(/(\r?\n)/g, " ");
31
- return "``+ ("+code+") +``";
32
- }
33
- );
34
- this.code = this.code.replace(
35
- /\{!\s*([\s\S]+?)\s*!\}/gi,
36
- function (match, code) {
37
- code = code.replace(/"/g, "``"); // prevent qoute-escaping of inline code
38
- code = code.replace(/(\n)/g, " ");
39
- return "``; "+code+";\routput+=``";
40
- }
41
- );
42
- this.code = this.code+"``;";
43
-
44
- this.code = this.code.replace(/(\r?\n)/g, "\\n");
45
- this.code = this.code.replace(/"/g, "\\\"");
46
- this.code = this.code.replace(/``/g, "\"");
47
- }
48
-
49
- JSDOC.JsPlate.prototype.toCode = function() {
50
- return this.code;
51
- }
52
-
53
- JSDOC.JsPlate.keys = function(obj) {
54
- var keys = [];
55
- if (obj.constructor.toString().indexOf("Array") > -1) {
56
- for (var i = 0; i < obj.length; i++) {
57
- keys.push(i);
58
- }
59
- }
60
- else {
61
- for (var i in obj) {
62
- keys.push(i);
63
- }
64
- }
65
- return keys;
66
- };
67
-
68
- JSDOC.JsPlate.values = function(obj) {
69
- var values = [];
70
- if (obj.constructor.toString().indexOf("Array") > -1) {
71
- for (var i = 0; i < obj.length; i++) {
72
- values.push(obj[i]);
73
- }
74
- }
75
- else {
76
- for (var i in obj) {
77
- values.push(obj[i]);
78
- }
79
- }
80
- return values;
81
- };
82
-
83
- JSDOC.JsPlate.prototype.process = function(data) {
84
- var keys = JSDOC.JsPlate.keys;
85
- var values = JSDOC.JsPlate.values;
86
-
87
- try {
88
- eval(this.code);
89
- }
90
- catch (e) {
91
- print(">> There was an error evaluating the compiled code from template: "+this.templateFile);
92
- print(" The error was on line "+e.lineNumber+" "+e.name+": "+e.message);
93
- var lines = this.code.split("\r");
94
- if (e.lineNumber-2 >= 0) print("line "+(e.lineNumber-1)+": "+lines[e.lineNumber-2]);
95
- print("line "+e.lineNumber+": "+lines[e.lineNumber-1]);
96
- print("");
97
- }
98
- /*debug*///print(this.code);
99
- return output;
100
- }
@@ -1,144 +0,0 @@
1
- /**
2
- @namespace
3
- */
4
- JSDOC.Lang = {
5
- }
6
-
7
- JSDOC.Lang.isBuiltin = function(name) {
8
- return (JSDOC.Lang.isBuiltin.coreObjects.indexOf(name) > -1);
9
- }
10
- JSDOC.Lang.isBuiltin.coreObjects = ['_global_', 'Array', 'Boolean', 'Date', 'Function', 'Math', 'Number', 'Object', 'RegExp', 'String'];
11
-
12
- JSDOC.Lang.whitespace = function(ch) {
13
- return JSDOC.Lang.whitespace.names[ch];
14
- }
15
- JSDOC.Lang.whitespace.names = {
16
- " ": "SPACE",
17
- "\f": "FORMFEED",
18
- "\t": "TAB",
19
- "\u0009": "UNICODE_TAB",
20
- "\u000A": "UNICODE_NBR",
21
- "\u0008": "VERTICAL_TAB"
22
- };
23
-
24
- JSDOC.Lang.newline = function(ch) {
25
- return JSDOC.Lang.newline.names[ch];
26
- }
27
- JSDOC.Lang.newline.names = {
28
- "\n": "NEWLINE",
29
- "\r": "RETURN",
30
- "\u000A": "UNICODE_LF",
31
- "\u000D": "UNICODE_CR",
32
- "\u2029": "UNICODE_PS",
33
- "\u2028": "UNICODE_LS"
34
- };
35
-
36
- JSDOC.Lang.keyword = function(word) {
37
- return JSDOC.Lang.keyword.names["="+word];
38
- }
39
- JSDOC.Lang.keyword.names = {
40
- "=break": "BREAK",
41
- "=case": "CASE",
42
- "=catch": "CATCH",
43
- "=const": "VAR",
44
- "=continue": "CONTINUE",
45
- "=default": "DEFAULT",
46
- "=delete": "DELETE",
47
- "=do": "DO",
48
- "=else": "ELSE",
49
- "=false": "FALSE",
50
- "=finally": "FINALLY",
51
- "=for": "FOR",
52
- "=function": "FUNCTION",
53
- "=if": "IF",
54
- "=in": "IN",
55
- "=instanceof": "INSTANCEOF",
56
- "=new": "NEW",
57
- "=null": "NULL",
58
- "=return": "RETURN",
59
- "=switch": "SWITCH",
60
- "=this": "THIS",
61
- "=throw": "THROW",
62
- "=true": "TRUE",
63
- "=try": "TRY",
64
- "=typeof": "TYPEOF",
65
- "=void": "VOID",
66
- "=while": "WHILE",
67
- "=with": "WITH",
68
- "=var": "VAR"
69
- };
70
-
71
- JSDOC.Lang.punc = function(ch) {
72
- return JSDOC.Lang.punc.names[ch];
73
- }
74
- JSDOC.Lang.punc.names = {
75
- ";": "SEMICOLON",
76
- ",": "COMMA",
77
- "?": "HOOK",
78
- ":": "COLON",
79
- "||": "OR",
80
- "&&": "AND",
81
- "|": "BITWISE_OR",
82
- "^": "BITWISE_XOR",
83
- "&": "BITWISE_AND",
84
- "===": "STRICT_EQ",
85
- "==": "EQ",
86
- "=": "ASSIGN",
87
- "!==": "STRICT_NE",
88
- "!=": "NE",
89
- "<<": "LSH",
90
- "<=": "LE",
91
- "<": "LT",
92
- ">>>": "URSH",
93
- ">>": "RSH",
94
- ">=": "GE",
95
- ">": "GT",
96
- "++": "INCREMENT",
97
- "--": "DECREMENT",
98
- "+": "PLUS",
99
- "-": "MINUS",
100
- "*": "MUL",
101
- "/": "DIV",
102
- "%": "MOD",
103
- "!": "NOT",
104
- "~": "BITWISE_NOT",
105
- ".": "DOT",
106
- "[": "LEFT_BRACKET",
107
- "]": "RIGHT_BRACKET",
108
- "{": "LEFT_CURLY",
109
- "}": "RIGHT_CURLY",
110
- "(": "LEFT_PAREN",
111
- ")": "RIGHT_PAREN"
112
- };
113
-
114
- JSDOC.Lang.matching = function(name) {
115
- return JSDOC.Lang.matching.names[name];
116
- }
117
- JSDOC.Lang.matching.names = {
118
- "LEFT_PAREN": "RIGHT_PAREN",
119
- "RIGHT_PAREN": "LEFT_PAREN",
120
- "LEFT_CURLY": "RIGHT_CURLY",
121
- "RIGHT_CURLY": "LEFT_CURLY",
122
- "LEFT_BRACE": "RIGHT_BRACE",
123
- "RIGHT_BRACE": "LEFT_BRACE"
124
- }
125
-
126
- JSDOC.Lang.isNumber = function(str) {
127
- return /^(\.[0-9]|[0-9]+\.|[0-9])[0-9]*([eE][+-][0-9]+)?$/i.test(str);
128
- }
129
-
130
- JSDOC.Lang.isHexDec = function(str) {
131
- return /^0x[0-9A-F]+$/i.test(str);
132
- }
133
-
134
- JSDOC.Lang.isWordChar = function(str) {
135
- return /^[a-zA-Z0-9$_.]+$/.test(str);
136
- }
137
-
138
- JSDOC.Lang.isSpace = function(str) {
139
- return (typeof JSDOC.Lang.whitespace(str) != "undefined");
140
- }
141
-
142
- JSDOC.Lang.isNewline = function(str) {
143
- return (typeof JSDOC.Lang.newline(str) != "undefined");
144
- }
@@ -1,109 +0,0 @@
1
- if (typeof JSDOC == "undefined") JSDOC = {};
2
-
3
- /**
4
- @namespace
5
- @requires JSDOC.Walker
6
- @requires JSDOC.Symbol
7
- @requires JSDOC.DocComment
8
- */
9
- JSDOC.Parser = {
10
- conf: {
11
- ignoreCode: JSDOC.opt.n,
12
- ignoreAnonymous: true, // factory: true
13
- treatUnderscoredAsPrivate: true, // factory: true
14
- explain: false // factory: false
15
- },
16
-
17
- addSymbol: function(symbol) {
18
- // if a symbol alias is documented more than once the last one with the user docs wins
19
- if (JSDOC.Parser.symbols.hasSymbol(symbol.alias)) {
20
- var oldSymbol = JSDOC.Parser.symbols.getSymbol(symbol.alias);
21
-
22
- if (oldSymbol.comment.isUserComment) {
23
- if (symbol.comment.isUserComment) { // old and new are both documented
24
- LOG.warn("The symbol '"+symbol.alias+"' is documented more than once.");
25
- }
26
- else { // old is documented but new isn't
27
- return;
28
- }
29
- }
30
- }
31
-
32
- // we don't document anonymous things
33
- if (JSDOC.Parser.conf.ignoreAnonymous && symbol.name.match(/\$anonymous\b/)) return;
34
-
35
- // uderscored things may be treated as if they were marked private, this cascades
36
- if (JSDOC.Parser.conf.treatUnderscoredAsPrivate && symbol.name.match(/[.#-]_[^.#-]+$/)) {
37
- if (!symbol.comment.getTag("public")) symbol.isPrivate = true;
38
- }
39
-
40
- // -p flag is required to document private things
41
- if (!JSDOC.opt.p && symbol.isPrivate) return; // issue #161 fixed by mcbain.asm
42
-
43
- // ignored things are not documented, this doesn't cascade
44
- if (symbol.isIgnored) return;
45
-
46
- JSDOC.Parser.symbols.addSymbol(symbol);
47
- },
48
-
49
- addBuiltin: function(name) {
50
- var builtin = new JSDOC.Symbol(name, [], "CONSTRUCTOR", new JSDOC.DocComment(""));
51
- builtin.isNamespace = true;
52
- builtin.srcFile = "";
53
- builtin.isPrivate = false;
54
- JSDOC.Parser.addSymbol(builtin);
55
- return builtin;
56
- },
57
-
58
- init: function() {
59
- JSDOC.Parser.symbols = new JSDOC.SymbolSet();
60
- JSDOC.Parser.walker = new JSDOC.Walker();
61
- },
62
-
63
- finish: function() {
64
- JSDOC.Parser.symbols.relate();
65
-
66
- // make a litle report about what was found
67
- if (JSDOC.Parser.conf.explain) {
68
- var symbols = JSDOC.Parser.symbols.toArray();
69
- var srcFile = "";
70
- for (var i = 0, l = symbols.length; i < l; i++) {
71
- var symbol = symbols[i];
72
- if (srcFile != symbol.srcFile) {
73
- srcFile = symbol.srcFile;
74
- print("\n"+srcFile+"\n-------------------");
75
- }
76
- print(i+":\n alias => "+symbol.alias + "\n name => "+symbol.name+ "\n isa => "+symbol.isa + "\n memberOf => " + symbol.memberOf + "\n isStatic => " + symbol.isStatic + ", isInner => " + symbol.isInner);
77
- }
78
- print("-------------------\n");
79
- }
80
- }
81
- }
82
-
83
- JSDOC.Parser.parse = function(/**JSDOC.TokenStream*/ts, /**String*/srcFile) {
84
- JSDOC.Symbol.srcFile = (srcFile || "");
85
- JSDOC.DocComment.shared = ""; // shared comments don't cross file boundaries
86
-
87
- if (!JSDOC.Parser.walker) JSDOC.Parser.init();
88
- JSDOC.Parser.walker.walk(ts); // adds to our symbols
89
-
90
- // filter symbols by option
91
- for (p in JSDOC.Parser.symbols._index) {
92
- var symbol = JSDOC.Parser.symbols.getSymbol(p);
93
-
94
- if (!symbol) continue;
95
-
96
- if (symbol.is("FILE") || symbol.is("GLOBAL")) {
97
- continue;
98
- }
99
- else if (!JSDOC.opt.a && !symbol.comment.isUserComment) {
100
- JSDOC.Parser.symbols.deleteSymbol(symbol.alias);
101
- }
102
-
103
- if (/#$/.test(symbol.alias)) { // we don't document prototypes
104
- JSDOC.Parser.symbols.deleteSymbol(symbol.alias);
105
- }
106
- }
107
-
108
- return JSDOC.Parser.symbols.toArray();
109
- }