Skip to content

Commit 20fb77e

Browse files
Layerexhrkrshnn
authored andcommitted
Highlight interface names
1 parent f0f68b0 commit 20fb77e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

solidity-mode.el

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ Possible values are:
338338
(2 font-lock-variable-name-face))
339339
'(solidity-match-contract-decl (1 font-lock-keyword-face)
340340
(2 font-lock-variable-name-face))
341+
'(solidity-match-interface-decl (1 font-lock-keyword-face)
342+
(2 font-lock-variable-name-face))
341343
'(solidity-match-modifier-decl (1 font-lock-keyword-face)
342344
(2 font-lock-variable-name-face))
343345
'(solidity-match-struct-decl (1 font-lock-keyword-face)
@@ -370,6 +372,15 @@ First match should be a keyword and second an identifier."
370372
" *\\(\\<contract\\>\\) +\\(" solidity-identifier-regexp "\\)")
371373
limit))
372374

375+
(defun solidity-match-interface-decl (limit)
376+
"Search the buffer forward until LIMIT matching interface declarations.
377+
378+
First match should be a keyword and second an identifier."
379+
(solidity-match-regexp
380+
(concat
381+
" *\\(\\<interface\\>\\) +\\(" solidity-identifier-regexp "\\)")
382+
limit))
383+
373384
(defun solidity-match-library-decl (limit)
374385
"Search the buffer forward until LIMIT matching library declarations.
375386

0 commit comments

Comments
 (0)