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

Method init

parse/parse.go:76–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74}
75
76func (p *Parser) init() error {
77 p.lexer = lexerPool.Get().(*gen.MangleLexer)
78 p.parser = parserPool.Get().(*gen.MangleParser)
79
80 p.lexer.SetInputStream(antlr.NewInputStream(p.input))
81 p.parser.SetInputStream(antlr.NewCommonTokenStream(p.lexer, 0))
82
83 p.lexer.AddErrorListener(p)
84 p.parser.AddErrorListener(p)
85 return nil
86}
87
88func (p *Parser) reset() {
89 // Reset the lexer and parser before putting them back in the pool.

Callers 1

newParserFunction · 0.95

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected