Last active
February 6, 2021 18:08
-
-
Save korzio/2502354aa734046a29d0c4f144e8db99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (l *Lexer) Tokens() rxgo.Observable { | |
return l.observable. | |
Filter(func(i interface{}) bool { | |
var str = i.(string) | |
return !isWhitespace(str) | |
}) | |
// next operator | |
} | |
func isWhitespace(ch string) bool { | |
return ch == " " || ch == "\t" || ch == "\n" || ch == "\r" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment