From e4db8ebdd6a36df0b3d76504d18d8f183fe46ba9 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 21 Jan 2024 19:34:49 +0530 Subject: feat: adds example for calculator --- src/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/parser.ts') diff --git a/src/parser.ts b/src/parser.ts index 81f7a9e..928fc00 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -116,7 +116,7 @@ const precedence = (op: BinOp) => _: () => -1, }) -const binOpWithFixitySwitchity = (op: BinOp, left: Expr, right: Expr) => +const binOpWithFixitySwitchity = (op: BinOp, left: Expr, right: Expr): Expr => match(right, { BinOp: binOp => { if (precedence(op) >= precedence(binOp.op)) { -- cgit v1.3.1