parseIdent parses an identifier.
()
| 101 | |
| 102 | // parseIdent parses an identifier. |
| 103 | func (p *Parser) parseIdent() (string, error) { |
| 104 | tok, pos, lit := p.scanIgnoreWhitespace() |
| 105 | if tok != IDENT { |
| 106 | return "", newParseError(tokstr(tok, lit), []string{"identifier"}, pos) |
| 107 | } |
| 108 | return lit, nil |
| 109 | } |
| 110 | |
| 111 | // parseIdentList parses a comma delimited list of identifiers. |
| 112 | func (p *Parser) parseIdentList() ([]string, error) { |
no test coverage detected