]> git.xonotic.org Git - xonotic/gmqcc.git/blob - javascripts/compiler.js
Work in progress javascript compiler
[xonotic/gmqcc.git] / javascripts / compiler.js
1 // compiler bootstraps down to the emcscripten compiled compiler
2 // and the execution
3
4 var std     = "gmqcc";
5 var example = "1";
6 function update() {
7     var select = document.getElementById("std");
8     var change = select.options[select.selectedIndex].value;
9     if (change != std) {
10         std = change;
11     }
12         
13     select = document.getElementById("eg");
14     change = select.options[select.selectedIndex].value;
15     if (change != example) {
16         example = change;
17     }
18 }
19
20 function compile() {
21     var string = '"' + document.getElementById("input").value + '"';
22     string += " -std="+std+" ";
23     
24     document.getElementById("output").value = string;
25 }