summaryrefslogtreecommitdiff
path: root/src/interpreter/parser.ts
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-07 20:45:47 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-07 20:45:47 -0700
commite6e29440563e33bb67e0ad51f9fb6c5c2c3fe809 (patch)
tree5deaee322ff1a039dc44a3cb52ecc48a671fda2a /src/interpreter/parser.ts
parent823620b2a6ebb7ece619991e47a37ad46542b69f (diff)
downloadthe-abstraction-engine-e6e29440563e33bb67e0ad51f9fb6c5c2c3fe809.tar.gz
the-abstraction-engine-e6e29440563e33bb67e0ad51f9fb6c5c2c3fe809.zip
level one (applications prototype finished!)
Diffstat (limited to 'src/interpreter/parser.ts')
-rw-r--r--src/interpreter/parser.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/interpreter/parser.ts b/src/interpreter/parser.ts
index 5e3be0f..d288815 100644
--- a/src/interpreter/parser.ts
+++ b/src/interpreter/parser.ts
@@ -30,6 +30,10 @@ export const isVariable = (term: LambdaTerm): term is Variable => {
return typeof term === "string";
};
-export const parse = (term: string, library = false) => {
- return peggyParser.parse(term, { peg$library: library });
+export const parse = (
+ term: string,
+ allowUnderscores = false,
+ library = false,
+) => {
+ return peggyParser.parse(term, { peg$library: library }, allowUnderscores);
};