()
| 406 | } |
| 407 | |
| 408 | func (p *parser) parse() error { |
| 409 | for i := 0; i < len(p.toks); { |
| 410 | if p.newline(i) || p.comment(i) { |
| 411 | i++ |
| 412 | continue |
| 413 | } |
| 414 | if n := p.instruction(i); n > 0 { |
| 415 | i += n |
| 416 | } else { |
| 417 | p.unexpected(i) |
| 418 | i++ |
| 419 | } |
| 420 | } |
| 421 | return nil |
| 422 | } |
| 423 | |
| 424 | // instruction parses the instruction starting at the i'th token. |
| 425 | func (p *parser) instruction(i int) (n int) { |
no test coverage detected