Closed
Description
Was writing code to parse the AST and noticed that function names are currently accepted by the pest schema as comparison ops.
let parse_result_normal = parse_json_path("$[? 5 >= 5]").unwrap();
let parse_result = parse_json_path("$[? 5 badName 5]").unwrap_err();
assert!(matches!(parse_result, JsonPathError::PestError(_)), "{parse_result} should be a pest error");
// Currently returns JsonPathError::InvalidJsonPath
let parse_result2 = parse_json_path("$[? 5 noneOf 5]").unwrap_err();
assert!(matches!(parse_result2, JsonPathError::PestError(_)), "{parse_result2} should be a pest error"); // <-- this fails
I believe the pest grammar rule comp_op
should not include function names.
Metadata
Metadata
Assignees
Labels
No labels