MCPcopy Create free account
hub / github.com/google/syzkaller / parseIntValue

Method parseIntValue

pkg/ast/parser.go:590–606  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

588}
589
590func (p *parser) parseIntValue() (uint64, IntFmt) {
591 if p.lit[0] == '\'' {
592 return uint64(p.lit[1]), IntFmtChar
593 }
594 if v, err := strconv.ParseUint(p.lit, 10, 64); err == nil {
595 return v, IntFmtDec
596 }
597 if v, err := strconv.ParseInt(p.lit, 10, 64); err == nil {
598 return uint64(v), IntFmtNeg
599 }
600 if len(p.lit) > 2 && p.lit[0] == '0' && p.lit[1] == 'x' {
601 if v, err := strconv.ParseUint(p.lit[2:], 16, 64); err == nil {
602 return v, IntFmtHex
603 }
604 }
605 panic(fmt.Sprintf("scanner returned bad integer %q", p.lit))
606}
607
608func (p *parser) parseCExpr() *Int {
609 i := &Int{

Callers 2

parseExprFactorMethod · 0.95
parseIntMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected