From: LeonardoBizzoni Date: Wed, 8 Feb 2023 07:52:41 +0000 (+0100) Subject: Removed old stuff X-Git-Url: http://git.leonardobizzoni.com/?a=commitdiff_plain;h=76b81a72158633e6f8949ed55465c74e76bff670;p=propositional-logic-analyzer Removed old stuff --- diff --git a/src/SyntaxTree.ts b/src/SyntaxTree.ts index 2947414..18cd6f5 100644 --- a/src/SyntaxTree.ts +++ b/src/SyntaxTree.ts @@ -1,6 +1,5 @@ import { Formula } from "./formula"; import { LogicSymbol } from "./logic_symbol"; -// import p5 from "p5"; export class SyntaxTree { root: LogicSymbol; diff --git a/src/logic_symbol.ts b/src/logic_symbol.ts index 8b52b7c..4d4fd42 100644 --- a/src/logic_symbol.ts +++ b/src/logic_symbol.ts @@ -1,6 +1,6 @@ export type LogicSymbol = - | ["Unary", string] - | ["Binary", string] - | ["NestOpen"] - | ["NestClose"] - | ["Atom", string]; + | ["Unary", string] + | ["Binary", string] + | ["NestOpen"] + | ["NestClose"] + | ["Atom", string]; diff --git a/src/main.ts b/src/main.ts index 2c0a6f8..8bf02b1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,4 @@ import { Formula } from "./formula"; -import { SyntaxTree } from "./SyntaxTree"; export function checkFormula() { let input = (document.getElementById("formulaInput") as HTMLInputElement).value; @@ -9,11 +8,9 @@ export function checkFormula() { if (formula.fbf) { (document.getElementById("invalidFormula") as HTMLElement).setAttribute("style", "display: none"); - let tree = new SyntaxTree(formula); - let h2 = document.getElementById("treeString") as HTMLElement; h2.setAttribute("style", "display: block"); - h2.innerHTML = `Syntax tree:
${tree}`; + h2.innerHTML = `Syntax tree:
${formula.tree}`; let table = document.getElementById("formulaTable") as HTMLElement; table.setAttribute("style", "display: block");