MCPcopy Create free account
hub / github.com/cel-expr/cel-go / Seek

Method Seek

parser/input.go:71–81  ·  view source on GitHub ↗

Seek implements (antlr.CharStream).Seek.

(index int)

Source from the content-addressed store, hash-verified

69
70// Seek implements (antlr.CharStream).Seek.
71func (c *charStream) Seek(index int) {
72 if index <= c.pos {
73 c.pos = index
74 return
75 }
76 if index < c.buf.Len() {
77 c.pos = index
78 } else {
79 c.pos = c.buf.Len()
80 }
81}
82
83// Size implements (antlr.CharStream).Size.
84func (c *charStream) Size() int {

Callers

nothing calls this directly

Calls 1

LenMethod · 0.65

Tested by

no test coverage detected