mod byte; mod byte_string; mod char; mod string; mod block; mod match_armlist; use crate::{ SourceFile, syntax_node::SyntaxError, AstNode, ast, algo::visit::{visitor_ctx, VisitorCtx}, }; pub(crate) fn validate(file: &SourceFile) -> 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::byte_string::validate_byte_string_node) .visit::(self::char::validate_char_node) .visit::(self::string::validate_string_node) .visit::(self::block::validate_block_node) .visit::(self::match_armlist::validate_match_armlist) .accept(node); } errors }