- From: Robin Berjon via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 07 Sep 2011 19:29:03 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/ReSpec.js/js
In directory hutz:/tmp/cvs-serv856
Modified Files:
respec.js
Log Message:
partials
Index: respec.js
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -d -r1.162 -r1.163
--- respec.js 7 Sep 2011 19:07:04 -0000 1.162
+++ respec.js 7 Sep 2011 19:29:01 -0000 1.163
@@ -1609,7 +1609,7 @@
var def = { children: [] };
var str = idl.getAttribute("title");
str = this.parseExtendedAttributes(str, def);
- if (str.indexOf("interface") == 0) this.interface(def, str, idl);
+ if (str.indexOf("interface") == 0 || str.indexOf("partial") === 0) this.interface(def, str, idl);
else if (str.indexOf("exception") == 0) this.exception(def, str, idl);
else if (str.indexOf("dictionary") == 0) this.dictionary(def, str, idl);
else if (str.indexOf("typedef") == 0) this.typedef(def, str, idl);
@@ -1622,11 +1622,12 @@
interface: function (inf, str, idl) {
inf.type = "interface";
- var match = /^\s*interface\s+([A-Za-z][A-Za-z0-9]*)(?:\s+:\s*([^{]+)\s*)?/.exec(str);
+ var match = /^\s*(partial\s+)?interface\s+([A-Za-z][A-Za-z0-9]*)(?:\s+:\s*([^{]+)\s*)?/.exec(str);
if (match) {
- inf.id = match[1];
+ inf.partial = !!match[1];
+ inf.id = match[2];
inf.refId = this._id(inf.id);
- if (match[2]) inf.superclasses = match[2].split(/\s*,\s*/);
+ if (match[3]) inf.superclasses = match[3].split(/\s*,\s*/);
}
else {
error("Expected interface, got: " + str);
@@ -2379,7 +2380,9 @@
else if (obj.type == "interface") {
var str = "<span class='idlInterface' id='idl-def-" + obj.refId + "'>";
if (obj.extendedAttributes) str += this._idn(indent) + "[<span class='extAttr'>" + obj.extendedAttributes + "</span>]\n";
- str += this._idn(indent) + "interface <span class='idlInterfaceID'>" + obj.id + "</span>";
+ str += this._idn(indent);
+ if (obj.partial) str += "partial ";
+ str += "interface <span class='idlInterfaceID'>" + obj.id + "</span>";
if (obj.superclasses && obj.superclasses.length) str += " : " +
obj.superclasses.map(function (it) {
return "<span class='idlSuperclass'><a>" + it + "</a></span>"
Received on Wednesday, 7 September 2011 19:29:08 UTC