Skip to content
Snippets Groups Projects
Commit 6597098b authored by Alan Schmitt's avatar Alan Schmitt Committed by Thomas Wood
Browse files

adding esprima support

parent 68fc4627
No related branches found
No related tags found
No related merge requests found
...@@ -31,13 +31,11 @@ ...@@ -31,13 +31,11 @@
<script src="jquery-ui-1.11.4.custom/jquery-ui.js"></script> <script src="jquery-ui-1.11.4.custom/jquery-ui.js"></script>
<script src="https://cdn.rawgit.com/jquery/esprima/1.2/esprima.js"></script>
<script src="sparray.js"></script> <script src="sparray.js"></script>
<script type = "text/javascript" src="trace.js"></script> <script type = "text/javascript" src="trace.js"></script>
<script src="interp.js"></script> <script src="interp.js"></script>
<style> <style>
.source_div { .source_div {
border-top: 1px solid black; border-top: 1px solid black;
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
var handlers = []; var handlers = [];
var parsedTree;
(function(check_pred){ (function(check_pred){
...@@ -98,6 +99,7 @@ $("#navigation_step").change(function(e) { ...@@ -98,6 +99,7 @@ $("#navigation_step").change(function(e) {
}); });
$("#button_run").click(function() { $("#button_run").click(function() {
parsedTree = esprima.parse($("#source_code").val(), {loc:true});
$("#run_output").html("Run successful !"); $("#run_output").html("Run successful !");
var timeoutID = window.setTimeout(function() { $("#run_output").html(""); }, 1000); var timeoutID = window.setTimeout(function() { $("#run_output").html(""); }, 1000);
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment