diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-08 06:25:48 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-08 06:25:48 -0500 |
| commit | 759cb702e76c789949f351e17768541586377006 (patch) | |
| tree | 0e9cb3dbefac62281b222759bca97152cc1ac9de /scripts/theme-selector/generate.py | |
| parent | 768c5d6a54adf87c124bdf7d754437261a0c3d23 (diff) | |
| download | dotemacs-759cb702e76c789949f351e17768541586377006.tar.gz dotemacs-759cb702e76c789949f351e17768541586377006.zip | |
feat(theme-selector): split C and C++ code samples, add Java
The combined C/C++ preview is now a dedicated C sample and a dedicated C++ sample, plus a new Java sample. Each is tokenized to exercise every syntax category the language actually has: C++ hits all 19 (including [[nodiscard]] attributes, a std::regex raw string, and a Doxygen doc comment); C hits 18 (no regex literal exists in C); Java hits 17 (no preprocessor and no global builtins). C also gained a doc comment and a __attribute__ decorator over the old combined sample.
Diffstat (limited to 'scripts/theme-selector/generate.py')
| -rw-r--r-- | scripts/theme-selector/generate.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/theme-selector/generate.py b/scripts/theme-selector/generate.py index 167fc7c6..269ee039 100644 --- a/scripts/theme-selector/generate.py +++ b/scripts/theme-selector/generate.py @@ -3,7 +3,7 @@ HERE=os.path.dirname(os.path.abspath(__file__)) ns={} src=open(os.path.join(HERE,'samples.py')).read() exec(src[:src.index('cols=')], ns) -SAMPLES={"Elisp":ns['ELS'],"Go":ns['GOS'],"Python":ns['PYS'],"TypeScript":ns['TSS'],"Shell":ns['SHS'],"C/C++":ns['CS']} +SAMPLES={"Elisp":ns['ELS'],"Go":ns['GOS'],"Python":ns['PYS'],"TypeScript":ns['TSS'],"Java":ns['JAS'],"C":ns['CS'],"C++":ns['CPS'],"Shell":ns['SHS']} COLS=ns['COLS'] MAP={k:v[0] for k,v in COLS.items()}; BOLD={k:v[1] for k,v in COLS.items()}; MAP['str']='#5d9b86'; MAP['bg']='#000000' PALETTE=[["#67809c","blue"],["#e8bd30","gold"],["#9b5fd0","regal"],["#2ba178","emerald"],["#5d9b86","sage"], |
