Updating those 2 lines would be the least of our problems if this value ever changes.
On Fri, Jul 17, 2020 at 12:33 PM Jan Mercl <[email protected]> wrote: > On Fri, Jul 17, 2020 at 11:23 AM Heisenberg <[email protected]> wrote: > > > > Constant definition in token.go: > > > > literalType = 0 << 30 > > > > The only use I see is: > > > > func (t token) literal() uint32 { return uint32(t - literalType) } > > func literalToken(literal uint32) token { return token(literalType + > literal) } > > > > > > I don't know what the purpose of this writing is. Is it okay to remove > literalType? > > No, it's a particular value of bitfield. That the value happens to be > zero does not matter. Written this way it's future-proof - would the > value need change to some other value. > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/CAA40n-Wg7%3DYBo6pkVWxEmfCq4VNzeydDUUZA%2BQN2cHEU6ohJuw%40mail.gmail.com > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAPKajN5-BBQe415-OYze07UbG7xE9naktUfgvM7vFH1Zyf5uNA%40mail.gmail.com.
