deno.land / x / masx200_leetcode_test@10.6.5 / basic-calculator / index.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
import { buildExpression } from "./buildExpression.ts";import { evaluate } from "./evaluate.ts";import { tokenize } from "./tokenize.ts";
export default function calculate(s: string): number { const tokens = tokenize(s);
const ast = buildExpression(tokens);
return evaluate(ast);}
masx200_leetcode_test

Version Info

Tagged at
a year ago