summaryrefslogtreecommitdiff
path: root/src/pkg/go/token/token.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/go/token/token.go')
-rw-r--r--src/pkg/go/token/token.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/pkg/go/token/token.go b/src/pkg/go/token/token.go
index c2ec80ae1..557374052 100644
--- a/src/pkg/go/token/token.go
+++ b/src/pkg/go/token/token.go
@@ -9,7 +9,6 @@ package token
import "strconv"
-
// Token is the set of lexical tokens of the Go programming language.
type Token int
@@ -124,7 +123,6 @@ const (
keyword_end
)
-
var tokens = [...]string{
ILLEGAL: "ILLEGAL",
@@ -225,7 +223,6 @@ var tokens = [...]string{
VAR: "var",
}
-
// String returns the string corresponding to the token tok.
// For operators, delimiters, and keywords the string is the actual
// token character sequence (e.g., for the token ADD, the string is
@@ -243,7 +240,6 @@ func (tok Token) String() string {
return s
}
-
// A set of constants for precedence-based expression parsing.
// Non-operators have lowest precedence, followed by operators
// starting with precedence 1 up to unary operators. The highest
@@ -256,7 +252,6 @@ const (
HighestPrec = 7
)
-
// Precedence returns the operator precedence of the binary
// operator op. If op is not a binary operator, the result
// is LowestPrecedence.
@@ -277,7 +272,6 @@ func (op Token) Precedence() int {
return LowestPrec
}
-
var keywords map[string]Token
func init() {
@@ -287,7 +281,6 @@ func init() {
}
}
-
// Lookup maps an identifier to its keyword token or IDENT (if not a keyword).
//
func Lookup(ident []byte) Token {
@@ -299,7 +292,6 @@ func Lookup(ident []byte) Token {
return IDENT
}
-
// Predicates
// IsLiteral returns true for tokens corresponding to identifiers