parser: introduce GetPositionalLength()
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -43,6 +43,11 @@ var (
|
||||
IsCommentStart = lexer.NewIsIn(RunesComment)
|
||||
)
|
||||
|
||||
// IsAny accepts any rune
|
||||
func IsAny(_ rune) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsSpaceNotNewLine indicates a rune is whitespace but not a new line
|
||||
func IsSpaceNotNewLine(r rune) bool {
|
||||
return IsSpace(r) && !IsNewLine(r)
|
||||
|
||||
Reference in New Issue
Block a user