diff --git a/index.html b/index.html index 1f865ac703..eec91d1f98 100644 --- a/index.html +++ b/index.html @@ -19,18 +19,33 @@ height: 400px; border: 1px solid #8db5e4; margin-bottom: 16px; + flex: 2; + margin-right: 16px; } .container { margin: 0 auto; } + + .demo__repl { + display: flex; + } + + .output { + flex: 1; + border: 1px solid black; + padding: 8px; + font-size: 2rem; + }
- +
+ +

+
-

Test

diff --git a/index.js b/index.js index 9c51b6ac2f..2c16ef581b 100644 --- a/index.js +++ b/index.js @@ -15,6 +15,6 @@ function clickHandler(evt) { let t0 = performance.now(); let result = window.evaluate(text); let t1 = performance.now(); - p.textContent = `${t1 - t0}ms: ${result}`; + p.textContent = `> ${result}`; console.log(result); } diff --git a/src/lib/lib.rs b/src/lib/lib.rs index 8fd4cdc4cb..94f98f2561 100644 --- a/src/lib/lib.rs +++ b/src/lib/lib.rs @@ -28,6 +28,7 @@ pub fn exec(src: String) { let mut lexer = Lexer::new(&src); lexer.lex().unwrap(); let tokens = lexer.tokens; + // dbg!(&tokens); // Setup executor let expr = Parser::new(tokens).parse_all().unwrap(); @@ -58,7 +59,7 @@ pub fn evaluate(src: &str) -> String { Ok(v) => { expr = v; } - Err(v) => { + Err(_v) => { log("parsing fail"); return String::from("parsing failed"); }