Ident returns the identifier associated with the constant expression.
()
| 142 | |
| 143 | // Ident returns the identifier associated with the constant expression. |
| 144 | func (e *ExprSub) Ident() string { |
| 145 | // 'sub' OverflowFlags=OverflowFlag* '(' X=TypeConst ',' Y=TypeConst ')' |
| 146 | buf := &strings.Builder{} |
| 147 | buf.WriteString("sub") |
| 148 | for _, flag := range e.OverflowFlags { |
| 149 | fmt.Fprintf(buf, " %s", flag) |
| 150 | } |
| 151 | fmt.Fprintf(buf, " (%s, %s)", e.X, e.Y) |
| 152 | return buf.String() |
| 153 | } |
| 154 | |
| 155 | // ~~~ [ fsub ] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 156 |