Overview
Comment: | [core] gc engine: fix several errors |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | core | rg |
Files: | files | file ages | folders |
SHA3-256: |
a80212d0a4446b6c678aa577defc899a |
User & Date: | olr on 2018-09-11 12:09:01 |
Original Comment: | [core] fix several errors |
Other Links: | branch diff | manifest | tags |
Context
2018-09-11
| ||
12:44 | [core] gc engine: fix several errors check-in: cf1d146f81 user: olr tags: core, rg | |
12:09 | [core] gc engine: fix several errors check-in: a80212d0a4 user: olr tags: core, rg | |
12:07 | [build] build tests file check-in: 84725dfa46 user: olr tags: build, rg | |
Changes
Modified gc_core/js/lang_core/gc_engine.js from [ad61c52045] to [c816ea9b43].
︙ | |||
193 194 195 196 197 198 199 | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | - + | s += "\n"; } return s; } parse (sText, sCountry="${country_default}", bDebug=false, dOptions=null, bContext=false) { // analyses the paragraph sText and returns list of errors |
︙ | |||
241 242 243 244 245 246 247 248 249 250 251 252 253 254 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | + | } return Array.from(this.dError.values()); } parseText (sText, sText0, bParagraph, nOffset, sCountry, dOptions, bDebug, bContext) { let bChange = false; let bIdRule = option('idrule'); let m; for (let [sOption, lRuleGroup] of gc_engine.getRules(bParagraph)) { if (sOption == "@@@@") { // graph rules if (!bParagraph && bChange) { this.update(sText, bDebug); bChange = false; |
︙ | |||
262 263 264 265 266 267 268 | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | - + - + - + | } } } else if (!sOption || option(sOption)) { for (let [zRegex, bUppercase, sLineId, sRuleId, nPriority, lActions, lGroups, lNegLookBefore] of lRuleGroup) { if (!_aIgnoredRules.has(sRuleId)) { while ((m = zRegex.gl_exec2(sText, lGroups, lNegLookBefore)) !== null) { |
︙ | |||
308 309 310 311 312 313 314 | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | - + | } else { if (cActionType == ">") { break; } } } catch (e) { |
︙ | |||
332 333 334 335 336 337 338 | 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | - - + + - - + + | } update (sSentence, bDebug=false) { // update <sSentence> and retokenize this.sSentence = sSentence; let lNewToken = Array.from(_oTokenizer.genTokens(sSentence, true)); for (let dToken of lNewToken) { |
︙ | |||
690 691 692 693 694 695 696 | 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 | - - + + | } } } return bChange; } _createErrorFromRegex (sText, sText0, sSugg, nOffset, m, iGroup, sLineId, sRuleId, bUppercase, sMsg, sURL, bShowRuleId, sOption, bContext) { |
︙ | |||
738 739 740 741 742 743 744 | 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 | - + | sMessage += " ## " + sLineId + " # " + sRuleId; } // return this._createError(nStart, nEnd, sLineId, sRuleId, sOption, sMessage, lSugg, sURL, bContext); } _createError (nStart, nEnd, sLineId, sRuleId, sOption, sMessage, lSugg, sURL, bContext) { |
︙ |