Skip to content

Commit

Permalink
deploy: b0258a1
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerhold committed Nov 18, 2023
1 parent 15c0746 commit 404ef2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctypehtml><html lang=en-us><head><meta charset=utf-8><meta content="text/html; charset=utf-8"http-equiv=Content-Type><title>Laszlo</title><style>.emscripten{padding-right:0;margin-left:auto;margin-right:auto;display:block}textarea.emscripten{font-family:monospace;width:80%}div.emscripten{text-align:center}.spinner{height:50px;width:50px;margin:0 auto;-webkit-animation:rotation .8s linear infinite;-moz-animation:rotation .8s linear infinite;-o-animation:rotation .8s linear infinite;animation:rotation .8s linear infinite;border-left:10px solid #0096f0;border-right:10px solid #0096f0;border-bottom:10px solid #0096f0;border-top:10px solid #6400c8;border-radius:100%;background-color:#c864fa}body{font-family:monospace;font-size:20px;background-color:#1e1e1e;margin:0;padding:20px}.editor-container{max-width:900px;height:300px;margin:0 auto;box-shadow:0 2px 4px rgba(0,0,0,.1);border-radius:8px;overflow:hidden}#editor{height:250px;font-size:16px;background-color:#1e1e1e;color:#fff;padding:10px}#run-button{display:block;width:100%;padding:5px;background-color:#5cb85c;color:#fff;border:none;cursor:pointer;font-size:18px}#run-button:hover{background-color:#3e8d3e}#output{max-width:900px;background-color:#2f3129;border-top:1px solid #3d3d3b;padding:15px;margin:0 auto;color:#d2d2d2;height:auto;min-height:100px;overflow-y:auto;border-radius:8px}@-webkit-keyframes rotation{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@-moz-keyframes rotation{from{-moz-transform:rotate(0)}to{-moz-transform:rotate(360deg)}}@-o-keyframes rotation{from{-o-transform:rotate(0)}to{-o-transform:rotate(360deg)}}@keyframes rotation{from{transform:rotate(0)}to{transform:rotate(360deg)}}</style></head><body><script src=https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js></script><script src=https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.12/ace.js charset=utf-8></script><script>let editor;require(["mode-laszlo.js"],(function(e){editor=ace.edit("editor"),editor.setTheme("ace/theme/monokai"),editor.setFontSize(20),editor.session.setMode(new e)}))</script><div class=editor-container><div id=editor>println("Hello from Laszlo!");</div><button id=run-button onclick=generateFile()>Run Code</button></div><br><div id=output></div><br><figure id=spinner style=overflow:visible><div class=spinner></div><center style=margin-top:.5em><strong>emscripten</strong></center></figure><div class=emscripten id=status>Downloading...</div><div class=emscripten><progress hidden id=progress max=100 value=0></progress></div><script>var statusElement=document.getElementById("status"),progressElement=document.getElementById("progress"),spinnerElement=document.getElementById("spinner"),Module={print:function(){var e=document.getElementById("output");return e&&(e.innerHTML=""),function(t){arguments.length>1&&(t=Array.prototype.slice.call(arguments).join(" ")),console.log(t),e&&(e.innerHTML+=t+"</br>",e.scrollTop=e.scrollHeight)}}(),printErr:function(){var e=document.getElementById("output");return e&&(e.innerHTML=""),function(t){arguments.length>1&&(t=Array.prototype.slice.call(arguments).join(" ")),console.log(t),e&&(e.innerHTML+=t+"</br>",e.scrollTop=e.scrollHeight)}}(),setStatus:e=>{if(Module.setStatus.last||(Module.setStatus.last={time:Date.now(),text:""}),e!==Module.setStatus.last.text){var t=e.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/),n=Date.now();t&&n-Module.setStatus.last.time<30||(Module.setStatus.last.time=n,Module.setStatus.last.text=e,t?(e=t[1],progressElement.value=100*parseInt(t[2]),progressElement.max=100*parseInt(t[4]),progressElement.hidden=!1,spinnerElement.hidden=!1):(progressElement.value=null,progressElement.max=null,progressElement.hidden=!0,e||(spinnerElement.hidden=!0)),statusElement.innerHTML=e)}},totalDependencies:0,monitorRunDependencies:e=>{this.totalDependencies=Math.max(this.totalDependencies,e),Module.setStatus(e?"Preparing... ("+(this.totalDependencies-e)+"/"+this.totalDependencies+")":"All downloads complete.")}};function generateFile(){const e=editor.getValue();e.length>0?(FS.writeFile("/programs/test.las",e),FS.syncfs(!1,(function(e){e?console.error("Failed to sync to IndexedDB:",e):(console.log("Synchronized data to IndexedDB."),document.getElementById("output").innerHTML="",Module._main())}))):alert("Please enter some text.")}Module.setStatus("Downloading..."),window.onerror=()=>{Module.setStatus("Exception thrown, see JavaScript console"),spinnerElement.style.display="none",Module.setStatus=e=>{e&&console.error("[post-exception status] "+e)}}</script><script src=laszlo.js async></script></body></html>
<!doctypehtml><html lang=en-us><head><meta charset=utf-8><meta content="text/html; charset=utf-8"http-equiv=Content-Type><title>Laszlo</title><style>.emscripten{padding-right:0;margin-left:auto;margin-right:auto;display:block}textarea.emscripten{font-family:monospace;width:80%}div.emscripten{text-align:center}.spinner{height:50px;width:50px;margin:0 auto;-webkit-animation:rotation .8s linear infinite;-moz-animation:rotation .8s linear infinite;-o-animation:rotation .8s linear infinite;animation:rotation .8s linear infinite;border-left:10px solid #0096f0;border-right:10px solid #0096f0;border-bottom:10px solid #0096f0;border-top:10px solid #6400c8;border-radius:100%;background-color:#c864fa}body{font-family:monospace;font-size:20px;background-color:#1e1e1e;margin:0;padding:20px}.editor-container{max-width:900px;height:500px;margin:0 auto;box-shadow:0 2px 4px rgba(0,0,0,.1);border-radius:8px;overflow:hidden}#editor{height:250px;font-size:16px;background-color:#1e1e1e;color:#fff;padding:10px}#run-button{display:block;width:100%;padding:5px;background-color:#5cb85c;color:#fff;border:none;cursor:pointer;font-size:18px}#run-button:hover{background-color:#3e8d3e}#output{max-width:900px;background-color:#2f3129;border-top:1px solid #3d3d3b;padding:15px;margin:0 auto;color:#d2d2d2;height:auto;min-height:100px;overflow-y:auto;border-radius:8px;white-space:pre}@-webkit-keyframes rotation{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@-moz-keyframes rotation{from{-moz-transform:rotate(0)}to{-moz-transform:rotate(360deg)}}@-o-keyframes rotation{from{-o-transform:rotate(0)}to{-o-transform:rotate(360deg)}}@keyframes rotation{from{transform:rotate(0)}to{transform:rotate(360deg)}}</style></head><body><script src=https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js></script><script src=https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.12/ace.js charset=utf-8></script><script>let editor;require(["mode-laszlo.js"],(function(e){editor=ace.edit("editor"),editor.setTheme("ace/theme/monokai"),editor.setFontSize(20),editor.session.setMode(new e)}))</script><div class=editor-container><div id=editor>println("Hello from Laszlo!");</div><button id=run-button onclick=generateFile()>Run Code</button></div><br><div id=output></div><br><figure id=spinner style=overflow:visible><div class=spinner></div><center style=margin-top:.5em><strong>emscripten</strong></center></figure><div class=emscripten id=status>Downloading...</div><div class=emscripten><progress hidden id=progress max=100 value=0></progress></div><script>var statusElement=document.getElementById("status"),progressElement=document.getElementById("progress"),spinnerElement=document.getElementById("spinner"),Module={print:function(){var e=document.getElementById("output");return e&&(e.innerHTML=""),function(t){arguments.length>1&&(t=Array.prototype.slice.call(arguments).join(" ")),console.log(t),e&&(e.innerHTML+=t+"</br>",e.scrollTop=e.scrollHeight)}}(),printErr:function(){var e=document.getElementById("output");return e&&(e.innerHTML=""),function(t){arguments.length>1&&(t=Array.prototype.slice.call(arguments).join(" ")),console.log(t),e&&(e.innerHTML+=t+"</br>",e.scrollTop=e.scrollHeight)}}(),setStatus:e=>{if(Module.setStatus.last||(Module.setStatus.last={time:Date.now(),text:""}),e!==Module.setStatus.last.text){var t=e.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/),n=Date.now();t&&n-Module.setStatus.last.time<30||(Module.setStatus.last.time=n,Module.setStatus.last.text=e,t?(e=t[1],progressElement.value=100*parseInt(t[2]),progressElement.max=100*parseInt(t[4]),progressElement.hidden=!1,spinnerElement.hidden=!1):(progressElement.value=null,progressElement.max=null,progressElement.hidden=!0,e||(spinnerElement.hidden=!0)),statusElement.innerHTML=e)}},totalDependencies:0,monitorRunDependencies:e=>{this.totalDependencies=Math.max(this.totalDependencies,e),Module.setStatus(e?"Preparing... ("+(this.totalDependencies-e)+"/"+this.totalDependencies+")":"All downloads complete.")}};function generateFile(){const e=editor.getValue();e.length>0?(FS.writeFile("/programs/test.las",e),FS.syncfs(!1,(function(e){e?console.error("Failed to sync to IndexedDB:",e):(console.log("Synchronized data to IndexedDB."),document.getElementById("output").innerHTML="",Module._main())}))):alert("Please enter some text.")}Module.setStatus("Downloading..."),window.onerror=()=>{Module.setStatus("Exception thrown, see JavaScript console"),spinnerElement.style.display="none",Module.setStatus=e=>{e&&console.error("[post-exception status] "+e)}}</script><script src=laszlo.js async></script></body></html>
2 changes: 1 addition & 1 deletion mode-laszlo.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ define(function(require, exports, module) {
"start": [
{
token: "keyword",
regex: "\\b(?:Array|Bool|Function|I32|Char|Range|String|and|assert|break|continue|else|false|for|function|if|in|let|mod|or|println|print|return|true|typeof|while|split|delete|new)"
regex: "\\b(?:Array|Bool|Function|I32|Char|Range|String|and|assert|break|continue|else|false|for|function|if|in|let|mod|or|println|print|return|true|typeof|while|split|delete|new|struct)"
},
{
token : "string", // single line
Expand Down

0 comments on commit 404ef2c

Please sign in to comment.