Skip to content

Commit

Permalink
Allow underscores in asserted predicates (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
robsimmons authored Dec 27, 2024
1 parent 0ce4e23 commit 444331b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ export class Dusa {

let arity = this.prog.arities[fact.name];
if (!arity) {
if (!fact.name.match(/^[a-z][A-Za-z0-9]*$/)) {
if (!fact.name.match(/^[a-z][A-Za-z0-9_]*$/)) {
throw new DusaRuntimeError(
`Asserted predicates must start with a lowercase letter and include only alphanumeric characters, '${fact.name}' does not.`,
`Asserted predicates must start with a lowercase letter and include only alphanumeric characters and underscores, '${fact.name}' does not.`,
);
}
arity = { args: nArgs, value: hasValue };
Expand Down

0 comments on commit 444331b

Please sign in to comment.