Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / com / stevesoft / pat / rep7105261142040055236.tmp
1 Clazz.declarePackage ("com.stevesoft.pat");
2 Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.TransPat", ["com.stevesoft.pat.Regex"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.ra = null;
5 this.ra_len = 0;
6 this.pn = -1;
7 this.lastMatchedTo = -1;
8 Clazz.instantialize (this, arguments);
9 }, com.stevesoft.pat, "TransPat", com.stevesoft.pat.Pattern);
10 Clazz.prepareFields (c$, function () {
11 this.ra =  new Array (10);
12 });
13 Clazz.overrideMethod (c$, "toString", 
14 function () {
15 return "(?#TransPat)";
16 });
17 Clazz.makeConstructor (c$, 
18 function () {
19 Clazz.superConstructor (this, com.stevesoft.pat.TransPat, []);
20 });
21 Clazz.defineMethod (c$, "matchInternal", 
22 function (pos, pt) {
23 for (var i = 0; i < this.ra_len; i++) {
24 pt.ignoreCase = this.ra[i].ignoreCase;
25 pt.mFlag = this.ra[i].mFlag;
26 pt.dotDoesntMatchCR = com.stevesoft.pat.Regex.dotDoesntMatchCR;
27 var r = this.ra[i].thePattern.matchInternal (pos, pt);
28 if (r >= 0) {
29 this.pn = i;
30 return r;
31 }}
32 this.pn = -1;
33 return -1;
34 }, "~N,com.stevesoft.pat.Pthings");
35 });