X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fcom%2Fstevesoft%2Fpat%2FBackMatch.js;h=f3a2ea9229fd3e006e0eed6c02fb72fbb6df0eac;hp=018cdda6e57e6ff0e44ffd70a9be8619f2349ae8;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/com/stevesoft/pat/BackMatch.js b/site/j2s/com/stevesoft/pat/BackMatch.js index 018cdda..f3a2ea9 100644 --- a/site/j2s/com/stevesoft/pat/BackMatch.js +++ b/site/j2s/com/stevesoft/pat/BackMatch.js @@ -1,36 +1,36 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.BackMatch", null, function () { -c$ = Clazz.decorateAsClass (function () { -this.id = 0; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "BackMatch", com.stevesoft.pat.Pattern); -Clazz.makeConstructor (c$, -function (id) { -Clazz.superConstructor (this, com.stevesoft.pat.BackMatch, []); -this.id = id; -}, "~N"); -Clazz.overrideMethod (c$, "toString", -function () { -return "\\" + (this.id) + this.nextString (); -}); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, p) { -var i1 = p.marks[this.id]; -var i2 = p.marks[this.id + p.nMarks]; -var imax = i2 - i1; -if (i1 < 0 || imax < 0 || pos + imax > p.src.length ()) { -return -1; -}var ns = p.src.length () - pos; -if (imax < ns) { -ns = imax; -}for (var i = 0; i < ns; i++) { -if (p.src.charAt (i + i1) != p.src.charAt (pos + i)) { -return -1; -}} -return this.nextMatch (pos + imax, p); -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.BackMatch (this.id); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.BackMatch", null, function () { +c$ = Clazz.decorateAsClass (function () { +this.id = 0; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "BackMatch", com.stevesoft.pat.Pattern); +Clazz.makeConstructor (c$, +function (id) { +Clazz.superConstructor (this, com.stevesoft.pat.BackMatch, []); +this.id = id; +}, "~N"); +Clazz.overrideMethod (c$, "toString", +function () { +return "\\" + (this.id) + this.nextString (); +}); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, p) { +var i1 = p.marks[this.id]; +var i2 = p.marks[this.id + p.nMarks]; +var imax = i2 - i1; +if (i1 < 0 || imax < 0 || pos + imax > p.src.length ()) { +return -1; +}var ns = p.src.length () - pos; +if (imax < ns) { +ns = imax; +}for (var i = 0; i < ns; i++) { +if (p.src.charAt (i + i1) != p.src.charAt (pos + i)) { +return -1; +}} +return this.nextMatch (pos + imax, p); +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.BackMatch (this.id); +}, "java.util.Hashtable"); +});