|
2 | 2 | " Language: Solidity |
3 | 3 | " Maintainer: Cothi ([email protected]) |
4 | 4 | " Original Author: tomlion (https://github.com/tomlion/vim-solidity/blob/master/syntax/solidity.vim) |
5 | | -" Last Change: 2022 Sep 27 |
| 5 | +" Last Change: 2025 Mar 25 |
6 | 6 | " |
7 | 7 | " Contributors: |
8 | 8 | " Modified by thesis (https://github.com/thesis/vim-solidity/blob/main/indent/solidity.vim) |
| 9 | +" Modified by S0AndS0 (https://github.com/S0AndS0/vim/blob/syntax-solidity-updates/runtime/syntax/solidity.vim) |
9 | 10 |
|
10 | 11 | if exists("b:current_syntax") |
11 | 12 | finish |
|
15 | 16 | syn keyword solKeyword abstract anonymous as break calldata case catch constant constructor continue default switch revert require |
16 | 17 | syn keyword solKeyword ecrecover addmod mulmod keccak256 |
17 | 18 | syn keyword solKeyword delete do else emit enum external final for function if immutable import in indexed inline |
18 | | -syn keyword solKeyword interface internal is let match memory modifier new of payable pragma private public pure override virtual |
| 19 | +syn keyword solKeyword interface internal is let match memory modifier new of payable pragma private public pure override virtual transient |
19 | 20 | syn keyword solKeyword relocatable return returns static storage struct throw try type typeof using |
20 | 21 | syn keyword solKeyword var view while |
21 | 22 |
|
@@ -158,6 +159,15 @@ hi def link solEvent Type |
158 | 159 | hi def link solEventName Function |
159 | 160 | hi def link solEventArgSpecial Label |
160 | 161 |
|
| 162 | +" Error |
| 163 | +syn match solError /\<error\>/ nextgroup=solErrorName,solErrorArgs skipwhite |
| 164 | +syn match solErrorName contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*/ nextgroup=solErrorArgs skipwhite |
| 165 | +syn region solErrorArgs contained matchgroup=solFuncParens start='(' end=')' contains=solErrorArgCommas,solBuiltinType skipwhite skipempty |
| 166 | +syn match solErrorArgCommas contained ',' |
| 167 | + |
| 168 | +hi def link solError Type |
| 169 | +hi def link solErrorName Function |
| 170 | + |
161 | 171 | " Comment |
162 | 172 | syn keyword solCommentTodo TODO FIXME XXX TBD contained |
163 | 173 | syn match solNatSpec contained /@title\|@author\|@notice\|@dev\|@param\|@inheritdoc\|@return/ |
|
0 commit comments