From: Dale Weiler Date: Mon, 12 Nov 2012 02:47:25 +0000 (+0000) Subject: Work in progress javascript compiler X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d7058e8adaaf12a145105899f1e5fec30d201920;p=xonotic%2Fgmqcc.git Work in progress javascript compiler --- diff --git a/index.html b/index.html index d6fee39..8badc78 100644 --- a/index.html +++ b/index.html @@ -25,6 +25,7 @@
  • Download ZIP
  • Download TAR
  • Issues
  • +
  • Try it
  • View On GitHub
  • diff --git a/javascripts/compiler.js b/javascripts/compiler.js new file mode 100644 index 0000000..bd7dbaa --- /dev/null +++ b/javascripts/compiler.js @@ -0,0 +1,25 @@ +// compiler bootstraps down to the emcscripten compiled compiler +// and the execution + +var std = "gmqcc"; +var example = "1"; +function update() { + var select = document.getElementById("std"); + var change = select.options[select.selectedIndex].value; + if (change != std) { + std = change; + } + + select = document.getElementById("eg"); + change = select.options[select.selectedIndex].value; + if (change != example) { + example = change; + } +} + +function compile() { + var string = '"' + document.getElementById("input").value + '"'; + string += " -std="+std+" "; + + document.getElementById("output").value = string; +} diff --git a/stylesheets/styles.css b/stylesheets/styles.css index a2dfecf..0095856 100644 --- a/stylesheets/styles.css +++ b/stylesheets/styles.css @@ -33,8 +33,16 @@ body { background-color: #FBFAF7; margin: 0; line-height: 1.8em; - -webkit-font-smoothing: antialiased; + -webkit-font-smoothing: antialiased; + +} +textarea { + outline: none; + resize: none; + background-color: #FBFAF7; + border: 1; + border-color: red; } h1, h2, h3, h4, h5, h6 { diff --git a/test.html b/test.html new file mode 100644 index 0000000..a49d83c --- /dev/null +++ b/test.html @@ -0,0 +1,61 @@ + + + + + + GMQCC by graphitemaster + + + + + + + + + +
    +
    +
    + +

    GMQCC

    +

    An Improved Quake C Compiler

    + + + +
    +
    +

    Try it from your browser

    + Load Example: + +   + Standard: + + + +

    Compiler Output:

    + +

    Execution Output:

    + +
    +
    + +
    +
    + + +