mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Remove other references to private tags in code
This commit is contained in:
parent
2ab01107d3
commit
55706ae5c4
8 changed files with 32 additions and 99 deletions
|
@ -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]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue