|
4 | 4 | <title>Interpret Esolangs Online</title> |
5 | 5 | </head> |
6 | 6 | <body> |
| 7 | + <meta charset="UTF-8"> |
| 8 | + <meta name="viewport" content="width=device-width,initial-scale=1.0"> |
| 9 | + <!-- PyScript CSS --> |
| 10 | + <link rel="stylesheet" href_="https://pyscript.net/releases/2025.5.1/core.css" id="pyscss"> |
| 11 | + <!-- This script tag bootstraps PyScript --> |
| 12 | + <script type="module" src_="https://pyscript.net/releases/2025.5.1/core.js" id="pysjs"></script> |
7 | 13 | <h3>Welcome to Interpret Esolangs Online</h3> |
8 | 14 | <p> |
9 | 15 | Interpret Esolangs Online allows you to run programs in various esoteric |
10 | 16 | languages, including brainfuck, deadfish, etc. |
11 | 17 | </p> |
| 18 | + <script defer src="pyexec.js"></script> |
| 19 | + <script defer src="abcdxyz.js"></script> |
12 | 20 | <script defer src="alphuck.js"></script> |
13 | 21 | <script defer src="aplwsi.js"></script> |
14 | 22 | <script defer src="arithmetic.js"></script> |
@@ -49,8 +57,11 @@ <h3>Welcome to Interpret Esolangs Online</h3> |
49 | 57 | <script defer src="wte_teplw.js"></script> |
50 | 58 | <script defer src="wizzcake.js"></script> |
51 | 59 | <script defer src="wizzcakep.js"></script> |
| 60 | + <code id="pysout" style="display:none"></code> |
| 61 | + <code id="pyserr" style="display:none"></code> |
52 | 62 | <select id="lang"> |
53 | 63 | <option>6</option> |
| 64 | + <option>ABCDXYZ</option> |
54 | 65 | <option>Alphuck</option> |
55 | 66 | <option>APLWSI</option> |
56 | 67 | <option>Arithmetic</option> |
@@ -102,6 +113,7 @@ <h3>Welcome to Interpret Esolangs Online</h3> |
102 | 113 | var input = document.getElementById("input").value; |
103 | 114 | funcs["\u203a*&\u00ab&^"] = galax; |
104 | 115 | funcs["6"] = six; |
| 116 | + funcs["ABCDXYZ"] = abcdxyz; |
105 | 117 | funcs["Alphuck"] = alphuck; |
106 | 118 | funcs["APLWSI"] = aplwsi; |
107 | 119 | funcs["Arithmetic"] = arithmetic; |
@@ -145,23 +157,26 @@ <h3>Welcome to Interpret Esolangs Online</h3> |
145 | 157 | var func = funcs[langname]; |
146 | 158 | document.getElementById("log").value = ""; |
147 | 159 | const s = new Date().getTime(); |
148 | | - var erroc = false; |
| 160 | + var erroc = false,f=false; |
149 | 161 | try { |
150 | 162 | var output = func(code, input); |
| 163 | + if(output===undefined)f=true; |
151 | 164 | } catch (err) { |
152 | 165 | document.getElementById("log").value = err.message + "\n"; |
153 | 166 | erroc = true; |
154 | 167 | } |
155 | 168 | const e = new Date().getTime(); |
156 | | - if (erroc) { |
157 | | - document.getElementById("log").value = |
158 | | - document.getElementById("log").value + |
159 | | - `Program terminates in ${e - s} ms and raises an error.`; |
160 | | - } else { |
161 | | - document.getElementById("log").value = |
162 | | - document.getElementById("log").value + |
163 | | - `Program terminates in ${e - s} ms successfully.`; |
164 | | - document.getElementById("output").value = output; |
| 169 | + if(!f){ |
| 170 | + if (erroc) { |
| 171 | + document.getElementById("log").value = |
| 172 | + document.getElementById("log").value + |
| 173 | + `Program terminates in ${e - s} ms and raises an error.`; |
| 174 | + } else { |
| 175 | + document.getElementById("log").value = |
| 176 | + document.getElementById("log").value + |
| 177 | + `Program terminates in ${e - s} ms successfully.`; |
| 178 | + document.getElementById("output").value = output; |
| 179 | + } |
165 | 180 | } |
166 | 181 | }; |
167 | 182 | window.upload = function () { |
|
0 commit comments