demangle.go
func (st *state) discriminator(a AST) AST {
	if len(st.str) == 0 || st.str[0] != '_' {
		return a
	}
	off := st.off
	st.advance(1)
	d := st.number()
	if d < 0 {
		st.failEarlier("invalid negative discriminator", st.off-off)
	}
	// We don't currently print out the discriminator, so we don't
	// save it.
	return a
}
func (st *state) discriminator(a AST) AST {
	if len(st.str) == 0 || st.str[0] != '_' {
		return a
	}
	off := st.off
	st.advance(1)
	d := st.number()
	if d < 0 {
		st.failEarlier("invalid negative discriminator", st.off-off)
	}
	// We don't currently print out the discriminator, so we don't
	// save it.
	return a
}
func ( st * state ) discriminator ( a AST ) AST { if len ( st . str ) == 0 || st . str [ 0 ] != '_' { return a } off := st . off st . advance ( 1 ) d := st . number ( ) if d < 0 { st . failEarlier ( " " , st . off - off ) } // We don't currently print out the discriminator, so we don't // save it. return a }
// <discriminator> ::= _ <(non-negative) number>
<discriminator > :: = _ < ( non - negative ) number >