Closed brynrhodes closed 6 months ago
One thought with going this route is that I don't think this grammar helps us achieve multi-statement tests. One of the reason we leaned towards the JSON representation is that each statement result in multi-statement CQL could be all asserted on.
Agreed it doesn't support multi-statement tests in the $cql operation, but it should in the Library/$evaluate
…ts as literals
This PR adds a "cvl" grammar that allows for CQL literals to be expressed. It uses the JavaScript ANTLR generated visitor from this grammar to then provide a JavaScript representation of any CQL literal expression.
There are still quite a few TODOs, but this covers a good 90% of the test cases in a way that doesn't involve changing the test cases, but does address the issue with having the same engine parse the expected result and produce the actual result.
With this in place, the CQF Ruler CQL Evaluation Service is up to: pass: 1162 skip: 38 fail: 325 error: 44