Commits

Tatham Oddie committed 76a77b8

Started adding the key pieces to the basic view.

Comments (0)

Files changed (2)

Web/Controllers/AnalysisController.cs

             var stopwatch = new Stopwatch();
             stopwatch.Start();
 
+            var tokens = Tokenizer.Tokenize(expression);
+            var nodes = new TreeBuilder().Build(tokens);
+
             stopwatch.Stop();
 
             ViewData["TimeTaken"] = stopwatch.Elapsed;
 
+            ViewData["NodesMarkup"] = RenderNodesAsHtml(nodes);
+
             return View("Basic");
         }
 

Web/Views/Analysis/Basic.cshtml

 @inherits System.Web.Mvc.WebViewPage<dynamic>
+@using System.Web.Mvc.Html;
 
-<code>@View.Expression</code>
+<h2>You gave us this expression:</h2>
+<code class="code-block">@View.Expression</code>
 
-<p>Took @View.TimeTaken.TotalSeconds.ToString("#,##0.00000000")s.</p>
+<h2>This is how it works:</h2>
+@View.NodesMarkup
+
+<h2>We worked that out in @View.TimeTaken.TotalSeconds.ToString("#,##0.00000000") seconds. Your move.</h2>