Skip to content

Commit

Permalink
Added partial evaluations example (#959)
Browse files Browse the repository at this point in the history
Added example for partial evals

---------

Co-authored-by: jduraniglesias <[email protected]>
  • Loading branch information
jduraniglesias and jduraniglesias authored Jun 7, 2024
1 parent 69a23d9 commit e31b401
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion repl/appengine/web/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ <h1>References</h1>
<button mat-list-item (click)="startExample('json')">JSON</button>
<button mat-list-item (click)="startExample('structs')">Structs (protobuf)</button>
<button mat-list-item (click)="startExample('macros')">Macros</button>
<button mat-list-item (click)="startExample('partial-evaluations')">Partial Evaluations</button>
</mat-action-list>
<p>Canonical Extensions</p>
<mat-action-list>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ const examples = new Map<string, Example>([
]
}
}],
["partial-evaluations", {
"request": {
commands: [
`%option --enable_partial_eval`,
`%declare x : int`,
`%let y : int = 10`,
`x > y || y > 10`,
]
}
}],
["optionals",
{
request: {
Expand Down Expand Up @@ -160,7 +170,7 @@ const examples = new Map<string, Example>([
`cel.bind(allow, [1, 2, 3, 4], [3, 2, 1, 1, 4].all(x, x in allow))`
]
}
}]
}],
]);

/**
Expand Down

0 comments on commit e31b401

Please sign in to comment.