AlanQuatermain / go-tmbundle

A TextMate bundle for the Go programming language.
http://alanquatermain.net/
Other
127 stars 40 forks source link

Function declarations (missing body) break highlighting for following code #64

Open mmcloughlin opened 6 years ago

mmcloughlin commented 6 years ago

Illustrating with function highlighting in Github (which uses this package)

// A does not have a function body (implemented in assembly for example).
func A() int

// B is not highlighted correctly.
func B(a, b int) int { return a+b }
lamg commented 5 years ago

The problem seems to be in some cases of functions signatures

type a func() (int, error)
type b func()
type c struct {}

It works when there is only one return value

type a func() int
type b func()