MCPcopy Index your code
hub / github.com/microsoft/typescript-go / newStringTable

Function newStringTable

internal/api/encoder/stringtable.go:16–23  ·  view source on GitHub ↗
(fileText string, stringCount int)

Source from the content-addressed store, hash-verified

14}
15
16func 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
25func (t *stringTable) add(text string, kind ast.Kind, pos int, end int) uint32 {
26 index := uint32(len(t.offsets))

Callers 1

encodeTreeFunction · 0.85

Calls 1

makeFunction · 0.50

Tested by

no test coverage detected