From 8d04e7e2f10aad0b8c107de6ad3184081c1a508d Mon Sep 17 00:00:00 2001 From: Frederik Kvartborg Albertsen Date: Thu, 14 Nov 2024 02:32:04 +0100 Subject: [PATCH] add any as a builtin type for go (#1021) Thanks for this awesome go module. I have noticed that the builtin `any` type in Go isn't highlighted, so i have added it in this PR. :) --- lexers/go.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lexers/go.go b/lexers/go.go index a9849d69f..60b1f7119 100644 --- a/lexers/go.go +++ b/lexers/go.go @@ -38,7 +38,7 @@ func goRules() Rules { {Words(``, `\b`, `break`, `default`, `select`, `case`, `defer`, `go`, `else`, `goto`, `switch`, `fallthrough`, `if`, `range`, `continue`, `for`, `return`), Keyword, nil}, {`(true|false|iota|nil)\b`, KeywordConstant, nil}, {Words(``, `\b(\()`, `uint`, `uint8`, `uint16`, `uint32`, `uint64`, `int`, `int8`, `int16`, `int32`, `int64`, `float`, `float32`, `float64`, `complex64`, `complex128`, `byte`, `rune`, `string`, `bool`, `error`, `uintptr`, `print`, `println`, `panic`, `recover`, `close`, `complex`, `real`, `imag`, `len`, `cap`, `append`, `copy`, `delete`, `new`, `make`, `clear`, `min`, `max`), ByGroups(NameBuiltin, Punctuation), nil}, - {Words(``, `\b`, `uint`, `uint8`, `uint16`, `uint32`, `uint64`, `int`, `int8`, `int16`, `int32`, `int64`, `float`, `float32`, `float64`, `complex64`, `complex128`, `byte`, `rune`, `string`, `bool`, `error`, `uintptr`), KeywordType, nil}, + {Words(``, `\b`, `uint`, `uint8`, `uint16`, `uint32`, `uint64`, `int`, `int8`, `int16`, `int32`, `int64`, `float`, `float32`, `float64`, `complex64`, `complex128`, `byte`, `rune`, `string`, `bool`, `error`, `uintptr`, `any`), KeywordType, nil}, {`\d+i`, LiteralNumber, nil}, {`\d+\.\d*([Ee][-+]\d+)?i`, LiteralNumber, nil}, {`\.\d+([Ee][-+]\d+)?i`, LiteralNumber, nil},