Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add syntax support for toolchain directive
So that this directive can be highlighted in `go.mod` There's not much detail for the syntax of this directive in the grammar file[1] so this implementation is based on the document linked there, specifically[2] and glancing at some code[3]. For example support includes versions like * go1.21.3 * go1.20 * go1.21rc4 * go1.12.3-somesuffix * go1.21rc4-somesuffix more stuff But excludes e.g.: * go1.20.3rc4 * go1.20abc The highlight groups this syntax is linked to just follows what is done for `gomodGoVersion` [1] https://go.dev/ref/mod#go-mod-file-toolchain [2] https://go.dev/doc/toolchain#version [3] https://go.googlesource.com/go/+/165383381199de6632665f43561e8e0dfc96f067/src/cmd/go/internal/gover/toolchain.go#24
- Loading branch information