@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.cjs CHANGED
@@ -815,6 +815,10 @@ var Parser = class {
815
815
  this.expect("rparen", "')'");
816
816
  return inner;
817
817
  }
818
+ if (this.peekKeyword("true") || this.peekKeyword("false")) {
819
+ const token = this.advance();
820
+ return { kind: "literal", value: token.value === "true" };
821
+ }
818
822
  if (this.peekKeyword("capability") || this.peekKeyword("role")) {
819
823
  const fn = this.peek().value;
820
824
  const node = this.parseBooleanCall(fn);
@@ -998,6 +1002,8 @@ var PolicyCompiler = class {
998
1002
  }
999
1003
  compile(node, table, depth) {
1000
1004
  switch (node.kind) {
1005
+ case "literal":
1006
+ return { kind: "const", value: node.value };
1001
1007
  case "and":
1002
1008
  case "or":
1003
1009
  return { kind: node.kind, operands: node.operands.map((operand) => this.compile(operand, table, depth)) };