Commit 94b16a81 authored by Raghav Khanna's avatar Raghav Khanna

High light code while executing

parent 66574a0a
......@@ -135,11 +135,16 @@ class App extends React.Component {
codeLine = codeLine.replace("let ", "window.");
eval(codeLine);
let newIndex = this.state.statementIndex + 1;
// let highlightData = highlightNode(current);
this.setState({
currentNode: this.state.mainStatements[newIndex],
statementIndex: newIndex
})
let newNode = this.state.mainStatements[newIndex];
this.setState((state, props) => {
state.wacc.markers = current.highlighting.wacc;
state.js.markers = current.highlighting.js;
state.arm.markers = current.highlighting.arm;
state.currentNode = newNode;
state.statementIndex = newIndex;
return state;
});
} else {
eval(" waccPrintFinished()");
eval("waccPrintingBuffer = \"\"")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment