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
()
| 188 | // - Ensure regex strings are valid |
| 189 | // - Disable mixed type list and map literals |
| 190 | func ExtendedValidations() EnvOption { |
| 191 | return ASTValidators( |
| 192 | ValidateDurationLiterals(), |
| 193 | ValidateTimestampLiterals(), |
| 194 | ValidateRegexLiterals(), |
| 195 | ValidateHomogeneousAggregateLiterals(), |
| 196 | ) |
| 197 | } |
| 198 | |
| 199 | // ValidateDurationLiterals ensures that duration literal arguments are valid immediately after type-check. |
| 200 | func ValidateDurationLiterals() ASTValidator { |