MCPcopy
hub / github.com/google/mangle / VisitConst

Method VisitConst

parse/parse.go:475–482  ·  view source on GitHub ↗

VisitConst visits a parse tree produced by MangleParser#Const.

(ctx *gen.ConstContext)

Source from the content-addressed store, hash-verified

473
474// VisitConst visits a parse tree produced by MangleParser#Const.
475func (p Parser) VisitConst(ctx *gen.ConstContext) any {
476 nameConstant, err := ast.Name(ctx.CONSTANT().GetText())
477 if err != nil {
478 p.errors.Add(err.Error(), ctx.GetStart().GetLine(), ctx.GetStart().GetColumn())
479 return ast.AnyBound
480 }
481 return nameConstant
482}
483
484// VisitNum visits a parse tree produced by MangleParser#Num.
485func (p Parser) VisitNum(ctx *gen.NumContext) any {

Callers 1

VisitMethod · 0.95

Calls 4

NameFunction · 0.92
CONSTANTMethod · 0.80
ErrorMethod · 0.80
AddMethod · 0.65

Tested by

no test coverage detected