(fileText string, stringCount int)
| 14 | } |
| 15 | |
| 16 | func newStringTable(fileText string, stringCount int) *stringTable { |
| 17 | builder := &strings.Builder{} |
| 18 | return &stringTable{ |
| 19 | fileText: fileText, |
| 20 | otherStrings: builder, |
| 21 | offsets: make([]uint32, 0, stringCount*2), |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | func (t *stringTable) add(text string, kind ast.Kind, pos int, end int) uint32 { |
| 26 | index := uint32(len(t.offsets)) |