web: add /kripke

This commit is contained in:
2025-02-18 05:24:54 +09:00
parent 6d262460f2
commit 7a81594a86
5 changed files with 75 additions and 5 deletions

View File

@@ -146,3 +146,11 @@ EXP.setPattern(
export function parse(expr: string): Formula {
return expectSingleResult(expectEOF(EXP.parse(lexer.parse(expr))));
}
export function tryParse(expr: string): Formula | undefined {
try {
return parse(expr);
} catch {
return undefined;
}
}