github.com/searKing/golang/go@v1.2.117/go/token/token.go (about) 1 // Copyright 2020 The searKing Author. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package token 6 7 // Token is the set of lexical tokens of the Go programming language. 8 type Type int 9 10 const ( 11 // Special tokens 12 TypeILLEGAL Type = iota 13 TypeEOF 14 TypeCOMMENT 15 TypeIgnored 16 17 TypeLiteral 18 TypeOperator 19 TypeKeyword 20 ) 21 22 type Token struct { 23 Typ Type 24 Value string 25 }