@sequenceholdings/orm 0.1.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/compiler.js CHANGED
@@ -813,6 +813,10 @@ var Parser = class {
813
813
  this.expect("rparen", "')'");
814
814
  return inner;
815
815
  }
816
+ if (this.peekKeyword("true") || this.peekKeyword("false")) {
817
+ const token = this.advance();
818
+ return { kind: "literal", value: token.value === "true" };
819
+ }
816
820
  if (this.peekKeyword("capability") || this.peekKeyword("role")) {
817
821
  const fn = this.peek().value;
818
822
  const node = this.parseBooleanCall(fn);
@@ -996,6 +1000,8 @@ var PolicyCompiler = class {
996
1000
  }
997
1001
  compile(node, table, depth) {
998
1002
  switch (node.kind) {
1003
+ case "literal":
1004
+ return { kind: "const", value: node.value };
999
1005
  case "and":
1000
1006
  case "or":
1001
1007
  return { kind: node.kind, operands: node.operands.map((operand) => this.compile(operand, table, depth)) };