diff --git a/token/token.go b/token/token.go index c197e52..d33ed14 100644 --- a/token/token.go +++ b/token/token.go @@ -1,5 +1,11 @@ package token +type TokenInterface interface { + GetValue() string + GetStartLine() int + GetEndLine() int +} + type Token struct { Value string StartLine int @@ -13,3 +19,13 @@ func NewToken(value []byte, startLine int, endLine int) Token { func (t Token) String() string { return string(t.Value) } + +func (t Token) GetValue() string { + return t.Value +} +func (t Token) GetStartLine() int { + return t.StartLine +} +func (t Token) GetEndLine() int { + return t.EndLine +}