ExtendedValidations collects a set of common AST validations which reduce the likelihood of runtime errors. - Validate duration and timestamp literals - Ensure regex strings are valid - Disable mixed type list and map literals
()
| 214 | // - Ensure regex strings are valid |
| 215 | // - Disable mixed type list and map literals |
| 216 | func ExtendedValidations() EnvOption { |
| 217 | return ASTValidators( |
| 218 | ValidateDurationLiterals(), |
| 219 | ValidateTimestampLiterals(), |
| 220 | ValidateRegexLiterals(), |
| 221 | ValidateHomogeneousAggregateLiterals(), |
| 222 | ) |
| 223 | } |
| 224 | |
| 225 | // ValidateDurationLiterals ensures that duration literal arguments are valid immediately after type-check. |
| 226 | func ValidateDurationLiterals() ASTValidator { |