token/token.go
type name will be used as token.TokenType by other packages, and that stutters; consider calling this Type Open
Open
type TokenType string
- Exclude checks
comment on exported const FUNCTION should be of the form "FUNCTION ..." Open
Open
// Keywords
- Exclude checks
comment on exported type TokenType should be of the form "TokenType ..." (with optional leading article) Open
Open
// Improvement: Use byte for better performance (pg12)
- Exclude checks
comment on exported const IDENT should be of the form "IDENT ..." Open
Open
// Identifiers + literals
- Exclude checks
don't use ALL_CAPS in Go names; use CamelCase Open
Open
NOT_EQ = "!="
- Exclude checks
exported function LookupIdent should have comment or be unexported Open
Open
func LookupIdent(ident string) TokenType {
- Exclude checks
comment on exported const COMMA should be of the form "COMMA ..." Open
Open
// Delimitors
- Exclude checks
comment on exported const ASSIGN should be of the form "ASSIGN ..." Open
Open
// Operators
- Exclude checks
comment on exported type Token should be of the form "Token ..." (with optional leading article) Open
Open
// Improvement: include filename, line and character place to ease debugging
- Exclude checks
exported const ILLEGAL should have comment (or a comment on this block) or be unexported Open
Open
ILLEGAL = "ILLEGAL"
- Exclude checks