]> git.leonardobizzoni.com Git - propositional-logic-analyzer/commitdiff
Removed old stuff
authorLeonardoBizzoni <leo2002714@gmail.com>
Wed, 8 Feb 2023 07:52:41 +0000 (08:52 +0100)
committerLeonardoBizzoni <leo2002714@gmail.com>
Wed, 8 Feb 2023 07:52:41 +0000 (08:52 +0100)
src/SyntaxTree.ts
src/logic_symbol.ts
src/main.ts

index 29474147120be3b6b11f1fc9412550d0fec395fd..18cd6f58bc5309f70721b9e94ec0d555b11dc93e 100644 (file)
@@ -1,6 +1,5 @@
 import { Formula } from "./formula";
 import { LogicSymbol } from "./logic_symbol";
-// import p5 from "p5";
 
 export class SyntaxTree {
        root: LogicSymbol;
index 8b52b7c6aab0e7880fbf0467fca25891da084937..4d4fd42117916bdfe7575f69fbc0be07f015d762 100644 (file)
@@ -1,6 +1,6 @@
 export type LogicSymbol =
-    | ["Unary", string]
-    | ["Binary", string]
-    | ["NestOpen"]
-    | ["NestClose"]
-    | ["Atom", string];
+       | ["Unary", string]
+       | ["Binary", string]
+       | ["NestOpen"]
+       | ["NestClose"]
+       | ["Atom", string];
index 2c0a6f8cf41152e16ad0ba6bfcc4e4ab512dc614..8bf02b1b206ebe0267105caa9a2e2e4433b7bfda 100644 (file)
@@ -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: </br><b style="padding-left: 20px">${tree}</b>`;
+               h2.innerHTML = `Syntax tree: </br><b style="padding-left: 20px">${formula.tree}</b>`;
 
                let table = document.getElementById("formulaTable") as HTMLElement;
                table.setAttribute("style", "display: block");