| 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 |