Overview
| Comment: | [core][js] don’t use const for modules as objects: const don’t allow to be “redefined” even in a condition which wouldn’t allow redefinition |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | core | warning | webext2 |
| Files: | files | file ages | folders |
| SHA3-256: |
dfc3a68fbf1c834824dbd45580647c08 |
| User & Date: | olr on 2017-08-03 10:12:37 |
| Other Links: | branch diff | manifest | tags |
Context
|
2017-08-03
| ||
| 11:06 | [core][js] gc_engine initialization check-in: 4de2209cf9 user: olr tags: core, webext2 | |
| 10:12 | [core][js] don’t use const for modules as objects: const don’t allow to be “redefined” even in a condition which wouldn’t allow redefinition check-in: dfc3a68fbf user: olr tags: core, warning, webext2 | |
| 10:04 | [core][js] ibdawg initialization check-in: 3d1c080fa8 user: olr tags: core, webext2 | |
Changes
Modified gc_core/js/lang_core/gc_engine.js from [3c4bc79cac] to [b8c30b3776].
| ︙ | ︙ | |||
30 31 32 33 34 35 36 | let _sAppContext = ""; // what software is running let _dOptions = null; let _aIgnoredRules = new Set(); let _oDict = null; let _dAnalyses = new Map(); // cache for data from dictionary | | | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
let _sAppContext = ""; // what software is running
let _dOptions = null;
let _aIgnoredRules = new Set();
let _oDict = null;
let _dAnalyses = new Map(); // cache for data from dictionary
var gc_engine = {
//// Informations
lang: "${lang}",
locales: ${loc},
pkg: "${implname}",
name: "${name}",
|
| ︙ | ︙ |
Modified gc_core/js/lang_core/gc_options.js from [0ccaf067f3] to [ba36100a98].
1 2 3 4 5 |
// Options for Grammalecte
${map}
| | | 1 2 3 4 5 6 7 8 9 10 11 12 13 |
// Options for Grammalecte
${map}
var gc_options = {
getOptions: function (sContext="JavaScript") {
if (this.dOpt.hasOwnProperty(sContext)) {
return this.dOpt[sContext];
}
return this.dOpt["JavaScript"];
},
|
| ︙ | ︙ |
Modified gc_core/js/lang_core/gc_rules.js from [b235fdd2ed] to [02fc1d6f94].
1 2 3 4 5 6 |
// Grammar checker rules
"use strict";
${string}
${regex}
| | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
// Grammar checker rules
"use strict";
${string}
${regex}
var gc_rules = {
lParagraphRules: ${paragraph_rules_JS},
lSentenceRules: ${sentence_rules_JS}
}
if (typeof(exports) !== 'undefined') {
|
| ︙ | ︙ |
Modified gc_core/js/text.js from [2c268f1b5e] to [03f872e8ba].
1 2 3 4 5 6 7 8 9 10 |
// JavaScript
"use strict";
if (typeof(exports) !== 'undefined') {
var helpers = require("resource://grammalecte/helpers.js");
}
| | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
// JavaScript
"use strict";
if (typeof(exports) !== 'undefined') {
var helpers = require("resource://grammalecte/helpers.js");
}
var text = {
getParagraph: function* (sText) {
// generator: returns paragraphs of text
let iStart = 0;
let iEnd = 0;
sText = sText.replace("\r", "");
while ((iEnd = sText.indexOf("\n", iStart)) !== -1) {
yield sText.slice(iStart, iEnd);
|
| ︙ | ︙ |
Modified gc_lang/fr/modules-js/conj.js from [3dc81e8a3f] to [5d3a577c36].
1 2 3 4 5 6 7 8 |
// Grammalecte - Conjugueur
// License: GPL 3
"use strict";
${map}
| | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
// Grammalecte - Conjugueur
// License: GPL 3
"use strict";
${map}
var conj = {
_lVtyp: [],
_lTags: [],
_dPatternConj: {},
_dVerb: {},
init: function (sJSONData) {
try {
|
| ︙ | ︙ |
Modified gc_lang/fr/modules-js/lexicographe.js from [8f5fca9732] to [cfbfcc7fa9].
1 2 3 4 5 6 7 8 9 10 |
// Grammalecte - Lexicographe
// License: MPL 2
"use strict";
${string}
${map}
if (typeof(exports) !== 'undefined') {
| | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
// Grammalecte - Lexicographe
// License: MPL 2
"use strict";
${string}
${map}
if (typeof(exports) !== 'undefined') {
var helpers = require("resource://grammalecte/helpers.js");
}
const _dTAGS = new Map ([
[':G', "[mot grammatical]"],
[':N', " nom,"],
[':A', " adjectif,"],
[':M1', " prénom,"],
|
| ︙ | ︙ |
Modified gc_lang/fr/modules-js/mfsp.js from [33bc239621] to [75f345b054].
1 2 3 4 5 6 7 8 9 10 |
// Grammalecte
"use strict";
if (typeof(require) !== 'undefined') {
var helpers = require("resource://grammalecte/helpers.js");
}
| | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
// Grammalecte
"use strict";
if (typeof(require) !== 'undefined') {
var helpers = require("resource://grammalecte/helpers.js");
}
var mfsp = {
// list of affix codes
_lTagMiscPlur: [],
_lTagMasForm: [],
// dictionary of words with uncommon plurals (-x, -ux, english, latin and italian plurals) and tags to generate them
_dMiscPlur: {},
// dictionary of feminine forms and tags to generate masculine forms (singular and plural)
_dMasForm: {},
|
| ︙ | ︙ |
Modified gc_lang/fr/modules-js/phonet.js from [828ddc2ac6] to [5cab447d24].
1 2 3 4 5 6 7 |
// Grammalecte - Suggestion phonétique
if (typeof(require) !== 'undefined') {
var helpers = require("resource://grammalecte/helpers.js");
}
| | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
// Grammalecte - Suggestion phonétique
if (typeof(require) !== 'undefined') {
var helpers = require("resource://grammalecte/helpers.js");
}
var phonet = {
_dWord: {},
_lSet: [],
_dMorph: {},
init: function (sJSONData) {
try {
let _oData = JSON.parse(sJSONData);
|
| ︙ | ︙ |