Tatham Oddie  committed 76a77b8

Started adding the key pieces to the basic view.

  • Participants
  • Parent commits c3d9d72

Comments (0)

Files changed (2)

File Web/Controllers/AnalysisController.cs

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

File Web/Views/Analysis/Basic.cshtml

 @inherits System.Web.Mvc.WebViewPage<dynamic>
+@using System.Web.Mvc.Html;
+<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>
+<h2>We worked that out in @View.TimeTaken.TotalSeconds.ToString("#,##0.00000000") seconds. Your move.</h2>