[go-nuts] How to add a new operator
Hello, I want to try adding a new operator. Tell me, in which packages you need to edit the code? Maybe once a similar question was discussed, then please give a link -- 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.
Re: [go-nuts] How to add a new operator
define operator. -wgr On Sun, Dec 9, 2018, 10:27 AM Claygod wrote: > Hello, > > I want to try adding a new operator. Tell me, in which packages you need > to edit the code? > Maybe once a similar question was discussed, then please give a link > > -- > 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. > -- 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.
Re: [go-nuts] How to add a new operator
What do you mean by "-wgr" воскресенье, 9 декабря 2018 г., 18:31:11 UTC+3 пользователь Wagner Riffel написал: > > define operator. > -wgr > > On Sun, Dec 9, 2018, 10:27 AM Claygod > > wrote: > >> Hello, >> >> I want to try adding a new operator. Tell me, in which packages you need >> to edit the code? >> Maybe once a similar question was discussed, then please give a link >> >> -- >> 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...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > -- 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.
Re: [go-nuts] How to add a new operator
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.
Re: [go-nuts] How to add a new operator
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.
Re: [go-nuts] How to add a new operator
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.