Overview
Comment: | [build][core] colors for errors (draft) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | core | build |
Files: | files | file ages | folders |
SHA3-256: |
d614738660fb4ee6ca81738e8602ea89 |
User & Date: | olr on 2018-09-23 10:13:19 |
Other Links: | manifest | tags |
Context
2018-09-24
| ||
08:14 | [fr] nr: qu’en-dira-t-on, + faux positif: à l’arrache check-in: dffdca5554 user: olr tags: trunk, fr | |
2018-09-23
| ||
10:13 | [build][core] colors for errors (draft) check-in: d614738660 user: olr tags: trunk, core, build | |
2018-09-21
| ||
08:22 | [fr] règle: aussi +adj que >être check-in: 86b8eee060 user: olr tags: trunk, fr | |
Changes
Modified compile_rules.py from [dbd936143b] to [c923230bdf].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | + - + + + + - - - - - - + + + + + + + + + + + + + - | """ Grammalecte: compile rules """ import re import traceback import json import colorsys import compile_rules_js_convert as jsconv import compile_rules_graph as crg dDEF = {} lFUNCTIONS = [] aRULESET = set() # set of rule-ids to check if there is several rules with the same id nRULEWITHOUTNAME = 0 dJSREGEXES = {} sWORDLIMITLEFT = r"(?<![\w.,–-])" # r"(?<![-.,—])\b" seems slower sWORDLIMITRIGHT = r"(?![\w–-])" # r"\b(?!-—)" seems slower |
︙ | |||
415 416 417 418 419 420 421 | 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | - - + + - + | m = re.match("OPT/([a-z0-9]+):(.+)$", sLine) for i, sOpt in enumerate(m.group(2).split()): lOpt[i][1][m.group(1)] = eval(sOpt) elif sLine.startswith("OPTCOLORSOFTWARE:"): lOptColor = [ [s, {}] for s in sLine[17:].strip().split() ] # don’t use tuples (s, {}), because unknown to JS elif sLine.startswith("OPTCOLOR/"): m = re.match("OPTCOLOR/([a-z0-9]+):(.+)$", sLine) |
︙ |
Modified gc_core/js/lang_core/gc_options.js from [f47ea826e5] to [c30eb8d096].
︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | + + + + + + + + + + + + + + + | var gc_options = { getOptions: function (sContext="JavaScript") { if (this.dOpt.hasOwnProperty(sContext)) { return this.dOpt[sContext]; } return this.dOpt["JavaScript"]; }, getOptionsColors: function (sContext="JavaScript") { if (this.dOptColor.hasOwnProperty(sContext)) { return this.dOptColor[sContext]; } return this.dOptColor["JavaScript"]; }, lStructOpt: ${lStructOpt}, dOpt: { "JavaScript": new Map (${dOptJavaScript}), "Firefox": new Map (${dOptFirefox}), "Thunderbird": new Map (${dOptThunderbird}), }, dOptColor: { "JavaScript": new Map (${dOptColorJavaScript}), "Firefox": new Map (${dOptColorFirefox}), "Thunderbird": new Map (${dOptColorThunderbird}), }, dOptLabel: ${dOptLabel} } if (typeof(exports) !== 'undefined') { exports.getOptions = gc_options.getOptions; exports.getOptionsColors = gc_options.getOptionsColors; exports.lStructOpt = gc_options.lStructOpt; exports.dOpt = gc_options.dOpt; exports.dOptColor = gc_options.dOptColor; exports.dOptLabel = gc_options.dOptLabel; } |
Modified gc_core/py/lang_core/gc_options.py from [c84731594a] to [f5b1b8c491].
︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | + + + + + + + + + + + + | def getOptions (sContext="Python"): "returns dictionary of options" if sContext in dOpt: return dOpt[sContext] return dOpt["Python"] def getOptionsColors (sContext="Python"): "returns dictionary of options" if sContext in dOptColor: return dOptColor[sContext] return dOptColor["Python"] lStructOpt = ${lStructOpt} dOpt = { "Python": ${dOptPython}, "Server": ${dOptServer}, "Writer": ${dOptWriter} } dOptColor = { "Python": ${dOptColorPython}, "Server": ${dOptColorServer}, "Writer": ${dOptColorWriter} } _dOptLabel = ${dOptLabel} |