From 0098052142bd2149287b5a62fb9805fc2de649e9 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Tue, 29 Aug 2023 20:18:15 +0000 Subject: [PATCH] lexer: IsSpace() Signed-off-by: Alejandro Mery --- lexer/runes.go | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lexer/runes.go diff --git a/lexer/runes.go b/lexer/runes.go new file mode 100644 index 0000000..9b13b5a --- /dev/null +++ b/lexer/runes.go @@ -0,0 +1,9 @@ +package lexer + +import "unicode" + +// IsSpace reports whether the rune is a space character as +// defined by Unicode's White Space property +func IsSpace(r rune) bool { + return unicode.IsSpace(r) +}