text/x-go
*.go
//
/*
*/
\\( # leading backslash
[\\\"\'nrbtfav\?] | # escaped character
[0-7]{3} | # three octal digits
x[0-9A-Fa-f]{2} | # 'x' followed by two hex digits
u[0-9A-Fa-f]{4} | # Little Unicode escape, 'u' followed by four hex digits
U[0-9A-Fa-f]{8} # Big Unicode escape, 'U' followed by eight hex digits
)
0[Oo]?(_?[0-7])+
(0|[1-9](_?[0-9])*)
0[Bb](_?[01])+
0[Xx](_?[0-9A-Fa-f])+
\%\%|\%
[#0\-\ \+]* # flags
(?:[1-9][0-9]*|\[[1-9][0-9]*\]\*)? # width
(?:\.(?:[0-9]+|\[[1-9][0-9]*\]\*))? # precision
(\[[1-9][0-9]*\])?[vTtbcdoOqxXUeEfFgGsp] # conversion specifier
"
"
\%{escaped-character}
`
`
'(\%{escaped-character}|.)'
((\.[0-9](_?[0-9])* | [0-9](_?[0-9])*\.[0-9]?(_?[0-9])*) ([Ee][+-]?[0-9](_?[0-9])*)? |
([0-9](_?[0-9])*[Ee][+-]?[0-9](_?[0-9])*) |
0[Xx]_?(\.[0-9A-Fa-f](_?[0-9A-Fa-f])* | [0-9A-Fa-f](_?[0-9A-Fa-f])*\.?([0-9A-Fa-f](_?[0-9A-Fa-f])*)?)[Pp][+-]?[0-9](_?[0-9])*
)
(?<![\w\.])(\%{float}|\%{oct}|\%{bin}|\%{hex}|\[0-9]+)[i]\b
(?<![\w\.])\%{float}(?![\w\.])
(?<![\w\.])
\%{hex}
(?![\w\.])
(?<![\w\.])
\%{bin}
(?![\w\.])
(?<![\w\.])
0[xX][a-fA-F0-9]*[ghj-zGHJ-Z][a-zA-Z0-9]*
(?![\w\.])
(?<![\w\.])
\%{oct}
(?![\w\.])
(?<![\w\.])
0[Oo]?[0-7]*[89][0-9]*
(?![\w\.])
(?<![\w\.])
\%{dec}
(?![\w\.])
(?<![\w\.])
(true|false)
(?![\w\.])
import
package
break
case
const
continue
default
defer
else
fallthrough
for
func
go
goto
if
interface
range
return
select
struct
switch
type
var
bool
byte
chan
complex64
complex128
error
float32
float64
func
int
int8
int16
int32
int64
map
rune
string
uint
uint8
uint16
uint32
uint64
uintptr
iota
nil
append
cap
close
complex
copy
delete
imag
len
make
new
panic
real
recover