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
()
| 215 | // - Ensure regex strings are valid |
| 216 | // - Disable mixed type list and map literals |
| 217 | func ExtendedValidations() EnvOption { |
| 218 | return ASTValidators( |
| 219 | ValidateDurationLiterals(), |
| 220 | ValidateTimestampLiterals(), |
| 221 | ValidateRegexLiterals(), |
| 222 | ValidateHomogeneousAggregateLiterals(), |
| 223 | ) |
| 224 | } |
| 225 | |
| 226 | // ValidateDurationLiterals ensures that duration literal arguments are valid immediately after type-check. |
| 227 | func ValidateDurationLiterals() ASTValidator { |