Remove other references to private tags in code

This commit is contained in:
Ayaz Hafiz 2022-04-25 11:50:00 -04:00
parent 2ab01107d3
commit 55706ae5c4
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
8 changed files with 32 additions and 99 deletions

View file

@ -70,8 +70,6 @@ pub enum Token {
Malformed,
MalformedOperator,
PrivateTag,
String,
NumberBase,
@ -149,7 +147,6 @@ fn consume_all_tokens(state: &mut LexState, bytes: &[u8], consumer: &mut impl Co
b']' => (Token::CloseSquare, 1),
b',' => (Token::Comma, 1),
b'_' => lex_underscore(bytes),
b'@' => lex_private_tag(bytes),
b'a'..=b'z' => lex_ident(false, bytes),
b'A'..=b'Z' => lex_ident(true, bytes),
b'0'..=b'9' => lex_number(bytes),
@ -408,15 +405,6 @@ fn is_ident_continue(ch: u8) -> bool {
matches!(ch, b'a'..=b'z'|b'A'..=b'Z'|b'0'..=b'9'|b'_')
}
fn lex_private_tag(bytes: &[u8]) -> (Token, usize) {
debug_assert!(bytes[0] == b'@');
let mut i = 1;
while i < bytes.len() && is_ident_continue(bytes[i]) {
i += 1;
}
(Token::PrivateTag, i)
}
fn lex_ident(uppercase: bool, bytes: &[u8]) -> (Token, usize) {
let mut i = 0;
while i < bytes.len() && is_ident_continue(bytes[i]) {