validate function
Validates a node
given a Set of ValidationRules
Implementation
List<ValidationError> validate(
ast.Node node,
Set<ValidationRule> rules,
) {
final validator = _Validator(
rules: rules,
);
return validator.validate(
node: node,
);
}