eval_user_query for OPA style results (#29)

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2023-10-30 10:44:02 -07:00
committed by GitHub
parent 800e594d52
commit 63ecc44a48
8 changed files with 386 additions and 102 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ fn count(span: &Span, params: &[Expr], args: &[Value]) -> Result<Value> {
Value::Array(a) => a.len() as Float,
Value::Set(a) => a.len() as Float,
Value::Object(a) => a.len() as Float,
Value::String(a) => a.len() as Float,
Value::String(a) => a.encode_utf16().count() as Float,
a => {
let span = params[0].span();
bail!(span.error(