TmTheme and TmStyleMode are grammars

Bjolang 0.2.0 refuses #:tag on a union case: a grammar reads a quoted
literal now. The two unions are grammars of bare keywords, so
#:theme 'dark-plus and #:style 'classes read as before, and the types and
their cases keep their names.

🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-4-7)

Co-Authored-By: eca-agent <git@eca.dev>
This commit is contained in:
Linus Björnstam 2026-10-17 17:59:18 +02:00
parent 3f0cb62a21
commit 2096724cd4

View file

@ -156,31 +156,33 @@
;; --------------------------------------------------------------------------- ;; ---------------------------------------------------------------------------
;; VS Code's themes, the ones TextMateSharp carries: #:theme 'dark-plus. ;; VS Code's themes, the ones TextMateSharp carries: #:theme 'dark-plus.
(type (: TmTheme (Union (: ThemeDarkPlus #:tag dark-plus) (def/grammar TmTheme
(: ThemeLightPlus #:tag light-plus) (:or (: ThemeDarkPlus 'dark-plus)
(: ThemeDark #:tag dark) (: ThemeLightPlus 'light-plus)
(: ThemeLight #:tag light) (: ThemeDark 'dark)
(: ThemeMonokai #:tag monokai) (: ThemeLight 'light)
(: ThemeDimmedMonokai #:tag dimmed-monokai) (: ThemeMonokai 'monokai)
(: ThemeOneDark #:tag one-dark) (: ThemeDimmedMonokai 'dimmed-monokai)
(: ThemeAtomOneDark #:tag atom-one-dark) (: ThemeOneDark 'one-dark)
(: ThemeAtomOneLight #:tag atom-one-light) (: ThemeAtomOneDark 'atom-one-dark)
(: ThemeDracula #:tag dracula) (: ThemeAtomOneLight 'atom-one-light)
(: ThemeSolarizedDark #:tag solarized-dark) (: ThemeDracula 'dracula)
(: ThemeSolarizedLight #:tag solarized-light) (: ThemeSolarizedDark 'solarized-dark)
(: ThemeQuietLight #:tag quiet-light) (: ThemeSolarizedLight 'solarized-light)
(: ThemeKimbieDark #:tag kimbie-dark) (: ThemeQuietLight 'quiet-light)
(: ThemeTomorrowNightBlue #:tag tomorrow-night-blue) (: ThemeKimbieDark 'kimbie-dark)
(: ThemeAbyss #:tag abyss) (: ThemeTomorrowNightBlue 'tomorrow-night-blue)
(: ThemeRed #:tag red) (: ThemeAbyss 'abyss)
(: ThemeHighContrastDark #:tag high-contrast-dark) (: ThemeRed 'red)
(: ThemeHighContrastLight #:tag high-contrast-light) (: ThemeHighContrastDark 'high-contrast-dark)
(: ThemeVisualStudioDark #:tag visual-studio-dark) (: ThemeHighContrastLight 'high-contrast-light)
(: ThemeVisualStudioLight #:tag visual-studio-light)))) (: ThemeVisualStudioDark 'visual-studio-dark)
(: ThemeVisualStudioLight 'visual-studio-light)))
;; How a node is coloured: #:style 'inline or #:style 'classes. ;; How a node is coloured: #:style 'inline or #:style 'classes.
(type (: TmStyleMode (Union (: StyleInline #:tag inline) (def/grammar TmStyleMode
(: StyleClasses #:tag classes)))) (:or (: StyleInline 'inline)
(: StyleClasses 'classes)))
;; How a piece of text looks. None is the theme's own colour, which the pre ;; How a piece of text looks. None is the theme's own colour, which the pre
;; around the code already has. ;; around the code already has.