projects
/
gnome.introspection-doc-generator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6919188
)
JSDOC/DocTag.js
author
Alan Knowles
<alan@akkbhome.com>
Tue, 6 Jul 2010 23:39:45 +0000
(07:39 +0800)
committer
Alan Knowles
<alan@akkbhome.com>
Tue, 6 Jul 2010 23:39:45 +0000
(07:39 +0800)
JSDOC/DocTag.js
patch
|
blob
|
history
diff --git
a/JSDOC/DocTag.js
b/JSDOC/DocTag.js
index
d9fa27b
..
296eea8
100644
(file)
--- a/
JSDOC/DocTag.js
+++ b/
JSDOC/DocTag.js
@@
-13,6
+13,12
@@
Options = imports.Options.Options;
DocTag = XObject.define(
DocTag = XObject.define(
+
+/**
+ * @constructor
+ * @arg {String} src
+ */
+
function(src) {
this.title = "";
this.type = "";
function(src) {
this.title = "";
this.type = "";
@@
-164,6
+170,29
@@
DocTag = XObject.define(
return src;
}
return src;
}
+
+ balance : function(str, open, close) {
+ var i = 0;
+ while (str.charAt(i) != open) {
+ if (i == str.length) return [-1, -1];
+ i++;
+ }
+
+ var j = i+1;
+ var balance = 1;
+ while (j < str.length) {
+ if (str.charAt(j) == open) balance++;
+ if (str.charAt(j) == close) balance--;
+ if (balance == 0) break;
+ j++;
+ if (j == str.length) return [-1, -1];
+ }
+
+ return [i, j];
+}
+
+
+
});
// cached support?
});
// cached support?