Grammalecte  Check-in [af3808d001]

Overview
Comment:[core][js] gc_options and gc_rules as objects
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core | webext2
Files: files | file ages | folders
SHA3-256: af3808d0013c4c7821785d07847baa44172b4f5040f762e1ac1c1a25eb20f641
User & Date: olr on 2017-08-01 08:32:23
Other Links: branch diff | manifest | tags
Context
2017-08-01
09:44
[core][js] gc_engine as object check-in: 2163dd1535 user: olr tags: core, webext2
08:32
[core][js] gc_options and gc_rules as objects check-in: af3808d001 user: olr tags: core, webext2
07:58
[core][js] conj as object check-in: c4723b20d5 user: olr tags: core, webext2
Changes

Modified gc_core/js/lang_core/gc_options.js from [6e45d077d4] to [0ccaf067f3].

1
2
3
4


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

23
24
25

26
27
// Options for Grammalecte

${map}



function getOptions (sContext="JavaScript") {
    if (dOpt.hasOwnProperty(sContext)) {
        return dOpt[sContext];
    }
    return dOpt["JavaScript"];
}

const lStructOpt = ${lStructOpt};

const dOpt = {
    "JavaScript": new Map (${dOptJavaScript}),
    "Firefox": new Map (${dOptFirefox}),
    "Thunderbird": new Map (${dOptThunderbird}),
}

const dOptLabel = ${dOptLabel};



if (typeof(exports) !== 'undefined') {
	exports.getOptions = getOptions;
	exports.lStructOpt = lStructOpt;

	exports.dOptLabel = dOptLabel;
}




>
>
|
|
|
|
|
|

|

|
|
|
|
|

|
|

>

|
|
>
|

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Options for Grammalecte

${map}


const gc_options = {
    getOptions: function (sContext="JavaScript") {
        if (this.dOpt.hasOwnProperty(sContext)) {
            return this.dOpt[sContext];
        }
        return this.dOpt["JavaScript"];
    },

    lStructOpt: ${lStructOpt},

    dOpt: {
        "JavaScript": new Map (${dOptJavaScript}),
        "Firefox": new Map (${dOptFirefox}),
        "Thunderbird": new Map (${dOptThunderbird}),
    },

    dOptLabel: ${dOptLabel}
}


if (typeof(exports) !== 'undefined') {
	exports.getOptions = gc_options.getOptions;
	exports.lStructOpt = gc_options.lStructOpt;
    exports.dOpt = gc_options.dOpt;
	exports.dOptLabel = gc_options.dOptLabel;
}

Modified gc_core/js/lang_core/gc_rules.js from [03bc540fb7] to [b235fdd2ed].

1
2
3
4
5
6

7
8
9

10
11
12
13
14
15
// Grammar checker rules
"use strict";

${string}
${regex}


const lParagraphRules = ${paragraph_rules_JS};

const lSentenceRules = ${sentence_rules_JS};



if (typeof(exports) !== 'undefined') {
	exports.lParagraphRules = lParagraphRules;
	exports.lSentenceRules = lSentenceRules;
}






>
|

|
>



|
|

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Grammar checker rules
"use strict";

${string}
${regex}

const gc_rules = {
    lParagraphRules: ${paragraph_rules_JS},

    lSentenceRules: ${sentence_rules_JS}
}


if (typeof(exports) !== 'undefined') {
    exports.lParagraphRules = gc_rules.lParagraphRules;
    exports.lSentenceRules = gc_rules.lSentenceRules;
}