diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-03-02 08:23:54 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-03-02 08:23:54 -0800 |
commit | a53ab5266f1d29de4f024d4369e10d673c931580 (patch) | |
tree | 83ed0769be4c823984b1eff99f1383ae98c6b69e | |
parent | 32d5099fa005bdeed30bd1e6798b81e3a75f1a1a (diff) | |
download | mu-a53ab5266f1d29de4f024d4369e10d673c931580.tar.gz |
6078 - highlight hex literals in Vim
-rw-r--r-- | html/apps/ex1.mu.html | 2 | ||||
-rw-r--r-- | html/apps/factorial.mu.html | 2 | ||||
-rw-r--r-- | mu.vim | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/html/apps/ex1.mu.html b/html/apps/ex1.mu.html index 1e1139ae..10d019b0 100644 --- a/html/apps/ex1.mu.html +++ b/html/apps/ex1.mu.html @@ -66,7 +66,7 @@ if ('onhashchange' in window) { <span id="L9" class="LineNr"> 9 </span><span class="Comment"># 42</span> <span id="L10" class="LineNr">10 </span> <span id="L11" class="LineNr">11 </span><span class="PreProc">fn</span> main<span class="PreProc"> -> </span>result/<span class="Constant">ebx</span>: int <span class="Delimiter">{</span> -<span id="L12" class="LineNr">12 </span> result <span class="Special"><-</span> copy <span class="Constant">0</span>x2a <span class="Comment"># Mu requires hexadecimal</span> +<span id="L12" class="LineNr">12 </span> result <span class="Special"><-</span> copy <span class="Constant">0x2</span>a <span class="Comment"># Mu requires hexadecimal</span> <span id="L13" class="LineNr">13 </span><span class="Delimiter">}</span> </pre> </body> diff --git a/html/apps/factorial.mu.html b/html/apps/factorial.mu.html index d5afe896..3fdbd8ed 100644 --- a/html/apps/factorial.mu.html +++ b/html/apps/factorial.mu.html @@ -78,7 +78,7 @@ if ('onhashchange' in window) { <span id="L20" class="LineNr">20 </span> <span id="L21" class="LineNr">21 </span><span class="PreProc">fn</span> <a href='../a.subx.html#L31'>test-factorial</a> <span class="Delimiter">{</span> <span id="L22" class="LineNr">22 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="Special"><-</span> <a href='../a.subx.html#L1'>factorial</a> <span class="Constant">5</span> -<span id="L23" class="LineNr">23 </span> <a href='../051test.subx.html#L24'>check-ints-equal</a> result <span class="Constant">0</span>x78 <span class="Constant">"F - test-factorial"</span> +<span id="L23" class="LineNr">23 </span> <a href='../051test.subx.html#L24'>check-ints-equal</a> result <span class="Constant">0x78</span> <span class="Constant">"F - test-factorial"</span> <span id="L24" class="LineNr">24 </span><span class="Delimiter">}</span> <span id="L25" class="LineNr">25 </span> <span id="L26" class="LineNr">26 </span><span class="PreProc">fn</span> main args: (addr array kernel-string)<span class="PreProc"> -> </span>exit-status/<span class="Constant">ebx</span>: int <span class="Delimiter">{</span> diff --git a/mu.vim b/mu.vim index aea6dfb9..b6444656 100644 --- a/mu.vim +++ b/mu.vim @@ -32,7 +32,7 @@ let b:cmt_head = "#? " syntax match muDelimiter "[{}]" | highlight link muDelimiter Delimiter " Mu literals -syntax match muLiteral %\<[0-9-]\?[0-9]\+% +syntax match muLiteral %\<\(0x\)\?[0-9-]\?[0-9]\+% syntax match muLiteral %"[^"]*"% highlight link muLiteral Constant |