# Copyright (C) 2023 Brodie Gaslam
#
# This file is part of "vetr - Trust, but Verify"
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# Go to <https://www.r-project.org/Licenses/GPL-2> for a copy of the license.

# make sure unchanged from previous assignment

vetr:::parse_validator(quote(((a && b) || .(.))), quote(arg_to_validate))

vetr:::parse_validator(quote(matrix(nrow = 3) && .(.)), quote(arg_to_validate))

vetr:::parse_validator(quote((a || ((b && c))) && .(a + .)), 
    quote(arg_to_validate))

vetr:::parse_validator(quote((a || ((b && .(c)))) && (a + .(.))), 
    quote(arg_to_validate))

vetr:::parse_validator(quote(a && (b + .(c))), quote(arg_to_validate))

!is.na(.)
attr(,"err.msg")
[1] "%s should not contain NAs, but does"

Possible infinite recursion encountered when substituting symbol `.`. `vetr` recursively substitutes the vetting expressions. See `vignette('vetr', package='vetr')`, "Non Standard Evaluation" section.

Error in vetr:::symb_sub(quote(..)) : 
  Possible infinite recursion encountered when substituting symbol `.`. `vetr` recursively substitutes the vetting expressions. See `vignette('vetr', package='vetr')`, "Non Standard Evaluation" section.

Internal Error: Cannot dot unescape single `.`.

Error in vetr:::symb_sub(quote(.)) : 
  Internal Error: Cannot dot unescape single `.`.

z <- quote(integer(1L) && .(!any(is.na(.))))