()
| 572 | } |
| 573 | |
| 574 | func (p *parser) parseInt() *Int { |
| 575 | i := &Int{ |
| 576 | Pos: p.pos, |
| 577 | } |
| 578 | switch p.tok { |
| 579 | case tokInt: |
| 580 | i.Value, i.ValueFmt = p.parseIntValue() |
| 581 | case tokIdent: |
| 582 | i.Ident = p.lit |
| 583 | default: |
| 584 | p.expect(tokInt, tokIdent) |
| 585 | } |
| 586 | p.next() |
| 587 | return i |
| 588 | } |
| 589 | |
| 590 | func (p *parser) parseIntValue() (uint64, IntFmt) { |
| 591 | if p.lit[0] == '\'' { |
no test coverage detected