74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
if (i % 1000 === 0) {
yield i.toString();
}
}
bShowUntested = true;
}
catch (e) {
helpers.logerror(e);
}
if (bShowUntested) {
i = 0;
for (let [sOpt, sLineId, sRuleId] of this.gce.listRules()) {
if (!this._aRuleTested.has(sLineId) && !/^[0-9]+[sp]$|^[pd]_/.test(sRuleId)) {
sUntestedRules += sRuleId + ", ";
|
|
|
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
if (i % 1000 === 0) {
yield i.toString();
}
}
bShowUntested = true;
}
catch (e) {
console.error(e);
}
if (bShowUntested) {
i = 0;
for (let [sOpt, sLineId, sRuleId] of this.gce.listRules()) {
if (!this._aRuleTested.has(sLineId) && !/^[0-9]+[sp]$|^[pd]_/.test(sRuleId)) {
sUntestedRules += sRuleId + ", ";
|
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
console.log("\ninfinite loop?\nline:"+sLine+"\nm: "+ m.toString());
break;
}
}
return sRes;
}
catch (e) {
helpers.logerror(e);
}
return " ".repeat(sLine.length);
}
_getFoundErrors (sLine, bDebug, sOption) {
try {
let aErrs = [];
|
|
|
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
console.log("\ninfinite loop?\nline:"+sLine+"\nm: "+ m.toString());
break;
}
}
return sRes;
}
catch (e) {
console.error(e);
}
return " ".repeat(sLine.length);
}
_getFoundErrors (sLine, bDebug, sOption) {
try {
let aErrs = [];
|
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
sRes = sRes.slice(0, dErr["nStart"]) + "~".repeat(dErr["nEnd"] - dErr["nStart"]) + sRes.slice(dErr["nEnd"]);
sListErr += " * {" + dErr['sLineId'] + " / " + dErr['sRuleId'] + "} at " + dErr['nStart'] + ":" + dErr['nEnd'] + "\n";
this._aRuleTested.add(dErr["sLineId"]);
}
return [sRes, sListErr];
}
catch (e) {
helpers.logerror(e);
}
return [" ".repeat(sLine.length), ""];
}
}
if (typeof(exports) !== 'undefined') {
exports.TestGrammarChecking = TestGrammarChecking;
}
|
|
|
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
sRes = sRes.slice(0, dErr["nStart"]) + "~".repeat(dErr["nEnd"] - dErr["nStart"]) + sRes.slice(dErr["nEnd"]);
sListErr += " * {" + dErr['sLineId'] + " / " + dErr['sRuleId'] + "} at " + dErr['nStart'] + ":" + dErr['nEnd'] + "\n";
this._aRuleTested.add(dErr["sLineId"]);
}
return [sRes, sListErr];
}
catch (e) {
console.error(e);
}
return [" ".repeat(sLine.length), ""];
}
}
if (typeof(exports) !== 'undefined') {
exports.TestGrammarChecking = TestGrammarChecking;
}
|