Grammalecte  Check-in [36ac4eb1e0]

Overview
Comment:[core][js] gc engine: fix syntax errors
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core | rg
Files: files | file ages | folders
SHA3-256: 36ac4eb1e05e4afbe9abb9e26bff75ec3996ee96fcc198fca9bcc8c9da3c9c36
User & Date: olr on 2018-09-10 14:49:41
Other Links: branch diff | manifest | tags
Context
2018-09-10
14:50
[build] update slices conversion to JS check-in: aa2c423edb user: olr tags: build, rg
14:49
[core][js] gc engine: fix syntax errors check-in: 36ac4eb1e0 user: olr tags: core, rg
13:00
[core][js] gc engine: fix syntax errors check-in: 516c08196b user: olr tags: core, rg
Changes

Modified gc_core/js/lang_core/gc_engine.js from [47e7686c16] to [a0b79dbb13].

1059
1060
1061
1062
1063
1064
1065

1066
1067
1068
1069
1070
1071
1072
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073







+







        if (sNegPattern === "*") {
            // all morph must match sPattern
            return lMorph.every(sMorph  =>  (sMorph.search(sPattern) !== -1));
        }
        else {
            if (lMorph.some(sMorph  =>  (sMorph.search(sNegPattern) !== -1))) {
                return false;
            }
        }
    }
    // search sPattern
    return lMorph.some(sMorph  =>  (sMorph.search(sPattern) !== -1));
}

function analyse (sWord, sPattern, sNegPattern) {
1080
1081
1082
1083
1084
1085
1086

1087
1088
1089
1090
1091
1092
1093
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095







+







        if (sNegPattern === "*") {
            // all morph must match sPattern
            return lMorph.every(sMorph  =>  (sMorph.search(sPattern) !== -1));
        }
        else {
            if (lMorph.some(sMorph  =>  (sMorph.search(sNegPattern) !== -1))) {
                return false;
            }
        }
    }
    // search sPattern
    return lMorph.some(sMorph  =>  (sMorph.search(sPattern) !== -1));
}


1368
1369
1370
1371
1372
1373
1374

1375
1376




1377
1378
1379
1380
1381
1382
1383
1370
1371
1372
1373
1374
1375
1376
1377


1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388







+
-
-
+
+
+
+







//////// GRAMMAR CHECKER PLUGINS

${pluginsJS}


// generated code, do not edit
const oEvalFunc = {
    // callables for regex rules
    ${callablesJS}
    ${graph_callablesJS}
${callablesJS}

    // callables for graph rules
${graph_callablesJS}
}


if (typeof(exports) !== 'undefined') {
    exports.lang = gc_engine.lang;
    exports.locales = gc_engine.locales;
    exports.pkg = gc_engine.pkg;