MCPcopy Create free account
hub / github.com/brimdata/super / pushV

Method pushV

compiler/parser/parser.go:24864–24882  ·  view source on GitHub ↗

push a variable set on the vstack.

()

Source from the content-addressed store, hash-verified

24862
24863// push a variable set on the vstack.
24864func (p *parser) pushV() {
24865 if cap(p.vstack) == len(p.vstack) {
24866 // create new empty slot in the stack
24867 p.vstack = append(p.vstack, nil)
24868 } else {
24869 // slice to 1 more
24870 p.vstack = p.vstack[:len(p.vstack)+1]
24871 }
24872
24873 // get the last args set
24874 m := p.vstack[len(p.vstack)-1]
24875 if m != nil && len(m) == 0 {
24876 // empty map, all good
24877 return
24878 }
24879
24880 m = make(map[string]any)
24881 p.vstack[len(p.vstack)-1] = m
24882}
24883
24884// pop a variable set from the vstack.
24885func (p *parser) popV() {

Callers 8

parseRuleMethod · 0.95
parseAndExprMethod · 0.95
parseChoiceExprMethod · 0.95
parseLabeledExprMethod · 0.95
parseNotExprMethod · 0.95
parseOneOrMoreExprMethod · 0.95
parseZeroOrMoreExprMethod · 0.95
parseZeroOrOneExprMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected