Ident returns the identifier associated with the constant.
()
| 49 | |
| 50 | // Ident returns the identifier associated with the constant. |
| 51 | func (c *Array) Ident() string { |
| 52 | // '[' Elems=(TypeConst separator ',')* ']' |
| 53 | buf := &strings.Builder{} |
| 54 | buf.WriteString("[") |
| 55 | for i, elem := range c.Elems { |
| 56 | if i != 0 { |
| 57 | buf.WriteString(", ") |
| 58 | } |
| 59 | buf.WriteString(elem.String()) |
| 60 | } |
| 61 | buf.WriteString("]") |
| 62 | return buf.String() |
| 63 | } |
| 64 | |
| 65 | // --- [ Character array constants ] ------------------------------------------- |
| 66 |