Grammalecte  Check-in [aea18de06f]

Overview
Comment:[core] don’t print if not in debug mode
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | core
Files: files | file ages | folders
SHA3-256: aea18de06fbe7e410893035b34b546247d242d1604ebfda4b815024d79a64311
User & Date: olr on 2019-08-20 10:24:57
Other Links: manifest | tags
Context
2019-08-20
10:34
[core][fr] update readme check-in: 921b4fbc70 user: olr tags: trunk, fr, core
10:24
[core] don’t print if not in debug mode check-in: aea18de06f user: olr tags: trunk, core
10:22
[fr] faux positifs et ajustements check-in: f6bc813e54 user: olr tags: trunk, fr
Changes

Modified gc_core/js/lang_core/gc_engine.js from [374de14e39] to [4f26fdbb38].

931
932
933
934
935
936
937

938

939
940
941
942
943
944
945
                }
                this.lToken[nTokenRewriteStart]["sNewValue"] = sWhat;
            }
            else {
                // several tokens
                let lTokenValue = sWhat.split("|");
                if (lTokenValue.length != (nTokenRewriteEnd - nTokenRewriteStart + 1)) {

                    console.log("Error. Text processor: number of replacements != number of tokens.");

                    return;
                }
                let j = 0;
                for (let i = nTokenRewriteStart;  i <= nTokenRewriteEnd;  i++) {
                    let sValue = lTokenValue[j];
                    if (!sValue || sValue === "*") {
                        this.lToken[i]["bToRemove"] = true;







>
|
>







931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
                }
                this.lToken[nTokenRewriteStart]["sNewValue"] = sWhat;
            }
            else {
                // several tokens
                let lTokenValue = sWhat.split("|");
                if (lTokenValue.length != (nTokenRewriteEnd - nTokenRewriteStart + 1)) {
                    if (bDebug) {
                        console.log("Error. Text processor: number of replacements != number of tokens.");
                    }
                    return;
                }
                let j = 0;
                for (let i = nTokenRewriteStart;  i <= nTokenRewriteEnd;  i++) {
                    let sValue = lTokenValue[j];
                    if (!sValue || sValue === "*") {
                        this.lToken[i]["bToRemove"] = true;

Modified gc_core/py/lang_core/gc_engine.py from [4e48beeec8] to [259ba70a2c].

808
809
810
811
812
813
814

815
816
817
818
819
820
821
822
                if bUppercase:
                    sWhat = sWhat[0:1].upper() + sWhat[1:]
                self.lToken[nTokenRewriteStart]["sNewValue"] = sWhat
            else:
                # several tokens
                lTokenValue = sWhat.split("|")
                if len(lTokenValue) != (nTokenRewriteEnd - nTokenRewriteStart + 1):

                    echo("Error. Text processor: number of replacements != number of tokens.")
                    return
                for i, sValue in zip(range(nTokenRewriteStart, nTokenRewriteEnd+1), lTokenValue):
                    if not sValue or sValue == "*":
                        self.lToken[i]["bToRemove"] = True
                    else:
                        if bUppercase:
                            sValue = sValue[0:1].upper() + sValue[1:]







>
|







808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
                if bUppercase:
                    sWhat = sWhat[0:1].upper() + sWhat[1:]
                self.lToken[nTokenRewriteStart]["sNewValue"] = sWhat
            else:
                # several tokens
                lTokenValue = sWhat.split("|")
                if len(lTokenValue) != (nTokenRewriteEnd - nTokenRewriteStart + 1):
                    if (bDebug):
                        echo("Error. Text processor: number of replacements != number of tokens.")
                    return
                for i, sValue in zip(range(nTokenRewriteStart, nTokenRewriteEnd+1), lTokenValue):
                    if not sValue or sValue == "*":
                        self.lToken[i]["bToRemove"] = True
                    else:
                        if bUppercase:
                            sValue = sValue[0:1].upper() + sValue[1:]