In order to see where the "expected operand" syntax error is coming from (it could be many places), add a panic at the top of the error handling parser methods in go/src/cmd/compile/internal/syntax/parser.go's error handling routines, which may be called variously parser.error(), parser.syntaxErrorAt(), parser.errorAt(), parser.error_at(), or parser.syntaxError(), or errorExpected() depending on your Go version. The panic will give you a stack trace, and you can go from there. e.g.
func (p *parser) error_at(pos src.Pos, msg string) { // for go1.9.7, this is line 112 of parser.go panic("claygod's custom debug statement: error_at where??") // add this line ... On Sunday, December 9, 2018 at 1:24:55 PM UTC-6, Claygod wrote: > > This is how I do it (and go/src/cmd/compile/internal/gc) , but I still get > errors "expected operand" . > I would like a little more details from those who have already done this. > > воскресенье, 9 декабря 2018 г., 19:48:58 UTC+3 пользователь Aram > Hăvărneanu написал: >> >> Start with go/src/cmd/compile/internal/syntax and go from there. >> >> -- >> Aram Hăvărneanu >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.