-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Add checks in range expression that the left operand is "less" than the right operand.
- specify an error message for range bounds validation
- (Optional) Add recovery behaviour
Sample code
const invalidResult = cronix("0 20-4 * * *");
// should be null
console.log(invalidResult.ast.value());
// Should have 1 error at semantic step with invalid range bounds
console.log(invalidResult.errors[1]);
Recovery behaviour
In the above snippet, we assume the user actually meant 4-20 instead of 20-4. Therefore the parser should be able to identify such mistake and accordingly fix it if the user desires it. That behaviour can be enabled via a flag in the parser's options.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request