refactor(xatu): name unquoted URI tokens explicitly
This commit is contained in:
@@ -67,7 +67,7 @@ pub struct Token {
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum TokenData {
|
||||
Uri(String),
|
||||
UnquotedUri(String),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
||||
@@ -123,7 +123,7 @@ fn convert_token(token: rnix::SyntaxToken) -> Option<ast::Token> {
|
||||
match token.kind() {
|
||||
rnix::SyntaxKind::TOKEN_URI => Some(ast::Token {
|
||||
range: token.text_range().into(),
|
||||
data: ast::TokenData::Uri(token.text().to_string()),
|
||||
data: ast::TokenData::UnquotedUri(token.text().to_string()),
|
||||
}),
|
||||
_ => None,
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ impl TokenRule for UnquotedUri {
|
||||
|
||||
fn select(data: &ast::TokenData) -> Option<&Self::Token> {
|
||||
match data {
|
||||
ast::TokenData::Uri(uri) => Some(uri),
|
||||
ast::TokenData::UnquotedUri(uri) => Some(uri),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user