diff --git a/lex.go b/lex.go index b9e14d9..767010f 100644 --- a/lex.go +++ b/lex.go @@ -274,7 +274,7 @@ func lexRoot(l *lexer) stateFn { return lexNumber case unicode.IsSpace(r): return lexRoot - case unicode.IsLower(r), unicode.IsUpper(r): + case unicode.IsPrint(r): l.keep(r) return lexNameOrString default: diff --git a/tests/lex/13.in b/tests/lex/13.in new file mode 100644 index 0000000..b0fd572 --- /dev/null +++ b/tests/lex/13.in @@ -0,0 +1,2 @@ +# https://github.com/jordanorelli/moon/issues/2 +some_path: /path/to/file diff --git a/tests/lex/13.out b/tests/lex/13.out new file mode 100644 index 0000000..dec3597 --- /dev/null +++ b/tests/lex/13.out @@ -0,0 +1,4 @@ +{t_comment https://github.com/jordanorelli/moon/issues/2} +{t_name some_path} +{t_object_separator :} +{t_string /path/to/file}