Skip to content

Commit

Permalink
Allow patterns with only one positive event clause
Browse files Browse the repository at this point in the history
  • Loading branch information
mkremins committed Jun 5, 2021
1 parent f267c09 commit 837807e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ function compilePattern(form) {
const clauses = form.slice(2).map(subform => analyzeTopLevelClause(compiler, subform));
const eventClauses = clauses.filter(c => c.type === "event");
assert(
eventClauses.length >= 2,
"Pattern must contain at least two positive event clauses",
eventClauses.length >= 1,
"Pattern must contain at least one positive event clause",
errCtx
);
const unlessEventClauses = clauses.filter(c => c.type === "unless-event");
Expand Down

0 comments on commit 837807e

Please sign in to comment.