MCPcopy Index your code
hub / github.com/google/mangle / VisitUseDecl

Method VisitUseDecl

parse/parse.go:263–270  ·  view source on GitHub ↗

VisitUseDecl visits a parse tree produced by MangleParser#useDecl.

(ctx *gen.UseDeclContext)

Source from the content-addressed store, hash-verified

261
262// VisitUseDecl visits a parse tree produced by MangleParser#useDecl.
263func (p Parser) VisitUseDecl(ctx *gen.UseDeclContext) any {
264 name := ast.NewAtom("name", ast.String(ctx.NAME().GetText()))
265 atoms := []ast.Atom{name}
266 if atomsCtx := ctx.Atoms(); atomsCtx != nil {
267 atoms = append(atoms, p.Visit(atomsCtx).([]ast.Atom)...)
268 }
269 return ast.Decl{DeclaredAtom: ast.Atom{Predicate: symbols.Use}, Descr: atoms}
270}
271
272// VisitDecl visits a parse tree produced by MangleParser#decl.
273func (p Parser) VisitDecl(ctx *gen.DeclContext) any {

Callers 1

VisitMethod · 0.95

Calls 5

VisitMethod · 0.95
NewAtomFunction · 0.92
StringFunction · 0.92
NAMEMethod · 0.65
AtomsMethod · 0.65

Tested by

no test coverage detected