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

Method restoreState

compiler/parser/parser.go:25063–25069  ·  view source on GitHub ↗

restore parser current state to the state storeDict. every restoreState should applied only one time for every cloned state

(state storeDict)

Source from the content-addressed store, hash-verified

25061// restore parser current state to the state storeDict.
25062// every restoreState should applied only one time for every cloned state
25063func (p *parser) restoreState(state storeDict) {
25064 if p.debug {
25065 defer p.out(p.in("restoreState"))
25066 }
25067 p.cur.state.Discard()
25068 p.cur.state = state
25069}
25070
25071// get the slice of bytes from the savepoint start to the current position.
25072func (p *parser) sliceFrom(start savepoint) []byte {

Callers 8

parseActionExprMethod · 0.95
parseAndCodeExprMethod · 0.95
parseAndExprMethod · 0.95
parseChoiceExprMethod · 0.95
parseNotCodeExprMethod · 0.95
parseNotExprMethod · 0.95
parseSeqExprMethod · 0.95

Calls 3

outMethod · 0.95
inMethod · 0.95
DiscardMethod · 0.80

Tested by

no test coverage detected