parameters: (ctxt, node)
return_statement: return validator
docstring: Parse a validator for a field.
docstring_summary: Parse a validator for a field.
docstring_tokens: Parse a validator for a field .
function: def _parse_validator(ctxt, node):
      # type: (errors.ParserContext, yaml.nodes.MappingNode) -> syntax.Validator
      """Parse a validator for a field."""
      validator = syntax.Validator(ctxt.file_name, node.start_mark.line, node.start_mark.column)
  
      _generic_parser(
          ctxt, node, "validator", validator, {
              "gt": _RuleDesc("scalar_or_mapping", mapping_parser_func=_parse_expression),
              "lt": _RuleDesc("scalar_or_mapping", mapping_parser_func=_parse_expression),
              "gte": _RuleDesc("scalar_or_mapping", mapping_parser_func=_parse_expression),
              "lte": _RuleDesc("scalar_or_mapping", mapping_parser_func=_parse_expression),
              "callback": _RuleDesc("scalar"),
          })
  
      return validator
function_tokens: def _parse_validator ( ctxt , node ) : # type: (errors.ParserContext, yaml.nodes.MappingNode) -> syntax.Validator validator = syntax . Validator ( ctxt . file_name , node . start_mark . line , node . start_mark . column ) _generic_parser ( ctxt , node , "validator" , validator , { "gt" : _RuleDesc ( "scalar_or_mapping" , mapping_parser_func = _parse_expression ) , "lt" : _RuleDesc ( "scalar_or_mapping" , mapping_parser_func = _parse_expression ) , "gte" : _RuleDesc ( "scalar_or_mapping" , mapping_parser_func = _parse_expression ) , "lte" : _RuleDesc ( "scalar_or_mapping" , mapping_parser_func = _parse_expression ) , "callback" : _RuleDesc ( "scalar" ) , } ) return validator