MCPcopy Create free account
hub / github.com/crossoverJie/gscript / Scope2String

Function Scope2String

resolver/annotated_tree.go:248–263  ·  view source on GitHub ↗
(buf *strings.Builder, scope symbol.Scope, indent string)

Source from the content-addressed store, hash-verified

246}
247
248func Scope2String(buf *strings.Builder, scope symbol.Scope, indent string) {
249 buf.WriteString(indent)
250 buf.WriteString(scope.String())
251 buf.WriteString("\n")
252 for _, s := range scope.GetSymbols() {
253 sc, ok := s.(symbol.Scope)
254 if ok {
255 Scope2String(buf, sc, indent+"\t")
256 } else {
257 buf.WriteString(indent)
258 buf.WriteString("\t")
259 buf.WriteString("symbol -> " + s.GetName())
260 buf.WriteString("\n")
261 }
262 }
263}

Callers 1

DumpSymbolMethod · 0.85

Calls 3

StringMethod · 0.65
GetSymbolsMethod · 0.65
GetNameMethod · 0.65

Tested by

no test coverage detected