@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.
@@ -750,6 +750,10 @@ var Parser = class {
750
750
  this.expect("rparen", "')'");
751
751
  return inner;
752
752
  }
753
+ if (this.peekKeyword("true") || this.peekKeyword("false")) {
754
+ const token = this.advance();
755
+ return { kind: "literal", value: token.value === "true" };
756
+ }
753
757
  if (this.peekKeyword("capability") || this.peekKeyword("role")) {
754
758
  const fn = this.peek().value;
755
759
  const node = this.parseBooleanCall(fn);
@@ -933,6 +937,8 @@ var PolicyCompiler = class {
933
937
  }
934
938
  compile(node, table, depth) {
935
939
  switch (node.kind) {
940
+ case "literal":
941
+ return { kind: "const", value: node.value };
936
942
  case "and":
937
943
  case "or":
938
944
  return { kind: node.kind, operands: node.operands.map((operand) => this.compile(operand, table, depth)) };