Files
regorus/tests/parser/cases/expressions/arithmetic.yaml
Anand Krishnamoorthi cb0b3a1790 Code from github.com/anakrish/rego-rs
Authored by anakrish and mingweishih

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-09 10:56:54 -08:00

41 lines
1.0 KiB
YAML

# Copyright (c) Rego-Rs Authors.
# Licensed under the Apache 2.0 license.
cases:
- note: basic
rego: |
package test
x = 1 - 2 * 3 / 4 + 2
policy:
- spec:
head:
compr:
refr:
var: x
assign:
op: =
value:
arithexpr:
op: +
lhs:
arithexpr:
op: "-"
lhs:
number: 1
rhs:
arithexpr:
op: "/"
lhs:
arithexpr:
op: "*"
lhs:
number: 2
rhs:
number: 3
rhs:
number: 4
rhs:
number: 2
bodies: []