Last active
February 5, 2020 09:54
-
-
Save desaperados/e712c0a3877391a199a4516aa5c11231 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim syntax file | |
" Language: Act | |
" Maintainer: dc | |
" Latest Revision: December 2019 | |
" Keywords | |
syn keyword actKeyword types storage iff if of returnsRaw | |
syn keyword actKeyword returns balance gas pc calls stack | |
syn match actKeyword "\<for all\>" | |
syn match actKeyword "\<such that\>" | |
" Types | |
syn keyword actType bool uint int uint32 uint48 uint112 uint256 int256 address bytes32 | |
" Constants | |
syn keyword actConstant ACCT_ID CALLER_ID TIME VCallValue VCallDepth 0 | |
" Behaviour | |
syn keyword actBehaviour behaviour nextgroup=actBehaviourDecl | |
" Interface | |
syn keyword actInterface interface nextgroup=actInterfaceDecl | |
" Operators | |
syn match actOperator "+\-" | |
syn match actOperator "\v>\<" | |
syn match actOperator "\v>=\<=" | |
syn match actOperator "=\==" | |
syn match actOperator ":" | |
syn match actOperator "=>" | |
syn match actOperator "|->" | |
syn match actOperator "/" | |
syn match actOperator "\*" | |
syn match actOperator "mod" | |
syn match actOperator "pow\d*" | |
" Mapping | |
syn match actMapping "\[\|\]" | |
" K | |
syn match kOperator "-Word" | |
syn match Function "#\{1}\w*" | |
syn keyword Function chop | |
syn match Conditional "#if" | |
syn match Conditional "#fi" | |
syn match Conditional "#then" | |
syn match Conditional "#else" | |
" Comments | |
syn keyword actTodo FIXME NOTE TODO contained | |
syn match actComment "//.*$" contains=actTodo | |
" Highlight Groups | |
hi def link actComment Comment | |
hi def link actKeyword Keyword | |
hi def link actInterface Keyword | |
hi def link actBehaviour Keyword | |
hi def link actFunction Function | |
hi def link actConstant Constant | |
hi def link actOperator Operator | |
hi def link kOperator Operator | |
hi def link actType Type | |
hi def link actK Identifier | |
hi def link actMapping Identifier | |
let b:current_syntax = "act" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment