pub fn validate_tree(ctx: &Context, root: NodePtr) -> Result<(), Vec<ValidationError>> {
    let mut validator = Validator::new();
    validator.validate_root(ctx, root);
    if validator.errors.is_empty() {
        Ok(())
    } else {
        Err(validator.errors)
    }
}
/// Validate the full AST tree.
/// If it fails, return all the errors encountered along the way.
Validate the full AST tree.
If it fails, return all the errors encountered along the way.
Validate the full AST tree . If it fails return all the errors encountered along the way .
pub fn validate_tree(ctx: &Context, root: NodePtr) -> Result<(), Vec<ValidationError>> {
    let mut validator = Validator::new();
    validator.validate_root(ctx, root);
    if validator.errors.is_empty() {
        Ok(())
    } else {
        Err(validator.errors)
    }
}
pub fn validate_tree ( ctx : & Context , root : NodePtr ) -> Result < ( ) , Vec < ValidationError > > { let mut validator = Validator :: new ( ) ; validator . validate_root ( ctx , root ) ; if validator . errors . is_empty ( ) { Ok ( ( ) ) } else { Err ( validator . errors ) } }
Validate the full AST tree.
Validate the full AST tree .
ctx
&Context
root
NodePtr
ctx
&Context
root
NodePtr