diff --git a/src/parser.rs b/src/parser.rs index 146f955..017b522 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -40,7 +40,7 @@ impl Display for ParseError { const WHITESPACE: &str = " \t\r"; const NAME_START_CHARS: &str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_"; -const NAME_CHARS: &str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789-"; +const NAME_CHARS: &str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789"; const NUMBER_START_CHARS: &str = "0123456789"; const NUMBER_CHARS: &str = "0123456789."; const NUMBER_HEX_CHARS: &str = "0123456789ABCDEFabcdef"; @@ -867,13 +867,13 @@ macro_rules! lexer_check { #[test] fn test_lexer_names() { - let input = "asdf fdsa the-quick-brown-fox jumped_over-the-lazy_dogs"; + let input = "asdf fdsa the_quick_brown_fox jumped_over_the_lazy_dogs"; let mut lexer = Lexer::new(input.to_string(), ":testing:"); lexer_check!(lexer, TokenKind::Name, "asdf"); lexer_check!(lexer, TokenKind::Name, "fdsa"); - lexer_check!(lexer, TokenKind::Name, "the-quick-brown-fox"); - lexer_check!(lexer, TokenKind::Name, "jumped_over-the-lazy_dogs"); + lexer_check!(lexer, TokenKind::Name, "the_quick_brown_fox"); + lexer_check!(lexer, TokenKind::Name, "jumped_over_the_lazy_dogs"); assert!(lexer.is_eof()); }