Grammalecte  Check-in [acb9d9f53e]

Overview
Comment:[core][js] gc engine: fix define_from
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core | rg
Files: files | file ages | folders
SHA3-256: acb9d9f53ebaf720d1195f68e2ac3dc5949fa627cdbf307e18965528e7ad34e7
User & Date: olr on 2018-09-18 06:42:10
Other Links: branch diff | manifest | tags
Context
2018-09-18
06:42
[fr] ocr: suggestion mémo -> même check-in: 0c98f02962 user: olr tags: fr, rg
06:42
[core][js] gc engine: fix define_from check-in: acb9d9f53e user: olr tags: core, rg
2018-09-17
15:52
[core][js] gc engine: fix assignation to dErrorPriority check-in: b26ca44482 user: olr tags: core, rg
Changes

Modified gc_core/js/lang_core/gc_engine.js from [11104a6fa0] to [10319254e1].

1356
1357
1358
1359
1360
1361
1362

1363
1364

1365
1366
1367

1368
1369
1370
1371
1372
1373
1374
1356
1357
1358
1359
1360
1361
1362
1363
1364

1365


1366
1367
1368
1369
1370
1371
1372
1373
1374







+

-
+
-
-

+







function g_define (dToken, lMorph) {
    // set morphologies of <dToken>, always return true
    dToken["lMorph"] = lMorph;
    return true;
}

function g_define_from (dToken, nLeft=null, nRight=null) {
    let sValue = dToken["sValue"];
    if (nLeft !== null) {
        dToken["lMorph"] = _oSpellChecker.getMorph(dToken["sValue"].slice(nLeft, nRight));
        sValue = (nRight !== null) ? sValue.slice(nLeft, nRight) : sValue.slice(nLeft);
    } else {
        dToken["lMorph"] = _oSpellChecker.getMorph(dToken["sValue"]);
    }
    dToken["lMorph"] = _oSpellChecker.getMorph(sValue);
    return true;
}


//////// GRAMMAR CHECKER PLUGINS

${pluginsJS}