123456789101112131415161718192021 |
- package ast
- import "code.osinet.fr/fgm/waiig15/token"
- // Identifier is the Node type for identifiers.
- type Identifier struct {
- Token token.Token // the token.IDENT token. Why do we need it ?
- Value string // The identifier string.
- }
- func (i *Identifier) String() string {
- return i.Value
- }
- func (i *Identifier) expressionNode() {}
- // TokenLiteral satisfies the Node interface.
- func (i *Identifier) TokenLiteral() string {
- return i.Token.Literal
- }
|