Ident returns the identifier associated with the constant expression.
()
| 50 | |
| 51 | // Ident returns the identifier associated with the constant expression. |
| 52 | func (e *ExprAdd) Ident() string { |
| 53 | // 'add' OverflowFlags=OverflowFlag* '(' X=TypeConst ',' Y=TypeConst ')' |
| 54 | buf := &strings.Builder{} |
| 55 | buf.WriteString("add") |
| 56 | for _, flag := range e.OverflowFlags { |
| 57 | fmt.Fprintf(buf, " %s", flag) |
| 58 | } |
| 59 | fmt.Fprintf(buf, " (%s, %s)", e.X, e.Y) |
| 60 | return buf.String() |
| 61 | } |
| 62 | |
| 63 | // ~~~ [ fadd ] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 64 |