mirror of
https://github.com/urbit/shrub.git
synced 2024-11-24 13:06:09 +03:00
Improved rune matching to correctly digraphs following tis.
This commit is contained in:
parent
ed79f644b7
commit
7823c0ef41
@ -34,9 +34,8 @@ syn match hoonSymbolDec "\w*" contained contains=hoonName
|
||||
" numbers
|
||||
" As I understand it, numbers may be in decimal, hex, or binary, and they may
|
||||
" contain dots (functioning merely as separators, as in the American comma).
|
||||
" XXX It appears that a number can span lines if (and only if?) the lines end
|
||||
" in a dot. This mostly causes issues with hex numbers across mulitple lines
|
||||
" (as in hoon.hoon line 3067).
|
||||
" As I understand it, numbers may be in decimal, hex, or binary, and they may
|
||||
" contain dots (optionally followed by whitespace), as in the German manner.
|
||||
|
||||
syn sync linebreaks=1
|
||||
syn match hoonNumber "\d\{1,3\}\%(\.\_s\?\d\{3\}\)*"
|
||||
@ -55,6 +54,7 @@ syn region hoonString start=+'+ skip=+\\[\\']+ end=+'+ contains=@spe
|
||||
" match digraphs
|
||||
" XXX digraphs starting with '=' in e.g. paramater naming when this is really
|
||||
" the monograph '=' followed by a digraph. Example: hoon.hoon line 218
|
||||
" This is now fixed when '= is followed by a digraph, but not when followed by a monograph
|
||||
" XXX we should match some of the monographs, I'm just not totally sure which
|
||||
" ones. Certainly, $ and ~ seem important, but I'm not sure of others.
|
||||
|
||||
@ -136,15 +136,15 @@ syn match hoonRune ";;"
|
||||
syn match hoonRune ";\*"
|
||||
syn match hoonRune ";="
|
||||
syn match hoonRune ";?"
|
||||
syn match hoonRune "=|"
|
||||
syn match hoonRune "=\."
|
||||
syn match hoonRune "=\^"
|
||||
syn match hoonRune "=:"
|
||||
syn match hoonRune "=|\ze[^-|_%:.^+\=?]"
|
||||
syn match hoonRune "=\.\ze[^+*=?^]"
|
||||
syn match hoonRune "=\^\ze[^-+|.&~=?]"
|
||||
syn match hoonRune "=:\ze[^-_~/^+~*]"
|
||||
syn match hoonRune "=<"
|
||||
syn match hoonRune "=>"
|
||||
syn match hoonRune "=-"
|
||||
syn match hoonRune "=+"
|
||||
syn match hoonRune "=\~"
|
||||
syn match hoonRune "=\~\ze[^|\%:/<>#\+&=!]"
|
||||
syn match hoonRune "?|"
|
||||
syn match hoonRune "?:"
|
||||
syn match hoonRune "?\."
|
||||
|
Loading…
Reference in New Issue
Block a user