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
()
| 204 | // - Ensure regex strings are valid |
| 205 | // - Disable mixed type list and map literals |
| 206 | func ExtendedValidations() EnvOption { |
| 207 | return ASTValidators( |
| 208 | ValidateDurationLiterals(), |
| 209 | ValidateTimestampLiterals(), |
| 210 | ValidateRegexLiterals(), |
| 211 | ValidateHomogeneousAggregateLiterals(), |
| 212 | ) |
| 213 | } |
| 214 | |
| 215 | // ValidateDurationLiterals ensures that duration literal arguments are valid immediately after type-check. |
| 216 | func ValidateDurationLiterals() ASTValidator { |