brodieG / vetr

Trust, but Verify
78 stars 2 forks source link

Nested Token Type Determination #105

Closed brodieG closed 2 years ago

brodieG commented 2 years ago
+   list(character(1L) && !is.na(.)),
+   list("constant", 1L)
+ )
Error in character(1L) && !is.na(list("constant", 1L)) : 
  invalid 'x' type in 'x && y'
Error in vet(list(character(1L) && !is.na(.)), list("constant", 1L)) : 
  Validation expression for argument `current` produced an error (see previous error).

It should be possible for this to resolve correctly.

brodieG commented 2 years ago

Nevermind, this is not supported. From vignette('vetr', package='vetr'):

vet will stop searching for tokens at the first call to a function other than (, &&, and ||.

So we can't nest things inside lists. We'll have to rely on #29 or similar.