blob: 7117b54b190a562f1f84329090075f9d6a9c6ab5 [file] [edit]
import Lean.Data.Lsp.LanguageFeatures
/-!
The hand-written `names` arrays of `SemanticTokenType` and `SemanticTokenModifier` and the
`SemanticTokenModifier.all` array agree with the constructor order and the JSON encoding.
-/
open Lean Lsp
set_option trustEvalAsAxioms true
example {v : SemanticTokenType} : open SemanticTokenType in
names[v.toNat]?.map (toString <| toJson ·) = some (toString <| toJson v) := by
cases v <;> native_decide
example {v : SemanticTokenModifier} : open SemanticTokenModifier in
names[v.toNat]?.map (toString <| toJson ·) = some (toString <| toJson v) := by
cases v <;> native_decide
example : SemanticTokenModifier.all.map (·.toNat) = Array.range SemanticTokenModifier.names.size := by
native_decide