From 3a2285c6130afadc6c21372f6c0da78255f612f2 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 28 Feb 2020 11:23:22 -0800 Subject: 6068 --- html/apps/ex2.2.mu.html | 2 +- html/apps/ex3.mu.html | 2 +- html/apps/factorial.mu.html | 16 ++++++++-------- mu.vim | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/html/apps/ex2.2.mu.html b/html/apps/ex2.2.mu.html index 4ba854ac..4cab5df4 100644 --- a/html/apps/ex2.2.mu.html +++ b/html/apps/ex2.2.mu.html @@ -59,7 +59,7 @@ if ('onhashchange' in window) { 3 } 4 5 fn foo -> result/ebx: int { - 6 var n: int + 6 var n: int 7 copy-to n, 3 8 increment n 9 result <- copy n diff --git a/html/apps/ex3.mu.html b/html/apps/ex3.mu.html index fed6aa64..bae8125a 100644 --- a/html/apps/ex3.mu.html +++ b/html/apps/ex3.mu.html @@ -57,7 +57,7 @@ if ('onhashchange' in window) {
  1 fn main -> result/ebx: int {
  2   result <- copy 0
- 3   var i/eax: int <- copy 1
+ 3   var i/eax: int <- copy 1
  4   {
  5     compare i, 0xa
  6     break-if->
diff --git a/html/apps/factorial.mu.html b/html/apps/factorial.mu.html
index 8c5cd816..f953f504 100644
--- a/html/apps/factorial.mu.html
+++ b/html/apps/factorial.mu.html
@@ -61,21 +61,21 @@ if ('onhashchange' in window) {
  3 #   ./a.elf test  # to run tests
  4 #   ./a.elf       # to run factorial(5)
  5 fn main args: (addr array kernel-string) -> exit-status/ebx: int {
- 6   var a/eax: (addr array kernel-string) <- copy args
- 7   var tmp/ecx: int <- length a
+ 6   var a/eax: (addr array kernel-string) <- copy args
+ 7   var tmp/ecx: int <- length a
  8   $main-body: {
  9     compare tmp, 1
 10     # if (len(args) == 1) factorial(5)
 11     {
 12       break-if-!=
-13       var tmp/eax: int <- factorial 5
+13       var tmp/eax: int <- factorial 5
 14       exit-status <- copy tmp
 15       break $main-body
 16     }
 17     # if (args[1] == "test") run-tests()
-18     var tmp2/ecx: int <- copy 1  # we need this just because we don't yet support `index` on literals; requires some translation-time computation
-19     var tmp3/ecx: (addr kernel-string) <- index a, tmp2
-20     var tmp4/eax: boolean <- kernel-string-equal? *tmp3, "test"
+18     var tmp2/ecx: int <- copy 1  # we need this just because we don't yet support `index` on literals; requires some translation-time computation
+19     var tmp3/ecx: (addr kernel-string) <- index a, tmp2
+20     var tmp4/eax: boolean <- kernel-string-equal? *tmp3, "test"
 21     compare tmp4, 0
 22     {
 23       break-if-=
@@ -93,7 +93,7 @@ if ('onhashchange' in window) {
 35   }
 36   {
 37     break-if-<=
-38     var tmp/ecx: int <- copy n
+38     var tmp/ecx: int <- copy n
 39     tmp <- decrement
 40     result <- factorial tmp
 41     result <- multiply n
@@ -101,7 +101,7 @@ if ('onhashchange' in window) {
 43 }
 44 
 45 fn test-factorial {
-46   var result/eax: int <- factorial 5
+46   var result/eax: int <- factorial 5
 47   check-ints-equal result 0x78 "F - test-factorial"
 48 }
 
diff --git a/mu.vim b/mu.vim index c83b391b..b4b06710 100644 --- a/mu.vim +++ b/mu.vim @@ -48,7 +48,7 @@ syntax match muControl "\\|\ " -syntax keyword muRecipe fn type +syntax keyword muRecipe fn type var highlight link muRecipe PreProc syntax match muData "^type\>" -- cgit 1.4.1-2-gfad0