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

buildParenthesizedExpression.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { buildExpression } from "./buildExpression.ts";import { Expression } from "./Expression.ts";import { Token } from "./Token.ts";
export function buildParenthesizedExpression(token: Token) { if (!Array.isArray(token)) { throw Error("accident token type"); } const inner_expression = buildExpression(token); if (!inner_expression) { throw Error("empty expression"); } const current_expression: Expression = { type: "ParenthesizedExpression", expression: inner_expression, }; return current_expression;}
masx200_leetcode_test

Version Info

Tagged at
a year ago