Remove kebab-case from parser. It was not being used.
This is a simple one. It does not make sense for an infix language that uses `-` as a first-class binary (and more importantly, unary) operator. I liked the idea, but I don't think it was going to work. Plus, I wasn't using it for builtin functions in the first place, so why keep it around? Underscores are just fine for our purposes. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user