parser_identifier.go 281 B

123456789101112
  1. package parser
  2. import "code.osinet.fr/fgm/waiig15/ast"
  3. // parseIdentifier does not advance the tokens or call nextToken, and this is
  4. // important.
  5. func (p *Parser) parseIdentifier() ast.Expression {
  6. return &ast.Identifier{
  7. Token: p.curToken,
  8. Value: p.curToken.Literal,
  9. }
  10. }