From 3dc64e7b2bf6194547079ea03527f2945eb25b4e Mon Sep 17 00:00:00 2001 From: Dan Hudlow Date: Sat, 23 Nov 2024 00:10:17 -0600 Subject: [PATCH] update spec to v0.18 --- builder.ts | 33 +- cel.peggy | 2 +- package-lock.json | 6 +- package.json | 6 +- test/conformance.test.ts | 7 +- test/data/conformance.json | 3372 ++++++++++++------ test/parser.test.ts | 8 +- utility/debug/to-debug-string.ts | 2 +- utility/extract-conformance-tests/extract.go | 12 +- utility/extract-conformance-tests/go.mod | 8 +- utility/extract-conformance-tests/go.sum | 16 +- 11 files changed, 2418 insertions(+), 1054 deletions(-) diff --git a/builder.ts b/builder.ts index ce01417..dfbbf93 100644 --- a/builder.ts +++ b/builder.ts @@ -3,7 +3,7 @@ import type { Expr, Expr_CreateStruct_Entry, SourceInfo, -} from "./external/proto/dev/cel/expr/syntax_pb.ts"; +} from "./external/cel/expr/syntax_pb.ts"; const encoder = new TextEncoder(); @@ -128,19 +128,20 @@ class Builder { #prevId = 0n; sourceInfo: SourceInfo = { - $typeName: "dev.cel.expr.SourceInfo", + $typeName: "cel.expr.SourceInfo", syntaxVersion: "", location: "", lineOffsets: [], positions: {}, macroCalls: {}, + extensions: [], }; nextExpr(offset: number, exprKind: Expr["exprKind"]): Expr { this.sourceInfo.positions[(++this.#prevId).toString()] = offset; return { - $typeName: "dev.cel.expr.Expr", + $typeName: "cel.expr.Expr", id: this.#prevId, exprKind, }; @@ -154,7 +155,7 @@ class Builder { this.sourceInfo.positions[(++this.#prevId).toString()] = offset; return { - $typeName: "dev.cel.expr.Expr.CreateStruct.Entry", + $typeName: "cel.expr.Expr.CreateStruct.Entry", id: this.#prevId, keyKind, value, @@ -165,7 +166,7 @@ class Builder { newConstExpr(offset: number, constantKind: Constant["constantKind"]): Expr { return this.nextExpr(offset, { case: "constExpr", - value: { $typeName: "dev.cel.expr.Constant", constantKind }, + value: { $typeName: "cel.expr.Constant", constantKind }, }); } @@ -180,7 +181,7 @@ class Builder { return this.nextExpr(offset, { case: "callExpr", value: { - $typeName: "dev.cel.expr.Expr.Call", + $typeName: "cel.expr.Expr.Call", function: functionName, args, }, @@ -199,7 +200,7 @@ class Builder { this.nextExpr(offset, { case: "callExpr", value: { - $typeName: "dev.cel.expr.Expr.Call", + $typeName: "cel.expr.Expr.Call", function: functionName, target, args, @@ -280,7 +281,7 @@ class Builder { newIdentExpr(offset: number, name: string): Expr { const expr = this.nextExpr(offset, { case: "identExpr", - value: { $typeName: "dev.cel.expr.Expr.Ident", name }, + value: { $typeName: "cel.expr.Expr.Ident", name }, }); return expr; } @@ -293,7 +294,7 @@ class Builder { return this.nextExpr(offset, { case: "selectExpr", value: { - $typeName: "dev.cel.expr.Expr.Select", + $typeName: "cel.expr.Expr.Select", operand, field, testOnly: false, @@ -318,7 +319,7 @@ class Builder { return this.nextExpr(offset, { case: "listExpr", value: { - $typeName: "dev.cel.expr.Expr.CreateList", + $typeName: "cel.expr.Expr.CreateList", elements, optionalIndices: [], }, @@ -336,13 +337,14 @@ class Builder { return this.nextExpr(offset, { case: "comprehensionExpr", value: { - $typeName: "dev.cel.expr.Expr.Comprehension", + $typeName: "cel.expr.Expr.Comprehension", accuVar: "__result__", accuInit: this.newConstExpr(offset, { case: "boolValue", value: init, }), iterVar, + iterVar2: "", // not yet supported iterRange, loopStep, loopCondition, @@ -360,10 +362,11 @@ class Builder { return this.nextExpr(offset, { case: "comprehensionExpr", value: { - $typeName: "dev.cel.expr.Expr.Comprehension", + $typeName: "cel.expr.Expr.Comprehension", accuVar: "__result__", accuInit: this.newListExpr(offset, []), iterVar, + iterVar2: "", // not yet supported iterRange, loopCondition: this.newConstExpr(offset, { case: "boolValue", @@ -468,13 +471,14 @@ class Builder { return this.nextExpr(offset, { case: "comprehensionExpr", value: { - $typeName: "dev.cel.expr.Expr.Comprehension", + $typeName: "cel.expr.Expr.Comprehension", accuVar: "__result__", accuInit: this.newConstExpr(offset, { case: "int64Value", value: BigInt(0), }), iterVar, + iterVar2: "", // not yet supported iterRange, loopCondition: this.newConstExpr(offset, { case: "boolValue", @@ -506,6 +510,7 @@ class Builder { if (call.exprKind.case === "callExpr") { const callExpr = call.exprKind.value; const varName = callExpr.args[0]; + const varIndex = callExpr.args.length > 1 ? callExpr.args[1] : ""; if ( varName !== undefined && call.exprKind.value.target !== undefined && @@ -582,7 +587,7 @@ class Builder { return this.nextExpr(offset, { case: "structExpr", value: { - $typeName: "dev.cel.expr.Expr.CreateStruct", + $typeName: "cel.expr.Expr.CreateStruct", entries, messageName, }, diff --git a/cel.peggy b/cel.peggy index e5c798e..8d30cd4 100644 --- a/cel.peggy +++ b/cel.peggy @@ -13,7 +13,7 @@ // limitations under the License. {{ - import type { Expr, Expr_CreateStruct_Entry } from "./external/proto/dev/cel/expr/syntax_pb.ts"; + import type { Expr, Expr_CreateStruct_Entry } from "./external/cel/expr/syntax_pb.ts"; import { LazyBuilder } from "./builder.ts"; import type { Eventual } from "./builder.ts"; const builder = new LazyBuilder(); diff --git a/package-lock.json b/package-lock.json index aae79e6..d90da0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2315,9 +2315,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "license": "MIT", "peer": true, diff --git a/package.json b/package.json index 1868e39..6c7ccce 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "clean": "rm -rf index.ts index.ast utility/extract-parser-tests/bin dist/ external/ node_modules/ &> /dev/null", "generate-control-parser": "peggy cel.peggy --format es -o ./index.ts", "generate-parser": "peggy cel.peggy --format bare --extra-options '{\"typescript\":true}' --plugin peggy-ts -o ./index.ts && prettier index.ts --write", - "generate-proto": "buf generate --include-imports buf.build/cel/spec", + "generate-proto": "buf generate --include-imports buf.build/google/cel-spec:v0.18.0", "generate-parser-ast": "peggy cel.peggy --ast --plugin peggy-ts -o ./index.ast", "bundle-init": "rm -rf dist/ &> /dev/null && mkdir dist", "bundle-cjs": "esbuild index.ts --bundle --format=cjs --outfile=dist/index.cjs && prettier dist/index.cjs --write", @@ -71,7 +71,7 @@ } }, "utility": { - "celSpec": "https://github.com/google/cel-spec/archive/7bcc79c7cb9a101a66dbbe9c88838855dc4b821d.tar.gz", - "celGo": "https://github.com/google/cel-go/archive/3545aac7e6d484d3035b1833c4ade036c3f7bacb.tar.gz" + "celSpec": "https://github.com/google/cel-spec/archive/373994d7e20e582fce56767b01ac5039524cddab.tar.gz", + "celGo": "https://github.com/google/cel-go/archive/8ad600b649be1b9ef5a003e8c5632d89b9aaf790.tar.gz" } } diff --git a/test/conformance.test.ts b/test/conformance.test.ts index b2481cb..18edcfc 100644 --- a/test/conformance.test.ts +++ b/test/conformance.test.ts @@ -2,11 +2,8 @@ import * as fs from "fs"; import { parse } from "../index.ts"; import { fromJson } from "@bufbuild/protobuf"; -import { ExprSchema } from "../external/proto/dev/cel/expr/syntax_pb.ts"; -import type { - Expr, - Expr_Call, -} from "../external/proto/dev/cel/expr/syntax_pb.ts"; +import { ExprSchema } from "../external/cel/expr/syntax_pb.ts"; +import type { Expr, Expr_Call } from "../external/cel/expr/syntax_pb.ts"; const files = JSON.parse( fs.readFileSync(`${__dirname}/data/conformance.json`, "utf8"), diff --git a/test/data/conformance.json b/test/data/conformance.json index 597c259..19a003d 100644 --- a/test/data/conformance.json +++ b/test/data/conformance.json @@ -13171,27 +13171,27 @@ }, { "name": "eq_proto2_any_unpack_equal", - "expression": "TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} == TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", + "expression": "TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} == TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [365], + "lineOffsets": [373], "positions": { "1": 12, "2": 23, - "3": 37, - "4": 46, - "5": 48, - "6": 120, - "7": 122, - "8": 181, - "9": 196, - "10": 207, - "11": 221, - "12": 230, - "13": 232, - "14": 304, - "15": 306 + "3": 44, + "4": 53, + "5": 55, + "6": 124, + "7": 126, + "8": 185, + "9": 200, + "10": 211, + "11": 232, + "12": 241, + "13": 243, + "14": 312, + "15": 314 } }, "expr": { @@ -13210,7 +13210,7 @@ "value": { "id": "3", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "4", @@ -13218,7 +13218,7 @@ "value": { "id": "5", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -13250,7 +13250,7 @@ "value": { "id": "11", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "12", @@ -13258,7 +13258,7 @@ "value": { "id": "13", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -13286,27 +13286,27 @@ }, { "name": "eq_proto2_any_unpack_not_equal", - "expression": "TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'a\\000\\000\\000\\000\\000H\\223\\300r\\0041234'}} == TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", + "expression": "TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'a\\000\\000\\000\\000\\000H\\223\\300r\\0041234'}} == TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [351], + "lineOffsets": [359], "positions": { "1": 12, "2": 23, - "3": 37, - "4": 46, - "5": 48, - "6": 120, - "7": 122, - "8": 167, - "9": 182, - "10": 193, - "11": 207, - "12": 216, - "13": 218, - "14": 290, - "15": 292 + "3": 44, + "4": 53, + "5": 55, + "6": 124, + "7": 126, + "8": 171, + "9": 186, + "10": 197, + "11": 218, + "12": 227, + "13": 229, + "14": 298, + "15": 300 } }, "expr": { @@ -13325,7 +13325,7 @@ "value": { "id": "3", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "4", @@ -13333,7 +13333,7 @@ "value": { "id": "5", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -13365,7 +13365,7 @@ "value": { "id": "11", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "12", @@ -13373,7 +13373,7 @@ "value": { "id": "13", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -13401,27 +13401,27 @@ }, { "name": "eq_proto2_any_unpack_bytewise_fallback_not_equal", - "expression": "TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} == TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", + "expression": "TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} == TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [405], + "lineOffsets": [413], "positions": { "1": 12, "2": 23, - "3": 37, - "4": 46, - "5": 48, - "6": 120, - "7": 122, - "8": 201, - "9": 216, - "10": 227, - "11": 241, - "12": 250, - "13": 252, - "14": 324, - "15": 326 + "3": 44, + "4": 53, + "5": 55, + "6": 124, + "7": 126, + "8": 205, + "9": 220, + "10": 231, + "11": 252, + "12": 261, + "13": 263, + "14": 332, + "15": 334 } }, "expr": { @@ -13440,7 +13440,7 @@ "value": { "id": "3", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "4", @@ -13448,7 +13448,7 @@ "value": { "id": "5", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -13480,7 +13480,7 @@ "value": { "id": "11", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "12", @@ -13488,7 +13488,7 @@ "value": { "id": "13", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -13516,27 +13516,27 @@ }, { "name": "eq_proto2_any_unpack_bytewise_fallback_equal", - "expression": "TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} == TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}}", + "expression": "TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} == TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [405], + "lineOffsets": [413], "positions": { "1": 12, "2": 23, - "3": 37, - "4": 46, - "5": 48, - "6": 120, - "7": 122, - "8": 201, - "9": 216, - "10": 227, - "11": 241, - "12": 250, - "13": 252, - "14": 324, - "15": 326 + "3": 44, + "4": 53, + "5": 55, + "6": 124, + "7": 126, + "8": 205, + "9": 220, + "10": 231, + "11": 252, + "12": 261, + "13": 263, + "14": 332, + "15": 334 } }, "expr": { @@ -13555,7 +13555,7 @@ "value": { "id": "3", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "4", @@ -13563,7 +13563,7 @@ "value": { "id": "5", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -13595,7 +13595,7 @@ "value": { "id": "11", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "12", @@ -13603,7 +13603,7 @@ "value": { "id": "13", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -13631,27 +13631,27 @@ }, { "name": "eq_proto3_any_unpack_equal", - "expression": "TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} == TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", + "expression": "TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} == TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [365], + "lineOffsets": [373], "positions": { "1": 12, "2": 23, - "3": 37, - "4": 46, - "5": 48, - "6": 120, - "7": 122, - "8": 181, - "9": 196, - "10": 207, - "11": 221, - "12": 230, - "13": 232, - "14": 304, - "15": 306 + "3": 44, + "4": 53, + "5": 55, + "6": 124, + "7": 126, + "8": 185, + "9": 200, + "10": 211, + "11": 232, + "12": 241, + "13": 243, + "14": 312, + "15": 314 } }, "expr": { @@ -13670,7 +13670,7 @@ "value": { "id": "3", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "4", @@ -13678,7 +13678,7 @@ "value": { "id": "5", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -13710,7 +13710,7 @@ "value": { "id": "11", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "12", @@ -13718,7 +13718,7 @@ "value": { "id": "13", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -13746,27 +13746,27 @@ }, { "name": "eq_proto3_any_unpack_not_equal", - "expression": "TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'a\\000\\000\\000\\000\\000H\\223\\300r\\0041234'}} == TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", + "expression": "TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'a\\000\\000\\000\\000\\000H\\223\\300r\\0041234'}} == TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [351], + "lineOffsets": [359], "positions": { "1": 12, "2": 23, - "3": 37, - "4": 46, - "5": 48, - "6": 120, - "7": 122, - "8": 167, - "9": 182, - "10": 193, - "11": 207, - "12": 216, - "13": 218, - "14": 290, - "15": 292 + "3": 44, + "4": 53, + "5": 55, + "6": 124, + "7": 126, + "8": 171, + "9": 186, + "10": 197, + "11": 218, + "12": 227, + "13": 229, + "14": 298, + "15": 300 } }, "expr": { @@ -13785,7 +13785,7 @@ "value": { "id": "3", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "4", @@ -13793,7 +13793,7 @@ "value": { "id": "5", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -13825,7 +13825,7 @@ "value": { "id": "11", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "12", @@ -13833,7 +13833,7 @@ "value": { "id": "13", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -13861,27 +13861,27 @@ }, { "name": "eq_proto3_any_unpack_bytewise_fallback_not_equal", - "expression": "TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} == TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", + "expression": "TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} == TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [405], + "lineOffsets": [413], "positions": { "1": 12, "2": 23, - "3": 37, - "4": 46, - "5": 48, - "6": 120, - "7": 122, - "8": 201, - "9": 216, - "10": 227, - "11": 241, - "12": 250, - "13": 252, - "14": 324, - "15": 326 + "3": 44, + "4": 53, + "5": 55, + "6": 124, + "7": 126, + "8": 205, + "9": 220, + "10": 231, + "11": 252, + "12": 261, + "13": 263, + "14": 332, + "15": 334 } }, "expr": { @@ -13900,7 +13900,7 @@ "value": { "id": "3", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "4", @@ -13908,7 +13908,7 @@ "value": { "id": "5", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -13940,7 +13940,7 @@ "value": { "id": "11", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "12", @@ -13948,7 +13948,7 @@ "value": { "id": "13", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -13976,27 +13976,27 @@ }, { "name": "eq_proto3_any_unpack_bytewise_fallback_equal", - "expression": "TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} == TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}}", + "expression": "TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} == TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [405], + "lineOffsets": [413], "positions": { "1": 12, "2": 23, - "3": 37, - "4": 46, - "5": 48, - "6": 120, - "7": 122, - "8": 201, - "9": 216, - "10": 227, - "11": 241, - "12": 250, - "13": 252, - "14": 324, - "15": 326 + "3": 44, + "4": 53, + "5": 55, + "6": 124, + "7": 126, + "8": 205, + "9": 220, + "10": 231, + "11": 252, + "12": 261, + "13": 263, + "14": 332, + "15": 334 } }, "expr": { @@ -14015,7 +14015,7 @@ "value": { "id": "3", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "4", @@ -14023,7 +14023,7 @@ "value": { "id": "5", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -14055,7 +14055,7 @@ "value": { "id": "11", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "12", @@ -14063,7 +14063,7 @@ "value": { "id": "13", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -15766,27 +15766,27 @@ }, { "name": "ne_proto2_any_unpack", - "expression": "TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} != TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", + "expression": "TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} != TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [365], + "lineOffsets": [373], "positions": { "1": 12, "2": 23, - "3": 37, - "4": 46, - "5": 48, - "6": 120, - "7": 122, - "8": 181, - "9": 196, - "10": 207, - "11": 221, - "12": 230, - "13": 232, - "14": 304, - "15": 306 + "3": 44, + "4": 53, + "5": 55, + "6": 124, + "7": 126, + "8": 185, + "9": 200, + "10": 211, + "11": 232, + "12": 241, + "13": 243, + "14": 312, + "15": 314 } }, "expr": { @@ -15805,7 +15805,7 @@ "value": { "id": "3", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "4", @@ -15813,7 +15813,7 @@ "value": { "id": "5", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -15845,7 +15845,7 @@ "value": { "id": "11", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "12", @@ -15853,7 +15853,7 @@ "value": { "id": "13", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -15881,27 +15881,27 @@ }, { "name": "ne_proto2_any_unpack_bytewise_fallback", - "expression": "TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} != TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", + "expression": "TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} != TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [405], + "lineOffsets": [413], "positions": { "1": 12, "2": 23, - "3": 37, - "4": 46, - "5": 48, - "6": 120, - "7": 122, - "8": 201, - "9": 216, - "10": 227, - "11": 241, - "12": 250, - "13": 252, - "14": 324, - "15": 326 + "3": 44, + "4": 53, + "5": 55, + "6": 124, + "7": 126, + "8": 205, + "9": 220, + "10": 231, + "11": 252, + "12": 261, + "13": 263, + "14": 332, + "15": 334 } }, "expr": { @@ -15920,7 +15920,7 @@ "value": { "id": "3", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "4", @@ -15928,7 +15928,7 @@ "value": { "id": "5", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -15960,7 +15960,7 @@ "value": { "id": "11", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "12", @@ -15968,7 +15968,7 @@ "value": { "id": "13", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -15996,27 +15996,27 @@ }, { "name": "ne_proto3_any_unpack", - "expression": "TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} != TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", + "expression": "TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} != TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [365], + "lineOffsets": [373], "positions": { "1": 12, "2": 23, - "3": 37, - "4": 46, - "5": 48, - "6": 120, - "7": 122, - "8": 181, - "9": 196, - "10": 207, - "11": 221, - "12": 230, - "13": 232, - "14": 304, - "15": 306 + "3": 44, + "4": 53, + "5": 55, + "6": 124, + "7": 126, + "8": 185, + "9": 200, + "10": 211, + "11": 232, + "12": 241, + "13": 243, + "14": 312, + "15": 314 } }, "expr": { @@ -16035,7 +16035,7 @@ "value": { "id": "3", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "4", @@ -16043,7 +16043,7 @@ "value": { "id": "5", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -16075,7 +16075,7 @@ "value": { "id": "11", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "12", @@ -16083,7 +16083,7 @@ "value": { "id": "13", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -16111,27 +16111,27 @@ }, { "name": "ne_proto3_any_unpack_bytewise_fallback", - "expression": "TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} != TestAllTypes{single_any: protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", + "expression": "TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001r\\0041234'}} != TestAllTypes{single_any: google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\242\\006\\023\\022\\021r\\0041234\\020\\256\\366\\377\\377\\377\\377\\377\\377\\377\\001'}}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [405], + "lineOffsets": [413], "positions": { "1": 12, "2": 23, - "3": 37, - "4": 46, - "5": 48, - "6": 120, - "7": 122, - "8": 201, - "9": 216, - "10": 227, - "11": 241, - "12": 250, - "13": 252, - "14": 324, - "15": 326 + "3": 44, + "4": 53, + "5": 55, + "6": 124, + "7": 126, + "8": 205, + "9": 220, + "10": 231, + "11": 252, + "12": 261, + "13": 263, + "14": 332, + "15": 334 } }, "expr": { @@ -16150,7 +16150,7 @@ "value": { "id": "3", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "4", @@ -16158,7 +16158,7 @@ "value": { "id": "5", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -16190,7 +16190,7 @@ "value": { "id": "11", "structExpr": { - "messageName": "protobuf.Any", + "messageName": "google.protobuf.Any", "entries": [ { "id": "12", @@ -16198,7 +16198,7 @@ "value": { "id": "13", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -31150,12 +31150,12 @@ "tests": [ { "name": "literal", - "expression": "google.protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\x08\\x96\\x01'}", + "expression": "google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\x08\\x96\\x01'}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [121], - "positions": { "1": 19, "2": 28, "3": 30, "4": 102, "5": 104 } + "lineOffsets": [118], + "positions": { "1": 19, "2": 28, "3": 30, "4": 99, "5": 101 } }, "expr": { "id": "1", @@ -31168,7 +31168,7 @@ "value": { "id": "3", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -31187,18 +31187,18 @@ }, { "name": "literal_no_field_access", - "expression": "google.protobuf.Any{type_url: 'type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes', value: b'\\x08\\x96\\x01'}.type_url", + "expression": "google.protobuf.Any{type_url: 'type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes', value: b'\\x08\\x96\\x01'}.type_url", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [130], + "lineOffsets": [127], "positions": { "1": 19, "2": 28, "3": 30, - "4": 102, - "5": 104, - "6": 120 + "4": 99, + "5": 101, + "6": 117 } }, "expr": { @@ -31215,7 +31215,7 @@ "value": { "id": "3", "constExpr": { - "stringValue": "type.googleapis.com/google.api.expr.test.v1.proto2.TestAllTypes" + "stringValue": "type.googleapis.com/cel.expr.conformance.proto2.TestAllTypes" } } }, @@ -34427,6 +34427,892 @@ } } }, + { + "name": "map_no_such_key_or_false", + "expression": "dyn({0:1,2:2,5:3}[1]) || false", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [31], + "positions": { + "1": 3, + "2": 4, + "3": 6, + "4": 5, + "5": 7, + "6": 10, + "7": 9, + "8": 11, + "9": 14, + "10": 13, + "11": 15, + "12": 17, + "13": 18, + "14": 25, + "15": 22 + } + }, + "expr": { + "id": "15", + "callExpr": { + "function": "_||_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "12", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "structExpr": { + "entries": [ + { + "id": "3", + "mapKey": { + "id": "4", + "constExpr": { "int64Value": "0" } + }, + "value": { + "id": "5", + "constExpr": { "int64Value": "1" } + } + }, + { + "id": "6", + "mapKey": { + "id": "7", + "constExpr": { "int64Value": "2" } + }, + "value": { + "id": "8", + "constExpr": { "int64Value": "2" } + } + }, + { + "id": "9", + "mapKey": { + "id": "10", + "constExpr": { "int64Value": "5" } + }, + "value": { + "id": "11", + "constExpr": { "int64Value": "3" } + } + } + ] + } + }, + { + "id": "13", + "constExpr": { "int64Value": "1" } + } + ] + } + } + ] + } + }, + { "id": "14", "constExpr": { "boolValue": false } } + ] + } + } + } + }, + { + "name": "map_no_such_key_or_true", + "expression": "dyn({0:1,2:2,5:3}[1]) || true", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [30], + "positions": { + "1": 3, + "2": 4, + "3": 6, + "4": 5, + "5": 7, + "6": 10, + "7": 9, + "8": 11, + "9": 14, + "10": 13, + "11": 15, + "12": 17, + "13": 18, + "14": 25, + "15": 22 + } + }, + "expr": { + "id": "15", + "callExpr": { + "function": "_||_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "12", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "structExpr": { + "entries": [ + { + "id": "3", + "mapKey": { + "id": "4", + "constExpr": { "int64Value": "0" } + }, + "value": { + "id": "5", + "constExpr": { "int64Value": "1" } + } + }, + { + "id": "6", + "mapKey": { + "id": "7", + "constExpr": { "int64Value": "2" } + }, + "value": { + "id": "8", + "constExpr": { "int64Value": "2" } + } + }, + { + "id": "9", + "mapKey": { + "id": "10", + "constExpr": { "int64Value": "5" } + }, + "value": { + "id": "11", + "constExpr": { "int64Value": "3" } + } + } + ] + } + }, + { + "id": "13", + "constExpr": { "int64Value": "1" } + } + ] + } + } + ] + } + }, + { "id": "14", "constExpr": { "boolValue": true } } + ] + } + } + } + }, + { + "name": "map_no_such_key_and_false", + "expression": "dyn({0:1,2:2,5:3}[1]) \u0026\u0026 false", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [31], + "positions": { + "1": 3, + "2": 4, + "3": 6, + "4": 5, + "5": 7, + "6": 10, + "7": 9, + "8": 11, + "9": 14, + "10": 13, + "11": 15, + "12": 17, + "13": 18, + "14": 25, + "15": 22 + } + }, + "expr": { + "id": "15", + "callExpr": { + "function": "_\u0026\u0026_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "12", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "structExpr": { + "entries": [ + { + "id": "3", + "mapKey": { + "id": "4", + "constExpr": { "int64Value": "0" } + }, + "value": { + "id": "5", + "constExpr": { "int64Value": "1" } + } + }, + { + "id": "6", + "mapKey": { + "id": "7", + "constExpr": { "int64Value": "2" } + }, + "value": { + "id": "8", + "constExpr": { "int64Value": "2" } + } + }, + { + "id": "9", + "mapKey": { + "id": "10", + "constExpr": { "int64Value": "5" } + }, + "value": { + "id": "11", + "constExpr": { "int64Value": "3" } + } + } + ] + } + }, + { + "id": "13", + "constExpr": { "int64Value": "1" } + } + ] + } + } + ] + } + }, + { "id": "14", "constExpr": { "boolValue": false } } + ] + } + } + } + }, + { + "name": "map_no_such_key_and_true", + "expression": "dyn({0:1,2:2,5:3}[1]) \u0026\u0026 true", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [30], + "positions": { + "1": 3, + "2": 4, + "3": 6, + "4": 5, + "5": 7, + "6": 10, + "7": 9, + "8": 11, + "9": 14, + "10": 13, + "11": 15, + "12": 17, + "13": 18, + "14": 25, + "15": 22 + } + }, + "expr": { + "id": "15", + "callExpr": { + "function": "_\u0026\u0026_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "12", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "structExpr": { + "entries": [ + { + "id": "3", + "mapKey": { + "id": "4", + "constExpr": { "int64Value": "0" } + }, + "value": { + "id": "5", + "constExpr": { "int64Value": "1" } + } + }, + { + "id": "6", + "mapKey": { + "id": "7", + "constExpr": { "int64Value": "2" } + }, + "value": { + "id": "8", + "constExpr": { "int64Value": "2" } + } + }, + { + "id": "9", + "mapKey": { + "id": "10", + "constExpr": { "int64Value": "5" } + }, + "value": { + "id": "11", + "constExpr": { "int64Value": "3" } + } + } + ] + } + }, + { + "id": "13", + "constExpr": { "int64Value": "1" } + } + ] + } + } + ] + } + }, + { "id": "14", "constExpr": { "boolValue": true } } + ] + } + } + } + }, + { + "name": "map_bad_key_type", + "expression": "{0:1,2:2,5:3}[dyn(b'')]", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [24], + "positions": { + "1": 0, + "2": 2, + "3": 1, + "4": 3, + "5": 6, + "6": 5, + "7": 7, + "8": 10, + "9": 9, + "10": 11, + "11": 13, + "12": 17, + "13": 18 + } + }, + "expr": { + "id": "11", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "1", + "structExpr": { + "entries": [ + { + "id": "2", + "mapKey": { + "id": "3", + "constExpr": { "int64Value": "0" } + }, + "value": { + "id": "4", + "constExpr": { "int64Value": "1" } + } + }, + { + "id": "5", + "mapKey": { + "id": "6", + "constExpr": { "int64Value": "2" } + }, + "value": { + "id": "7", + "constExpr": { "int64Value": "2" } + } + }, + { + "id": "8", + "mapKey": { + "id": "9", + "constExpr": { "int64Value": "5" } + }, + "value": { + "id": "10", + "constExpr": { "int64Value": "3" } + } + } + ] + } + }, + { + "id": "12", + "callExpr": { + "function": "dyn", + "args": [ + { "id": "13", "constExpr": { "bytesValue": "" } } + ] + } + } + ] + } + } + } + }, + { + "name": "map_bad_key_type_or_false", + "expression": "dyn({0:1,2:2,5:3}[dyn(b'')]) || false", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [38], + "positions": { + "1": 3, + "2": 4, + "3": 6, + "4": 5, + "5": 7, + "6": 10, + "7": 9, + "8": 11, + "9": 14, + "10": 13, + "11": 15, + "12": 17, + "13": 21, + "14": 22, + "15": 32, + "16": 29 + } + }, + "expr": { + "id": "16", + "callExpr": { + "function": "_||_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "12", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "structExpr": { + "entries": [ + { + "id": "3", + "mapKey": { + "id": "4", + "constExpr": { "int64Value": "0" } + }, + "value": { + "id": "5", + "constExpr": { "int64Value": "1" } + } + }, + { + "id": "6", + "mapKey": { + "id": "7", + "constExpr": { "int64Value": "2" } + }, + "value": { + "id": "8", + "constExpr": { "int64Value": "2" } + } + }, + { + "id": "9", + "mapKey": { + "id": "10", + "constExpr": { "int64Value": "5" } + }, + "value": { + "id": "11", + "constExpr": { "int64Value": "3" } + } + } + ] + } + }, + { + "id": "13", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "14", + "constExpr": { "bytesValue": "" } + } + ] + } + } + ] + } + } + ] + } + }, + { "id": "15", "constExpr": { "boolValue": false } } + ] + } + } + } + }, + { + "name": "map_bad_key_type_or_true", + "expression": "dyn({0:1,2:2,5:3}[dyn(b'')]) || true", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [37], + "positions": { + "1": 3, + "2": 4, + "3": 6, + "4": 5, + "5": 7, + "6": 10, + "7": 9, + "8": 11, + "9": 14, + "10": 13, + "11": 15, + "12": 17, + "13": 21, + "14": 22, + "15": 32, + "16": 29 + } + }, + "expr": { + "id": "16", + "callExpr": { + "function": "_||_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "12", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "structExpr": { + "entries": [ + { + "id": "3", + "mapKey": { + "id": "4", + "constExpr": { "int64Value": "0" } + }, + "value": { + "id": "5", + "constExpr": { "int64Value": "1" } + } + }, + { + "id": "6", + "mapKey": { + "id": "7", + "constExpr": { "int64Value": "2" } + }, + "value": { + "id": "8", + "constExpr": { "int64Value": "2" } + } + }, + { + "id": "9", + "mapKey": { + "id": "10", + "constExpr": { "int64Value": "5" } + }, + "value": { + "id": "11", + "constExpr": { "int64Value": "3" } + } + } + ] + } + }, + { + "id": "13", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "14", + "constExpr": { "bytesValue": "" } + } + ] + } + } + ] + } + } + ] + } + }, + { "id": "15", "constExpr": { "boolValue": true } } + ] + } + } + } + }, + { + "name": "map_bad_key_type_and_false", + "expression": "dyn({0:1,2:2,5:3}[dyn(b'')]) \u0026\u0026 false", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [38], + "positions": { + "1": 3, + "2": 4, + "3": 6, + "4": 5, + "5": 7, + "6": 10, + "7": 9, + "8": 11, + "9": 14, + "10": 13, + "11": 15, + "12": 17, + "13": 21, + "14": 22, + "15": 32, + "16": 29 + } + }, + "expr": { + "id": "16", + "callExpr": { + "function": "_\u0026\u0026_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "12", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "structExpr": { + "entries": [ + { + "id": "3", + "mapKey": { + "id": "4", + "constExpr": { "int64Value": "0" } + }, + "value": { + "id": "5", + "constExpr": { "int64Value": "1" } + } + }, + { + "id": "6", + "mapKey": { + "id": "7", + "constExpr": { "int64Value": "2" } + }, + "value": { + "id": "8", + "constExpr": { "int64Value": "2" } + } + }, + { + "id": "9", + "mapKey": { + "id": "10", + "constExpr": { "int64Value": "5" } + }, + "value": { + "id": "11", + "constExpr": { "int64Value": "3" } + } + } + ] + } + }, + { + "id": "13", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "14", + "constExpr": { "bytesValue": "" } + } + ] + } + } + ] + } + } + ] + } + }, + { "id": "15", "constExpr": { "boolValue": false } } + ] + } + } + } + }, + { + "name": "map_bad_key_type_and_true", + "expression": "dyn({0:1,2:2,5:3}[dyn(b'')]) \u0026\u0026 true", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [37], + "positions": { + "1": 3, + "2": 4, + "3": 6, + "4": 5, + "5": 7, + "6": 10, + "7": 9, + "8": 11, + "9": 14, + "10": 13, + "11": 15, + "12": 17, + "13": 21, + "14": 22, + "15": 32, + "16": 29 + } + }, + "expr": { + "id": "16", + "callExpr": { + "function": "_\u0026\u0026_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "12", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "structExpr": { + "entries": [ + { + "id": "3", + "mapKey": { + "id": "4", + "constExpr": { "int64Value": "0" } + }, + "value": { + "id": "5", + "constExpr": { "int64Value": "1" } + } + }, + { + "id": "6", + "mapKey": { + "id": "7", + "constExpr": { "int64Value": "2" } + }, + "value": { + "id": "8", + "constExpr": { "int64Value": "2" } + } + }, + { + "id": "9", + "mapKey": { + "id": "10", + "constExpr": { "int64Value": "5" } + }, + "value": { + "id": "11", + "constExpr": { "int64Value": "3" } + } + } + ] + } + }, + { + "id": "13", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "14", + "constExpr": { "bytesValue": "" } + } + ] + } + } + ] + } + } + ] + } + }, + { "id": "15", "constExpr": { "boolValue": true } } + ] + } + } + } + }, { "name": "map_field_select_no_such_key", "expression": "x.name", @@ -34445,6 +35331,158 @@ } } }, + { + "name": "map_field_select_no_such_key_or_false", + "expression": "dyn(x.name) || false", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [21], + "positions": { "1": 3, "2": 4, "3": 5, "4": 15, "5": 12 } + }, + "expr": { + "id": "5", + "callExpr": { + "function": "_||_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "3", + "selectExpr": { + "operand": { + "id": "2", + "identExpr": { "name": "x" } + }, + "field": "name" + } + } + ] + } + }, + { "id": "4", "constExpr": { "boolValue": false } } + ] + } + } + } + }, + { + "name": "map_field_select_no_such_key_or_true", + "expression": "dyn(x.name) || true", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [20], + "positions": { "1": 3, "2": 4, "3": 5, "4": 15, "5": 12 } + }, + "expr": { + "id": "5", + "callExpr": { + "function": "_||_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "3", + "selectExpr": { + "operand": { + "id": "2", + "identExpr": { "name": "x" } + }, + "field": "name" + } + } + ] + } + }, + { "id": "4", "constExpr": { "boolValue": true } } + ] + } + } + } + }, + { + "name": "map_field_select_no_such_key_and_false", + "expression": "dyn(x.name) \u0026\u0026 false", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [21], + "positions": { "1": 3, "2": 4, "3": 5, "4": 15, "5": 12 } + }, + "expr": { + "id": "5", + "callExpr": { + "function": "_\u0026\u0026_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "3", + "selectExpr": { + "operand": { + "id": "2", + "identExpr": { "name": "x" } + }, + "field": "name" + } + } + ] + } + }, + { "id": "4", "constExpr": { "boolValue": false } } + ] + } + } + } + }, + { + "name": "map_field_select_no_such_key_and_true", + "expression": "dyn(x.name) \u0026\u0026 true", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [20], + "positions": { "1": 3, "2": 4, "3": 5, "4": 15, "5": 12 } + }, + "expr": { + "id": "5", + "callExpr": { + "function": "_\u0026\u0026_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "3", + "selectExpr": { + "operand": { + "id": "2", + "identExpr": { "name": "x" } + }, + "field": "name" + } + } + ] + } + }, + { "id": "4", "constExpr": { "boolValue": true } } + ] + } + } + } + }, { "name": "map_value_null", "expression": "{true:null}[true]", @@ -39287,9 +40325,478 @@ "id": "1", "listExpr": { "elements": [ - { "id": "2", "constExpr": { "int64Value": "7" } }, - { "id": "3", "constExpr": { "int64Value": "8" } }, - { "id": "4", "constExpr": { "int64Value": "9" } } + { "id": "2", "constExpr": { "int64Value": "7" } }, + { "id": "3", "constExpr": { "int64Value": "8" } }, + { "id": "4", "constExpr": { "int64Value": "9" } } + ] + } + }, + { + "id": "6", + "callExpr": { + "function": "dyn", + "args": [ + { "id": "7", "constExpr": { "uint64Value": "0" } } + ] + } + } + ] + } + } + } + }, + { + "name": "singleton", + "expression": "['foo'][0]", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [11], + "positions": { "1": 0, "2": 1, "3": 7, "4": 8 } + }, + "expr": { + "id": "3", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "1", + "listExpr": { + "elements": [ + { "id": "2", "constExpr": { "stringValue": "foo" } } + ] + } + }, + { "id": "4", "constExpr": { "int64Value": "0" } } + ] + } + } + } + }, + { + "name": "middle", + "expression": "[0, 1, 1, 2, 3, 5, 8, 13][4]", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [29], + "positions": { + "1": 0, + "2": 1, + "3": 4, + "4": 7, + "5": 10, + "6": 13, + "7": 16, + "8": 19, + "9": 22, + "10": 25, + "11": 26 + } + }, + "expr": { + "id": "10", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "1", + "listExpr": { + "elements": [ + { "id": "2", "constExpr": { "int64Value": "0" } }, + { "id": "3", "constExpr": { "int64Value": "1" } }, + { "id": "4", "constExpr": { "int64Value": "1" } }, + { "id": "5", "constExpr": { "int64Value": "2" } }, + { "id": "6", "constExpr": { "int64Value": "3" } }, + { "id": "7", "constExpr": { "int64Value": "5" } }, + { "id": "8", "constExpr": { "int64Value": "8" } }, + { "id": "9", "constExpr": { "int64Value": "13" } } + ] + } + }, + { "id": "11", "constExpr": { "int64Value": "4" } } + ] + } + } + } + }, + { + "name": "last", + "expression": "['George', 'John', 'Paul', 'Ringo'][3]", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [39], + "positions": { + "1": 0, + "2": 1, + "3": 11, + "4": 19, + "5": 27, + "6": 35, + "7": 36 + } + }, + "expr": { + "id": "6", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "1", + "listExpr": { + "elements": [ + { + "id": "2", + "constExpr": { "stringValue": "George" } + }, + { "id": "3", "constExpr": { "stringValue": "John" } }, + { "id": "4", "constExpr": { "stringValue": "Paul" } }, + { "id": "5", "constExpr": { "stringValue": "Ringo" } } + ] + } + }, + { "id": "7", "constExpr": { "int64Value": "3" } } + ] + } + } + } + }, + { + "name": "index_out_of_bounds", + "expression": "[1, 2, 3][3]", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [13], + "positions": { "1": 0, "2": 1, "3": 4, "4": 7, "5": 9, "6": 10 } + }, + "expr": { + "id": "5", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "1", + "listExpr": { + "elements": [ + { "id": "2", "constExpr": { "int64Value": "1" } }, + { "id": "3", "constExpr": { "int64Value": "2" } }, + { "id": "4", "constExpr": { "int64Value": "3" } } + ] + } + }, + { "id": "6", "constExpr": { "int64Value": "3" } } + ] + } + } + } + }, + { + "name": "index_out_of_bounds_or_false", + "expression": "dyn([1, 2, 3][3]) || false", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [27], + "positions": { + "1": 3, + "2": 4, + "3": 5, + "4": 8, + "5": 11, + "6": 13, + "7": 14, + "8": 21, + "9": 18 + } + }, + "expr": { + "id": "9", + "callExpr": { + "function": "_||_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "6", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "listExpr": { + "elements": [ + { + "id": "3", + "constExpr": { "int64Value": "1" } + }, + { + "id": "4", + "constExpr": { "int64Value": "2" } + }, + { + "id": "5", + "constExpr": { "int64Value": "3" } + } + ] + } + }, + { + "id": "7", + "constExpr": { "int64Value": "3" } + } + ] + } + } + ] + } + }, + { "id": "8", "constExpr": { "boolValue": false } } + ] + } + } + } + }, + { + "name": "index_out_of_bounds_or_true", + "expression": "dyn([1, 2, 3][3]) || true", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [26], + "positions": { + "1": 3, + "2": 4, + "3": 5, + "4": 8, + "5": 11, + "6": 13, + "7": 14, + "8": 21, + "9": 18 + } + }, + "expr": { + "id": "9", + "callExpr": { + "function": "_||_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "6", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "listExpr": { + "elements": [ + { + "id": "3", + "constExpr": { "int64Value": "1" } + }, + { + "id": "4", + "constExpr": { "int64Value": "2" } + }, + { + "id": "5", + "constExpr": { "int64Value": "3" } + } + ] + } + }, + { + "id": "7", + "constExpr": { "int64Value": "3" } + } + ] + } + } + ] + } + }, + { "id": "8", "constExpr": { "boolValue": true } } + ] + } + } + } + }, + { + "name": "index_out_of_bounds_and_false", + "expression": "dyn([1, 2, 3][3]) \u0026\u0026 false", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [27], + "positions": { + "1": 3, + "2": 4, + "3": 5, + "4": 8, + "5": 11, + "6": 13, + "7": 14, + "8": 21, + "9": 18 + } + }, + "expr": { + "id": "9", + "callExpr": { + "function": "_\u0026\u0026_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "6", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "listExpr": { + "elements": [ + { + "id": "3", + "constExpr": { "int64Value": "1" } + }, + { + "id": "4", + "constExpr": { "int64Value": "2" } + }, + { + "id": "5", + "constExpr": { "int64Value": "3" } + } + ] + } + }, + { + "id": "7", + "constExpr": { "int64Value": "3" } + } + ] + } + } + ] + } + }, + { "id": "8", "constExpr": { "boolValue": false } } + ] + } + } + } + }, + { + "name": "index_out_of_bounds_and_true", + "expression": "dyn([1, 2, 3][3]) \u0026\u0026 true", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [26], + "positions": { + "1": 3, + "2": 4, + "3": 5, + "4": 8, + "5": 11, + "6": 13, + "7": 14, + "8": 21, + "9": 18 + } + }, + "expr": { + "id": "9", + "callExpr": { + "function": "_\u0026\u0026_", + "args": [ + { + "id": "1", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "6", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "listExpr": { + "elements": [ + { + "id": "3", + "constExpr": { "int64Value": "1" } + }, + { + "id": "4", + "constExpr": { "int64Value": "2" } + }, + { + "id": "5", + "constExpr": { "int64Value": "3" } + } + ] + } + }, + { + "id": "7", + "constExpr": { "int64Value": "3" } + } + ] + } + } + ] + } + }, + { "id": "8", "constExpr": { "boolValue": true } } + ] + } + } + } + }, + { + "name": "bad_index_type", + "expression": "[1, 2, 3][dyn('')]", + "result": { + "sourceInfo": { + "location": "\u003cinput\u003e", + "lineOffsets": [19], + "positions": { + "1": 0, + "2": 1, + "3": 4, + "4": 7, + "5": 9, + "6": 13, + "7": 14 + } + }, + "expr": { + "id": "5", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "1", + "listExpr": { + "elements": [ + { "id": "2", "constExpr": { "int64Value": "1" } }, + { "id": "3", "constExpr": { "int64Value": "2" } }, + { "id": "4", "constExpr": { "int64Value": "3" } } ] } }, @@ -39298,7 +40805,7 @@ "callExpr": { "function": "dyn", "args": [ - { "id": "7", "constExpr": { "uint64Value": "0" } } + { "id": "7", "constExpr": { "stringValue": "" } } ] } } @@ -39308,147 +40815,312 @@ } }, { - "name": "singleton", - "expression": "['foo'][0]", + "name": "bad_index_type_or_false", + "expression": "dyn([1, 2, 3][dyn('')]) || false", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [11], - "positions": { "1": 0, "2": 1, "3": 7, "4": 8 } + "lineOffsets": [33], + "positions": { + "1": 3, + "2": 4, + "3": 5, + "4": 8, + "5": 11, + "6": 13, + "7": 17, + "8": 18, + "9": 27, + "10": 24 + } }, "expr": { - "id": "3", + "id": "10", "callExpr": { - "function": "_[_]", + "function": "_||_", "args": [ { "id": "1", - "listExpr": { - "elements": [ - { "id": "2", "constExpr": { "stringValue": "foo" } } + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "6", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "listExpr": { + "elements": [ + { + "id": "3", + "constExpr": { "int64Value": "1" } + }, + { + "id": "4", + "constExpr": { "int64Value": "2" } + }, + { + "id": "5", + "constExpr": { "int64Value": "3" } + } + ] + } + }, + { + "id": "7", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "8", + "constExpr": { "stringValue": "" } + } + ] + } + } + ] + } + } ] } }, - { "id": "4", "constExpr": { "int64Value": "0" } } + { "id": "9", "constExpr": { "boolValue": false } } ] } } } }, { - "name": "middle", - "expression": "[0, 1, 1, 2, 3, 5, 8, 13][4]", + "name": "bad_index_type_or_true", + "expression": "dyn([1, 2, 3][dyn('')]) || true", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [29], + "lineOffsets": [32], "positions": { - "1": 0, - "2": 1, - "3": 4, - "4": 7, - "5": 10, + "1": 3, + "2": 4, + "3": 5, + "4": 8, + "5": 11, "6": 13, - "7": 16, - "8": 19, - "9": 22, - "10": 25, - "11": 26 + "7": 17, + "8": 18, + "9": 27, + "10": 24 } }, "expr": { "id": "10", "callExpr": { - "function": "_[_]", + "function": "_||_", "args": [ { "id": "1", - "listExpr": { - "elements": [ - { "id": "2", "constExpr": { "int64Value": "0" } }, - { "id": "3", "constExpr": { "int64Value": "1" } }, - { "id": "4", "constExpr": { "int64Value": "1" } }, - { "id": "5", "constExpr": { "int64Value": "2" } }, - { "id": "6", "constExpr": { "int64Value": "3" } }, - { "id": "7", "constExpr": { "int64Value": "5" } }, - { "id": "8", "constExpr": { "int64Value": "8" } }, - { "id": "9", "constExpr": { "int64Value": "13" } } + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "6", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "listExpr": { + "elements": [ + { + "id": "3", + "constExpr": { "int64Value": "1" } + }, + { + "id": "4", + "constExpr": { "int64Value": "2" } + }, + { + "id": "5", + "constExpr": { "int64Value": "3" } + } + ] + } + }, + { + "id": "7", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "8", + "constExpr": { "stringValue": "" } + } + ] + } + } + ] + } + } ] } }, - { "id": "11", "constExpr": { "int64Value": "4" } } + { "id": "9", "constExpr": { "boolValue": true } } ] } } } }, { - "name": "last", - "expression": "['George', 'John', 'Paul', 'Ringo'][3]", + "name": "bad_index_type_and_false", + "expression": "dyn([1, 2, 3][dyn('')]) \u0026\u0026 false", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [39], + "lineOffsets": [33], "positions": { - "1": 0, - "2": 1, - "3": 11, - "4": 19, - "5": 27, - "6": 35, - "7": 36 + "1": 3, + "2": 4, + "3": 5, + "4": 8, + "5": 11, + "6": 13, + "7": 17, + "8": 18, + "9": 27, + "10": 24 } }, "expr": { - "id": "6", + "id": "10", "callExpr": { - "function": "_[_]", + "function": "_\u0026\u0026_", "args": [ { "id": "1", - "listExpr": { - "elements": [ + "callExpr": { + "function": "dyn", + "args": [ { - "id": "2", - "constExpr": { "stringValue": "George" } - }, - { "id": "3", "constExpr": { "stringValue": "John" } }, - { "id": "4", "constExpr": { "stringValue": "Paul" } }, - { "id": "5", "constExpr": { "stringValue": "Ringo" } } + "id": "6", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "listExpr": { + "elements": [ + { + "id": "3", + "constExpr": { "int64Value": "1" } + }, + { + "id": "4", + "constExpr": { "int64Value": "2" } + }, + { + "id": "5", + "constExpr": { "int64Value": "3" } + } + ] + } + }, + { + "id": "7", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "8", + "constExpr": { "stringValue": "" } + } + ] + } + } + ] + } + } ] } }, - { "id": "7", "constExpr": { "int64Value": "3" } } + { "id": "9", "constExpr": { "boolValue": false } } ] } } } }, { - "name": "range", - "expression": "[1, 2, 3][3]", + "name": "bad_index_type_and_true", + "expression": "dyn([1, 2, 3][dyn('')]) \u0026\u0026 true", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [13], - "positions": { "1": 0, "2": 1, "3": 4, "4": 7, "5": 9, "6": 10 } + "lineOffsets": [32], + "positions": { + "1": 3, + "2": 4, + "3": 5, + "4": 8, + "5": 11, + "6": 13, + "7": 17, + "8": 18, + "9": 27, + "10": 24 + } }, "expr": { - "id": "5", + "id": "10", "callExpr": { - "function": "_[_]", + "function": "_\u0026\u0026_", "args": [ { "id": "1", - "listExpr": { - "elements": [ - { "id": "2", "constExpr": { "int64Value": "1" } }, - { "id": "3", "constExpr": { "int64Value": "2" } }, - { "id": "4", "constExpr": { "int64Value": "3" } } + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "6", + "callExpr": { + "function": "_[_]", + "args": [ + { + "id": "2", + "listExpr": { + "elements": [ + { + "id": "3", + "constExpr": { "int64Value": "1" } + }, + { + "id": "4", + "constExpr": { "int64Value": "2" } + }, + { + "id": "5", + "constExpr": { "int64Value": "3" } + } + ] + } + }, + { + "id": "7", + "callExpr": { + "function": "dyn", + "args": [ + { + "id": "8", + "constExpr": { "stringValue": "" } + } + ] + } + } + ] + } + } ] } }, - { "id": "6", "constExpr": { "int64Value": "3" } } + { "id": "9", "constExpr": { "boolValue": true } } ] } } @@ -60260,17 +61932,17 @@ "tests": [ { "name": "int64_nocontainer", - "expression": "google.api.expr.test.v1.proto2.TestAllTypes{single_int64: 17}", + "expression": "cel.expr.conformance.proto2.TestAllTypes{single_int64: 17}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [62], - "positions": { "1": 43, "2": 56, "3": 58 } + "lineOffsets": [59], + "positions": { "1": 40, "2": 53, "3": 55 } }, "expr": { "id": "1", "structExpr": { - "messageName": "google.api.expr.test.v1.proto2.TestAllTypes", + "messageName": "cel.expr.conformance.proto2.TestAllTypes", "entries": [ { "id": "2", @@ -64351,22 +66023,20 @@ "tests": [ { "name": "package_scoped_int32", - "expression": "proto.hasExt(msg, google.api.expr.test.v1.proto2.int32_ext)", + "expression": "proto.hasExt(msg, cel.expr.conformance.proto2.int32_ext)", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [60], + "lineOffsets": [57], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48 + "5": 21, + "6": 26, + "7": 38, + "8": 45 } }, "expr": { @@ -64377,37 +66047,25 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { "name": "google" } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -64423,22 +66081,20 @@ }, { "name": "package_scoped_nested_ext", - "expression": "proto.hasExt(msg, google.api.expr.test.v1.proto2.nested_ext)", + "expression": "proto.hasExt(msg, cel.expr.conformance.proto2.nested_ext)", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [61], + "lineOffsets": [58], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48 + "5": 21, + "6": 26, + "7": 38, + "8": 45 } }, "expr": { @@ -64449,37 +66105,25 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { "name": "google" } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -64495,22 +66139,20 @@ }, { "name": "package_scoped_test_all_types_ext", - "expression": "proto.hasExt(msg, google.api.expr.test.v1.proto2.test_all_types_ext)", + "expression": "proto.hasExt(msg, cel.expr.conformance.proto2.test_all_types_ext)", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [69], + "lineOffsets": [66], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48 + "5": 21, + "6": 26, + "7": 38, + "8": 45 } }, "expr": { @@ -64521,37 +66163,25 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { "name": "google" } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -64567,22 +66197,20 @@ }, { "name": "package_scoped_test_all_types_nested_enum_ext", - "expression": "proto.hasExt(msg, google.api.expr.test.v1.proto2.nested_enum_ext)", + "expression": "proto.hasExt(msg, cel.expr.conformance.proto2.nested_enum_ext)", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [66], + "lineOffsets": [63], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48 + "5": 21, + "6": 26, + "7": 38, + "8": 45 } }, "expr": { @@ -64593,37 +66221,25 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { "name": "google" } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -64639,22 +66255,20 @@ }, { "name": "package_scoped_repeated_test_all_types", - "expression": "proto.hasExt(msg, google.api.expr.test.v1.proto2.repeated_test_all_types)", + "expression": "proto.hasExt(msg, cel.expr.conformance.proto2.repeated_test_all_types)", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [74], + "lineOffsets": [71], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48 + "5": 21, + "6": 26, + "7": 38, + "8": 45 } }, "expr": { @@ -64665,37 +66279,25 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { "name": "google" } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -64711,23 +66313,21 @@ }, { "name": "message_scoped_int64", - "expression": "proto.hasExt(msg, google.api.expr.test.v1.proto2.Proto2ExtensionScopedMessage.int64_ext)", + "expression": "proto.hasExt(msg, cel.expr.conformance.proto2.Proto2ExtensionScopedMessage.int64_ext)", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [89], + "lineOffsets": [86], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48, - "11": 77 + "5": 21, + "6": 26, + "7": 38, + "8": 45, + "9": 74 } }, "expr": { @@ -64738,42 +66338,28 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "11", + "id": "9", "selectExpr": { "operand": { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -64792,23 +66378,21 @@ }, { "name": "message_scoped_nested_ext", - "expression": "proto.hasExt(msg, google.api.expr.test.v1.proto2.Proto2ExtensionScopedMessage.message_scoped_nested_ext)", + "expression": "proto.hasExt(msg, cel.expr.conformance.proto2.Proto2ExtensionScopedMessage.message_scoped_nested_ext)", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [105], + "lineOffsets": [102], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48, - "11": 77 + "5": 21, + "6": 26, + "7": 38, + "8": 45, + "9": 74 } }, "expr": { @@ -64819,42 +66403,28 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "11", + "id": "9", "selectExpr": { "operand": { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -64873,23 +66443,21 @@ }, { "name": "message_scoped_nested_enum_ext", - "expression": "proto.hasExt(msg, google.api.expr.test.v1.proto2.Proto2ExtensionScopedMessage.nested_enum_ext)", + "expression": "proto.hasExt(msg, cel.expr.conformance.proto2.Proto2ExtensionScopedMessage.nested_enum_ext)", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [95], + "lineOffsets": [92], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48, - "11": 77 + "5": 21, + "6": 26, + "7": 38, + "8": 45, + "9": 74 } }, "expr": { @@ -64900,42 +66468,28 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "11", + "id": "9", "selectExpr": { "operand": { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -64954,23 +66508,21 @@ }, { "name": "message_scoped_repeated_test_all_types", - "expression": "proto.hasExt(msg, google.api.expr.test.v1.proto2.Proto2ExtensionScopedMessage.message_scoped_repeated_test_all_types)", + "expression": "proto.hasExt(msg, cel.expr.conformance.proto2.Proto2ExtensionScopedMessage.message_scoped_repeated_test_all_types)", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [118], + "lineOffsets": [115], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48, - "11": 77 + "5": 21, + "6": 26, + "7": 38, + "8": 45, + "9": 74 } }, "expr": { @@ -64981,42 +66533,28 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "11", + "id": "9", "selectExpr": { "operand": { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -65040,28 +66578,26 @@ "tests": [ { "name": "package_scoped_int32", - "expression": "proto.getExt(msg, google.api.expr.test.v1.proto2.int32_ext) == 42", + "expression": "proto.getExt(msg, cel.expr.conformance.proto2.int32_ext) == 42", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [66], + "lineOffsets": [63], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48, - "11": 60, - "12": 63 + "5": 21, + "6": 26, + "7": 38, + "8": 45, + "9": 57, + "10": 60 } }, "expr": { - "id": "11", + "id": "9", "callExpr": { "function": "_==_", "args": [ @@ -65076,39 +66612,25 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -65120,7 +66642,7 @@ ] } }, - { "id": "12", "constExpr": { "int64Value": "42" } } + { "id": "10", "constExpr": { "int64Value": "42" } } ] } } @@ -65128,28 +66650,26 @@ }, { "name": "package_scoped_nested_ext", - "expression": "proto.getExt(msg, google.api.expr.test.v1.proto2.nested_ext) == google.api.expr.test.v1.proto2.TestAllTypes{}", + "expression": "proto.getExt(msg, cel.expr.conformance.proto2.nested_ext) == cel.expr.conformance.proto2.TestAllTypes{}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [110], + "lineOffsets": [104], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48, - "11": 61, - "12": 107 + "5": 21, + "6": 26, + "7": 38, + "8": 45, + "9": 58, + "10": 101 } }, "expr": { - "id": "11", + "id": "9", "callExpr": { "function": "_==_", "args": [ @@ -65164,39 +66684,25 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -65209,9 +66715,9 @@ } }, { - "id": "12", + "id": "10", "structExpr": { - "messageName": "google.api.expr.test.v1.proto2.TestAllTypes" + "messageName": "cel.expr.conformance.proto2.TestAllTypes" } } ] @@ -65221,28 +66727,26 @@ }, { "name": "package_scoped_test_all_types_ext", - "expression": "proto.getExt(msg, google.api.expr.test.v1.proto2.test_all_types_ext) == google.api.expr.test.v1.proto2.TestAllTypes{}", + "expression": "proto.getExt(msg, cel.expr.conformance.proto2.test_all_types_ext) == cel.expr.conformance.proto2.TestAllTypes{}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [118], + "lineOffsets": [112], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48, - "11": 69, - "12": 115 + "5": 21, + "6": 26, + "7": 38, + "8": 45, + "9": 66, + "10": 109 } }, "expr": { - "id": "11", + "id": "9", "callExpr": { "function": "_==_", "args": [ @@ -65257,39 +66761,25 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -65302,9 +66792,9 @@ } }, { - "id": "12", + "id": "10", "structExpr": { - "messageName": "google.api.expr.test.v1.proto2.TestAllTypes" + "messageName": "cel.expr.conformance.proto2.TestAllTypes" } } ] @@ -65314,36 +66804,32 @@ }, { "name": "package_scoped_test_all_types_nested_enum_ext", - "expression": "proto.getExt(msg, google.api.expr.test.v1.proto2.nested_enum_ext) == google.api.expr.test.v1.proto2.TestAllTypes.NestedEnum.BAR", + "expression": "proto.getExt(msg, cel.expr.conformance.proto2.nested_enum_ext) == cel.expr.conformance.proto2.TestAllTypes.NestedEnum.BAR", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [128], + "lineOffsets": [122], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48, - "11": 66, - "12": 69, - "13": 75, - "14": 79, - "15": 84, - "16": 89, - "17": 92, - "18": 99, - "19": 112, - "20": 123 + "5": 21, + "6": 26, + "7": 38, + "8": 45, + "9": 63, + "10": 66, + "11": 69, + "12": 74, + "13": 86, + "14": 93, + "15": 106, + "16": 117 } }, "expr": { - "id": "11", + "id": "9", "callExpr": { "function": "_==_", "args": [ @@ -65358,39 +66844,25 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -65403,45 +66875,31 @@ } }, { - "id": "20", + "id": "16", "selectExpr": { "operand": { - "id": "19", + "id": "15", "selectExpr": { "operand": { - "id": "18", + "id": "14", "selectExpr": { "operand": { - "id": "17", + "id": "13", "selectExpr": { "operand": { - "id": "16", + "id": "12", "selectExpr": { "operand": { - "id": "15", + "id": "11", "selectExpr": { "operand": { - "id": "14", - "selectExpr": { - "operand": { - "id": "13", - "selectExpr": { - "operand": { - "id": "12", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "10", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -65463,34 +66921,32 @@ }, { "name": "package_scoped_repeated_test_all_types", - "expression": "proto.getExt(msg, google.api.expr.test.v1.proto2.repeated_test_all_types) == [google.api.expr.test.v1.proto2.TestAllTypes{single_int64: 1}, google.api.expr.test.v1.proto2.TestAllTypes{single_bool: true}]", + "expression": "proto.getExt(msg, cel.expr.conformance.proto2.repeated_test_all_types) == [cel.expr.conformance.proto2.TestAllTypes{single_int64: 1}, cel.expr.conformance.proto2.TestAllTypes{single_bool: true}]", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [204], + "lineOffsets": [195], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48, - "11": 74, - "12": 77, - "13": 121, - "14": 134, - "15": 136, - "16": 183, - "17": 195, - "18": 197 + "5": 21, + "6": 26, + "7": 38, + "8": 45, + "9": 71, + "10": 74, + "11": 115, + "12": 128, + "13": 130, + "14": 174, + "15": 186, + "16": 188 } }, "expr": { - "id": "11", + "id": "9", "callExpr": { "function": "_==_", "args": [ @@ -65505,39 +66961,25 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -65550,19 +66992,19 @@ } }, { - "id": "12", + "id": "10", "listExpr": { "elements": [ { - "id": "13", + "id": "11", "structExpr": { - "messageName": "google.api.expr.test.v1.proto2.TestAllTypes", + "messageName": "cel.expr.conformance.proto2.TestAllTypes", "entries": [ { - "id": "14", + "id": "12", "fieldKey": "single_int64", "value": { - "id": "15", + "id": "13", "constExpr": { "int64Value": "1" } } } @@ -65570,15 +67012,15 @@ } }, { - "id": "16", + "id": "14", "structExpr": { - "messageName": "google.api.expr.test.v1.proto2.TestAllTypes", + "messageName": "cel.expr.conformance.proto2.TestAllTypes", "entries": [ { - "id": "17", + "id": "15", "fieldKey": "single_bool", "value": { - "id": "18", + "id": "16", "constExpr": { "boolValue": true } } } @@ -65595,29 +67037,27 @@ }, { "name": "message_scoped_int64", - "expression": "proto.getExt(msg, google.api.expr.test.v1.proto2.Proto2ExtensionScopedMessage.int64_ext) == 42", + "expression": "proto.getExt(msg, cel.expr.conformance.proto2.Proto2ExtensionScopedMessage.int64_ext) == 42", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [95], + "lineOffsets": [92], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48, - "11": 77, - "12": 89, - "13": 92 + "5": 21, + "6": 26, + "7": 38, + "8": 45, + "9": 74, + "10": 86, + "11": 89 } }, "expr": { - "id": "12", + "id": "10", "callExpr": { "function": "_==_", "args": [ @@ -65632,42 +67072,28 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "11", + "id": "9", "selectExpr": { "operand": { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -65682,7 +67108,7 @@ ] } }, - { "id": "13", "constExpr": { "int64Value": "42" } } + { "id": "11", "constExpr": { "int64Value": "42" } } ] } } @@ -65690,29 +67116,27 @@ }, { "name": "message_scoped_nested_ext", - "expression": "proto.getExt(msg, google.api.expr.test.v1.proto2.Proto2ExtensionScopedMessage.message_scoped_nested_ext) == google.api.expr.test.v1.proto2.TestAllTypes{}", + "expression": "proto.getExt(msg, cel.expr.conformance.proto2.Proto2ExtensionScopedMessage.message_scoped_nested_ext) == cel.expr.conformance.proto2.TestAllTypes{}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [154], + "lineOffsets": [148], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48, - "11": 77, - "12": 105, - "13": 151 + "5": 21, + "6": 26, + "7": 38, + "8": 45, + "9": 74, + "10": 102, + "11": 145 } }, "expr": { - "id": "12", + "id": "10", "callExpr": { "function": "_==_", "args": [ @@ -65727,42 +67151,28 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "11", + "id": "9", "selectExpr": { "operand": { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -65778,9 +67188,9 @@ } }, { - "id": "13", + "id": "11", "structExpr": { - "messageName": "google.api.expr.test.v1.proto2.TestAllTypes" + "messageName": "cel.expr.conformance.proto2.TestAllTypes" } } ] @@ -65790,37 +67200,33 @@ }, { "name": "message_scoped_nested_enum_ext", - "expression": "proto.getExt(msg, google.api.expr.test.v1.proto2.Proto2ExtensionScopedMessage.nested_enum_ext) == google.api.expr.test.v1.proto2.TestAllTypes.NestedEnum.BAR", + "expression": "proto.getExt(msg, cel.expr.conformance.proto2.Proto2ExtensionScopedMessage.nested_enum_ext) == cel.expr.conformance.proto2.TestAllTypes.NestedEnum.BAR", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [157], + "lineOffsets": [151], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48, - "11": 77, - "12": 95, - "13": 98, - "14": 104, - "15": 108, - "16": 113, - "17": 118, - "18": 121, - "19": 128, - "20": 141, - "21": 152 + "5": 21, + "6": 26, + "7": 38, + "8": 45, + "9": 74, + "10": 92, + "11": 95, + "12": 98, + "13": 103, + "14": 115, + "15": 122, + "16": 135, + "17": 146 } }, "expr": { - "id": "12", + "id": "10", "callExpr": { "function": "_==_", "args": [ @@ -65835,42 +67241,28 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "11", + "id": "9", "selectExpr": { "operand": { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -65886,45 +67278,31 @@ } }, { - "id": "21", + "id": "17", "selectExpr": { "operand": { - "id": "20", + "id": "16", "selectExpr": { "operand": { - "id": "19", + "id": "15", "selectExpr": { "operand": { - "id": "18", + "id": "14", "selectExpr": { "operand": { - "id": "17", + "id": "13", "selectExpr": { "operand": { - "id": "16", + "id": "12", "selectExpr": { "operand": { - "id": "15", - "selectExpr": { - "operand": { - "id": "14", - "selectExpr": { - "operand": { - "id": "13", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "11", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -65946,35 +67324,33 @@ }, { "name": "message_scoped_repeated_test_all_types", - "expression": "proto.getExt(msg, google.api.expr.test.v1.proto2.Proto2ExtensionScopedMessage.message_scoped_repeated_test_all_types) == [google.api.expr.test.v1.proto2.TestAllTypes{single_int64: 1}, google.api.expr.test.v1.proto2.TestAllTypes{single_bool: true}]", + "expression": "proto.getExt(msg, cel.expr.conformance.proto2.Proto2ExtensionScopedMessage.message_scoped_repeated_test_all_types) == [cel.expr.conformance.proto2.TestAllTypes{single_int64: 1}, cel.expr.conformance.proto2.TestAllTypes{single_bool: true}]", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [248], + "lineOffsets": [239], "positions": { "1": 0, "2": 12, "3": 13, "4": 18, - "5": 24, - "6": 28, - "7": 33, - "8": 38, - "9": 41, - "10": 48, - "11": 77, - "12": 118, - "13": 121, - "14": 165, - "15": 178, - "16": 180, - "17": 227, - "18": 239, - "19": 241 + "5": 21, + "6": 26, + "7": 38, + "8": 45, + "9": 74, + "10": 115, + "11": 118, + "12": 159, + "13": 172, + "14": 174, + "15": 218, + "16": 230, + "17": 232 } }, "expr": { - "id": "12", + "id": "10", "callExpr": { "function": "_==_", "args": [ @@ -65989,42 +67365,28 @@ "args": [ { "id": "3", "identExpr": { "name": "msg" } }, { - "id": "11", + "id": "9", "selectExpr": { "operand": { - "id": "10", + "id": "8", "selectExpr": { "operand": { - "id": "9", + "id": "7", "selectExpr": { "operand": { - "id": "8", + "id": "6", "selectExpr": { "operand": { - "id": "7", + "id": "5", "selectExpr": { "operand": { - "id": "6", - "selectExpr": { - "operand": { - "id": "5", - "selectExpr": { - "operand": { - "id": "4", - "identExpr": { - "name": "google" - } - }, - "field": "api" - } - }, - "field": "expr" - } + "id": "4", + "identExpr": { "name": "cel" } }, - "field": "test" + "field": "expr" } }, - "field": "v1" + "field": "conformance" } }, "field": "proto2" @@ -66040,19 +67402,19 @@ } }, { - "id": "13", + "id": "11", "listExpr": { "elements": [ { - "id": "14", + "id": "12", "structExpr": { - "messageName": "google.api.expr.test.v1.proto2.TestAllTypes", + "messageName": "cel.expr.conformance.proto2.TestAllTypes", "entries": [ { - "id": "15", + "id": "13", "fieldKey": "single_int64", "value": { - "id": "16", + "id": "14", "constExpr": { "int64Value": "1" } } } @@ -66060,15 +67422,15 @@ } }, { - "id": "17", + "id": "15", "structExpr": { - "messageName": "google.api.expr.test.v1.proto2.TestAllTypes", + "messageName": "cel.expr.conformance.proto2.TestAllTypes", "entries": [ { - "id": "18", + "id": "16", "fieldKey": "single_bool", "value": { - "id": "19", + "id": "17", "constExpr": { "boolValue": true } } } @@ -66095,17 +67457,17 @@ "tests": [ { "name": "int64_nocontainer", - "expression": "google.api.expr.test.v1.proto3.TestAllTypes{single_int64: 17}", + "expression": "cel.expr.conformance.proto3.TestAllTypes{single_int64: 17}", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [62], - "positions": { "1": 43, "2": 56, "3": 58 } + "lineOffsets": [59], + "positions": { "1": 40, "2": 53, "3": 55 } }, "expr": { "id": "1", "structExpr": { - "messageName": "google.api.expr.test.v1.proto3.TestAllTypes", + "messageName": "cel.expr.conformance.proto3.TestAllTypes", "entries": [ { "id": "2", @@ -76343,12 +77705,12 @@ }, { "name": "object not allowed", - "expression": "\"object is %s\".format([google.api.expr.test.v1.proto3.TestAllTypes{}])", + "expression": "\"object is %s\".format([cel.expr.conformance.proto3.TestAllTypes{}])", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [71], - "positions": { "1": 0, "2": 21, "3": 22, "4": 66 } + "lineOffsets": [68], + "positions": { "1": 0, "2": 21, "3": 22, "4": 63 } }, "expr": { "id": "2", @@ -76366,7 +77728,7 @@ { "id": "4", "structExpr": { - "messageName": "google.api.expr.test.v1.proto3.TestAllTypes" + "messageName": "cel.expr.conformance.proto3.TestAllTypes" } } ] @@ -76379,11 +77741,11 @@ }, { "name": "object inside list", - "expression": "\"%s\".format([[1, 2, google.api.expr.test.v1.proto3.TestAllTypes{}]])", + "expression": "\"%s\".format([[1, 2, cel.expr.conformance.proto3.TestAllTypes{}]])", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [69], + "lineOffsets": [66], "positions": { "1": 0, "2": 11, @@ -76391,7 +77753,7 @@ "4": 13, "5": 14, "6": 17, - "7": 63 + "7": 60 } }, "expr": { @@ -76419,7 +77781,7 @@ { "id": "7", "structExpr": { - "messageName": "google.api.expr.test.v1.proto3.TestAllTypes" + "messageName": "cel.expr.conformance.proto3.TestAllTypes" } } ] @@ -76435,11 +77797,11 @@ }, { "name": "object inside map", - "expression": "\"%s\".format([{1: \"a\", 2: google.api.expr.test.v1.proto3.TestAllTypes{}}])", + "expression": "\"%s\".format([{1: \"a\", 2: cel.expr.conformance.proto3.TestAllTypes{}}])", "result": { "sourceInfo": { "location": "\u003cinput\u003e", - "lineOffsets": [74], + "lineOffsets": [71], "positions": { "1": 0, "2": 11, @@ -76450,7 +77812,7 @@ "7": 17, "8": 23, "9": 22, - "10": 68 + "10": 65 } }, "expr": { @@ -76487,7 +77849,7 @@ "value": { "id": "10", "structExpr": { - "messageName": "google.api.expr.test.v1.proto3.TestAllTypes" + "messageName": "cel.expr.conformance.proto3.TestAllTypes" } } } diff --git a/test/parser.test.ts b/test/parser.test.ts index 4b358b2..8b456ad 100644 --- a/test/parser.test.ts +++ b/test/parser.test.ts @@ -9,7 +9,7 @@ import type { Constant, Expr, Expr_CreateStruct_Entry as Entry, -} from "../external/proto/dev/cel/expr/syntax_pb.ts"; +} from "../external/cel/expr/syntax_pb.ts"; import type { Message } from "@bufbuild/protobuf"; @@ -120,7 +120,7 @@ class KindAndIDAdorner implements Adorner { } else if (isEntry(context)) { valueType = "*expr.Expr_CreateStruct_Entry"; } else { - throw new Error("unexpected message type"); + throw new Error("unexpected message type: " + context.$typeName); } return `^#0:${valueType}#`; @@ -170,9 +170,9 @@ function getConstantType(c: Constant): string { } function isExpr(m: Message): m is Expr { - return m.$typeName === "dev.cel.expr.Expr"; + return m.$typeName === "cel.expr.Expr"; } function isEntry(m: Message): m is Expr { - return m.$typeName === "dev.cel.expr.Expr.CreateStruct.Entry"; + return m.$typeName === "cel.expr.Expr.CreateStruct.Entry"; } diff --git a/utility/debug/to-debug-string.ts b/utility/debug/to-debug-string.ts index 7c0a309..fce9d0a 100644 --- a/utility/debug/to-debug-string.ts +++ b/utility/debug/to-debug-string.ts @@ -7,7 +7,7 @@ import type { Expr_CreateList, Expr_CreateStruct, Expr_Comprehension, -} from "../../external/proto/dev/cel/expr/syntax_pb.ts"; +} from "../../external/cel/expr/syntax_pb.ts"; import type { Message } from "@bufbuild/protobuf"; diff --git a/utility/extract-conformance-tests/extract.go b/utility/extract-conformance-tests/extract.go index fa0e05f..508126f 100644 --- a/utility/extract-conformance-tests/extract.go +++ b/utility/extract-conformance-tests/extract.go @@ -11,14 +11,14 @@ import ( "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/encoding/prototext" - "cel.dev/expr/proto/test/v1/testpb" "github.com/google/cel-go/common" "github.com/google/cel-go/common/ast" "github.com/google/cel-go/parser" - - _ "cel.dev/expr/proto/test/v1/proto2/test_all_types" - _ "cel.dev/expr/proto/test/v1/proto3/test_all_types" + + "cel.dev/expr/conformance/test" + _ "cel.dev/expr/conformance/proto2" + _ "cel.dev/expr/conformance/proto3" ) func main() { @@ -121,7 +121,7 @@ func extractConformanceTests(directoryPath string) []*ParserTestFile { log.Fatalf("failed to read directory %q: %v", directoryPath, err) } - var files []*testpb.SimpleTestFile + var files []*test.SimpleTestFile for _, entry := range filePaths { name := entry.Name() if (strings.HasSuffix(name, ".textproto")) { @@ -130,7 +130,7 @@ func extractConformanceTests(directoryPath string) []*ParserTestFile { if err != nil { log.Fatalf("failed to read file %q: %v", filePath, err) } - file := &testpb.SimpleTestFile{} + file := &test.SimpleTestFile{} err = prototext.Unmarshal(b, file) if err != nil { log.Fatalf("failed to parse file %q: %v", filePath, err) diff --git a/utility/extract-conformance-tests/go.mod b/utility/extract-conformance-tests/go.mod index c99ddd2..4c95b90 100644 --- a/utility/extract-conformance-tests/go.mod +++ b/utility/extract-conformance-tests/go.mod @@ -1,11 +1,11 @@ -module github.com/hudlow/cel-parser/utility/cel-go-parse +module github.com/hudlow/cel-parser/utility/extract-conformance-tests go 1.23.2 require ( - cel.dev/expr v0.16.2 - github.com/google/cel-go v0.21.0 - google.golang.org/protobuf v1.35.1 + cel.dev/expr v0.18.0 + github.com/google/cel-go v0.22.1 + google.golang.org/protobuf v1.35.2 ) require ( diff --git a/utility/extract-conformance-tests/go.sum b/utility/extract-conformance-tests/go.sum index 8cdf216..b4eabaf 100644 --- a/utility/extract-conformance-tests/go.sum +++ b/utility/extract-conformance-tests/go.sum @@ -1,13 +1,13 @@ -cel.dev/expr v0.16.2 h1:RwRhoH17VhAu9U5CMvMhH1PDVgf0tuz9FT+24AfMLfU= -cel.dev/expr v0.16.2/go.mod h1:gXngZQMkWJoSbE8mOzehJlXQyubn/Vg0vR9/F3W7iw8= +cel.dev/expr v0.18.0 h1:CJ6drgk+Hf96lkLikr4rFf19WrU0BOWEihyZnI2TAzo= +cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/cel-go v0.21.0 h1:cl6uW/gxN+Hy50tNYvI691+sXxioCnstFzLp2WO4GCI= -github.com/google/cel-go v0.21.0/go.mod h1:rHUlWCcBKgyEk+eV03RPdZUekPp6YcJwV0FxuUksYxc= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/cel-go v0.22.1 h1:AfVXx3chM2qwoSbM7Da8g8hX8OVSkBFwX+rz2+PcK40= +github.com/google/cel-go v0.22.1/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= @@ -21,8 +21,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1: google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs= google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=