MCPcopy Create free account
hub / github.com/adhocteam/pushup / charAt

Method charAt

parser.go:648–653  ·  view source on GitHub ↗

charAt() returns the byte at the offset in the input source string. because the Go tokenizer discards white space, we need this method in order to check for, for example, a space after an identifier in parsing an implicit expression, because that would denote the end of that simple expression in Pus

(offset int)

Source from the content-addressed store, hash-verified

646// expression, because that would denote the end of that simple expression in
647// Pushup syntax.
648func (p *codeParser) charAt(offset int) byte {
649 if len(p.parser.src) > offset {
650 return p.parser.src[offset]
651 }
652 return 0
653}
654
655func (p *codeParser) prev() goToken {
656 if tok, ok := Value(p.acceptedToken); ok {

Callers 7

HeFunction · 0.80
NeFunction · 0.80
HeFunction · 0.80
NeFunction · 0.80
HeFunction · 0.80
NeFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected