feat(xatu): report unquoted URI literals

This commit was merged in pull request #81.
This commit is contained in:
2026-09-19 17:51:46 -04:00
parent ad00301ac9
commit be8744795c
8 changed files with 129 additions and 14 deletions

View File

@@ -0,0 +1,19 @@
use crate::{ast, rules::TokenRule};
pub struct UnquotedUri;
impl TokenRule for UnquotedUri {
type Token = String;
const ID: &'static str = "unquoted_uri";
fn select(data: &ast::TokenData) -> Option<&Self::Token> {
match data {
ast::TokenData::UnquotedUri(uri) => Some(uri),
}
}
fn check(_token: &Self::Token) -> Option<&'static str> {
Some("URI literals should be quoted")
}
}