Removed support for kebab-case

In live coding enviroment support for `n-1` beeing the same as `n - 1` is more
important then kebab case names
This commit is contained in:
Robert Bendun 2022-05-10 15:27:06 +02:00
parent 555a35ecc0
commit b4cd87eea1
3 changed files with 2 additions and 4 deletions

View File

@ -145,7 +145,6 @@ suite lexer_test = [] {
expect_token_type_and_value(Token::Type::Symbol, "i2"); expect_token_type_and_value(Token::Type::Symbol, "i2");
expect_token_type_and_value(Token::Type::Symbol, "example"); expect_token_type_and_value(Token::Type::Symbol, "example");
expect_token_type_and_value(Token::Type::Symbol, "d1envelope"); expect_token_type_and_value(Token::Type::Symbol, "d1envelope");
expect_token_type_and_value(Token::Type::Symbol, "kebab-case");
expect_token_type_and_value(Token::Type::Symbol, "snake_case"); expect_token_type_and_value(Token::Type::Symbol, "snake_case");
expect_token_type_and_value(Token::Type::Symbol, "camelCase"); expect_token_type_and_value(Token::Type::Symbol, "camelCase");
expect_token_type_and_value(Token::Type::Symbol, "PascalCase"); expect_token_type_and_value(Token::Type::Symbol, "PascalCase");

View File

@ -101,6 +101,5 @@ bool unicode::is_space(u32 space)
bool unicode::is_identifier(u32 letter, unicode::First_Character is_first_character) bool unicode::is_identifier(u32 letter, unicode::First_Character is_first_character)
{ {
return (unicode::is_letter(letter) || letter == '_' || letter == '#' || letter == '$' || letter == '@') return (unicode::is_letter(letter) || letter == '_' || letter == '#' || letter == '$' || letter == '@')
|| (!bool(is_first_character) && ( || (!bool(is_first_character) && (letter == '\'' || unicode::is_digit(letter)));
letter == '-' || letter == '\'' || unicode::is_digit(letter)));
} }