1
0
Fork 0

Use byte type for enums

This commit is contained in:
Gregory Eremin 2015-02-18 16:01:18 +07:00
parent 4917b570b0
commit 9e8610ba3b
2 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ type (
}
// Identifies the type of the item
Token int
Token byte
// Represents the state of the scanner as a function that returns the next state
stateFn func(*Lexer) stateFn
@ -86,7 +86,7 @@ func (l *Lexer) NextItem() (item Item, ok bool) {
// Returns the next rune in the input
func (l *Lexer) next() rune {
if int(l.pos) >= len(l.input) {
if l.pos >= len(l.input) {
l.width = 0
return 0
}

View File

@ -19,7 +19,7 @@ type (
}
// Type of expectation: object or array
expectationType int
expectationType byte
)
const (