use crate::{ algo::visit::{visitor_ctx, VisitorCtx}, ast, SourceFileNode, yellow::SyntaxError, }; mod byte; mod char; mod string; pub(crate) fn validate(file: &SourceFileNode) -> Vec { let mut errors = Vec::new(); for node in file.syntax().descendants() { let _ = visitor_ctx(&mut errors) .visit::(self::byte::validate_byte_node) .visit::(self::char::validate_char_node) .visit::(self::string::validate_string_node) .accept(node); } errors }