@@ -11,7 +11,7 @@ func root(l *lexer) stateFn {
1111 case r == eof :
1212 l .emitEOF ()
1313 return nil
14- case isSpace (r ):
14+ case IsSpace (r ):
1515 l .ignore ()
1616 return root
1717 case r == '\'' || r == '"' :
@@ -36,7 +36,7 @@ func root(l *lexer) stateFn {
3636 case r == '.' :
3737 l .backup ()
3838 return dot
39- case isAlphaNumeric (r ):
39+ case IsAlphaNumeric (r ):
4040 l .backup ()
4141 return identifier
4242 default :
@@ -67,18 +67,14 @@ func (l *lexer) scanNumber() bool {
6767 }
6868 }
6969 l .acceptRun (digits )
70- end := l .end
71- loc := l .loc
72- prev := l .prev
70+ loc , prev , end := l .loc , l .prev , l .end
7371 if l .accept ("." ) {
7472 // Lookup for .. operator: if after dot there is another dot (1..2), it maybe a range operator.
7573 if l .peek () == '.' {
7674 // We can't backup() here, as it would require two backups,
7775 // and backup() func supports only one for now. So, save and
7876 // restore it here.
79- l .end = end
80- l .loc = loc
81- l .prev = prev
77+ l .loc , l .prev , l .end = loc , prev , end
8278 return true
8379 }
8480 l .acceptRun (digits )
@@ -88,7 +84,7 @@ func (l *lexer) scanNumber() bool {
8884 l .acceptRun (digits )
8985 }
9086 // Next thing mustn't be alphanumeric.
91- if isAlphaNumeric (l .peek ()) {
87+ if IsAlphaNumeric (l .peek ()) {
9288 l .next ()
9389 return false
9490 }
@@ -110,7 +106,7 @@ func identifier(l *lexer) stateFn {
110106loop:
111107 for {
112108 switch r := l .next (); {
113- case isAlphaNumeric (r ):
109+ case IsAlphaNumeric (r ):
114110 // absorb
115111 default :
116112 l .backup ()
0 commit comments