diff --git a/CompilerEditor/script.js b/CompilerEditor/script.js index a78ba9f..0ae51e8 100644 --- a/CompilerEditor/script.js +++ b/CompilerEditor/script.js @@ -55,8 +55,13 @@ document.querySelector(".clear-btn").addEventListener("click", () => { .forEach((pane) => (pane.innerHTML = "")); }); -// compile button click -document.getElementById("run-btn").addEventListener("click", handleCompile); +// Disable the compile button initially +document.getElementById("run-btn").disabled = true; + +Module.onRuntimeInitialized = () => { + console.log("WebAssembly runtime initialized!"); + document.getElementById("run-btn").disabled = false; +}; function handleCompile() { const code = editor.getValue(); @@ -82,6 +87,8 @@ function handleCompile() { } } +document.getElementById("run-btn").addEventListener("click", handleCompile); + // Display compilation results in the output panes function clearResults() { document.getElementById("lexer-output").innerHTML = diff --git a/CuriousX/Generation/README.md b/CuriousX/Generation/README.md index 60a92c5..c0cb744 100644 --- a/CuriousX/Generation/README.md +++ b/CuriousX/Generation/README.md @@ -102,7 +102,3 @@ if // Start if block call $print // Call print end // End if block ``` - -# Learn More -For detailed information about the Code Generation process, visit: -[CuriousX Lexical Analyzer Blog](https://jenniferchukwu.com/posts/codeGen) \ No newline at end of file diff --git a/CuriousX/Lexer/Readme.md b/CuriousX/Lexer/Readme.md index 8cb62da..42e6221 100644 --- a/CuriousX/Lexer/Readme.md +++ b/CuriousX/Lexer/Readme.md @@ -123,7 +123,3 @@ while ((token = lexer.nextToken()).type != LexerTokenType::Eof) { // Process token } ``` - -## Learn More -For detailed information about the lexical analysis process, visit: -[CuriousX Lexical Analyzer Blog](https://jenniferchukwu.com/posts/lexicalAnalysis) diff --git a/CuriousX/Parser/README.md b/CuriousX/Parser/README.md index ae52af8..ba3fe62 100644 --- a/CuriousX/Parser/README.md +++ b/CuriousX/Parser/README.md @@ -145,6 +145,3 @@ Error at line 3: Expected ')' after expression if (x > 0 { ^ ``` -# Learn More -For detailed information about the syntax analysis process, visit: -[CuriousX Lexical Analyzer Blog](https://jenniferchukwu.com/posts/syntaxAnalysis) diff --git a/CuriousX/Semantic/Readme.md b/CuriousX/Semantic/Readme.md index 0549979..1b24014 100644 --- a/CuriousX/Semantic/Readme.md +++ b/CuriousX/Semantic/Readme.md @@ -80,7 +80,3 @@ if (x) { // Error: Condition must be boolean - Division by zero checking is planned but not yet implemented - if statement cannot start a program - -# Learn More -For detailed information about the semantic analysis process, visit: -[CuriousX Lexical Analyzer Blog](https://jenniferchukwu.com/posts/semanticAnalysis) \ No newline at end of file diff --git a/README.md b/README.md index 703e8d1..e976079 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,11 @@ cmake --build build ``` #### WebAssembly Build + +*NB: Make sure emscripten is active before building* ```bash # Configure with Emscripten +mkdir build emcmake cmake -B build -S . # Build @@ -138,4 +141,6 @@ cd build && ctest -C Debug -V ## Further Reading - [Lexer Design Documentation](CuriousX\Lexer\Readme.md) +- [Grammar Design Documentation](CuriousX\Parser\README.md) +- [SEmantic Design](CuriousX\Semantic\Readme.md) - [WebAssembly Output Format](CuriousX\Generation\README.md) \ No newline at end of file