diff --git a/src/App.css b/src/App.css index 140904e0e0be44338f995517a7017b4d5ab22f28..f649496afd406f4cd8f6d92690c55689eaf2424a 100644 --- a/src/App.css +++ b/src/App.css @@ -5,7 +5,7 @@ body { } .App { - margin: 50px 20px 0px 20px; + margin: 20px 20px 0px 20px; } .App-code-editors { diff --git a/src/App.js b/src/App.js index 53006219288332422e2f3b3ed509efb2a1b2b374..340f302b52ac8b01ed7abf1286bb1d4f6024ade0 100644 --- a/src/App.js +++ b/src/App.js @@ -5,9 +5,7 @@ import Tree from 'react-d3-tree'; // Custom components import ButtonStrip from './view/ButonStrip' import CodeEditor from './view/CodeEditor' -import UserIO from './view/UserIO' import Terminal from 'terminal-in-react'; -import {makeStyles} from "@material-ui/core/styles"; import Card from "./components/Card/Card.js"; import CardBody from "./components/Card/CardBody.js"; @@ -15,31 +13,7 @@ import {sendWaccCode, astMetaToGraphData} from './Comm' import GridItem from "./components/Grid/GridItem"; import GridContainer from "./components/Grid/GridContainer"; -const cardImagesStyles = { - cardImgTop: { - width: "100%", - borderTopLeftRadius: "calc(.25rem - 1px)", - borderTopRightRadius: "calc(.25rem - 1px)" - }, - cardImgBottom: { - width: "100%", - borderBottomRightRadius: "calc(.25rem - 1px)", - borderBottomLeftRadius: "calc(.25rem - 1px)" - }, - cardImgOverlay: { - position: "absolute", - top: "0", - right: "0", - bottom: "0", - left: "0", - padding: "1.25rem" - }, - cardImg: { - width: "100%", - borderRadius: "calc(.25rem - 1px)" - } -}; -const useStyles = makeStyles(cardImagesStyles); +import './App.css' class App extends React.Component { constructor(props) { @@ -79,10 +53,6 @@ class App extends React.Component { } readInputCallBack = (codeToEval) => { - console.log(test); - // if (!window.EMULATOR_IS_INPUT) { - // window.EMULATOR_CONSOLE_READ = window.prompt() - // } eval(codeToEval); window.EMULATOR_CONSOLE_READ = () => { return window.prompt()}; }; diff --git a/src/Comm.js b/src/Comm.js index dc337a9ae0a481f7e71acdaa8946a9300625098e..fc7e3b5dcaf1dcc497667d9b1175f4f453186560 100644 --- a/src/Comm.js +++ b/src/Comm.js @@ -1,19 +1,8 @@ -import React from 'react' import axios from 'axios' const SERVER_ADDR = "http://134.209.31.55:8080/"; const SERVER_ENDPOINT = ""; -const testGraphData = [{ - name: "WACC Program", children: [{ - name: "BinOP", attributes: {operation: "Add"}, - children: [{name: "Const", attributes: {value: "1"}}, {name: "VarIdent", attributes: {ident: "x"}}] - }] -}]; - - - - export function astMetaToGraphData(astMeta) { let firstNode = astMeta.nodes["0"]; let graphData = createGraphNode(firstNode, astMeta); @@ -48,7 +37,7 @@ function createGraphNode(node, astMeta){ children.push(createGraphNode(child, astMeta)) } } - console.log(node) + return { name: name, attributes: {value: value}, diff --git a/src/view/UserIO.js b/src/view/UserIO.js deleted file mode 100644 index f6cd895858a099a8ff350fc8e447192d7d1e29bf..0000000000000000000000000000000000000000 --- a/src/view/UserIO.js +++ /dev/null @@ -1,37 +0,0 @@ -import React from 'react' - -class UserIO extends React.Component { - constructor(props) { - super(props) - - this.state = { - programOutput: "", - programInput: "" - } - } - - onInputChange = (evt) => { - this.setState({programInput: evt.target.value}) - } - - onSubmitClick = (evt) => { - this.setState((state, props) => ({ - programOutput: state.programInput - })) - } - - render() { - return ( -