You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.2 KiB

  1. " Vim syntax file
  2. " Language: go-snark-circuit
  3. " URL: https://github.com/arnaucube/go-snark/blob/master/vim-syntax/syntax/go-snark-circuit.vim
  4. if !exists("main_syntax")
  5. " quit when a syntax file was already loaded
  6. if exists("b:current_syntax")
  7. finish
  8. endif
  9. let main_syntax = 'go-snark-circuit'
  10. elseif exists("b:current_syntax") && b:current_syntax == "go-snark-circuit"
  11. finish
  12. endif
  13. let s:cpo_save = &cpo
  14. set cpo&vim
  15. syn keyword goSnarkCircuitCommentTodo TODO FIXME XXX TBD contained
  16. syn match goSnarkCircuitLineComment "\/\/.*" contains=@Spell,goSnarkCircuitCommentTodo
  17. syn match goSnarkCircuitSpecialCharacter "'\\.'"
  18. syn match goSnarkCircuitNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
  19. syn match goSnarkCircuitOpSymbols "+\|-\|\*\|:\|)\|(\|="
  20. syn keyword goSnarkCircuitPrivatePublic private public
  21. syn keyword goSnarkCircuitOut out
  22. syn keyword goSnarkCircuitEquals equals
  23. syn keyword goSnarkCircuitFunction func
  24. syn match goSnarkCircuitFuncCall /\<\K\k*\ze\s*(/
  25. syn keyword goSnarkCircuitPrivate private nextgroup=goSnarkCircuitInputName skipwhite
  26. syn keyword goSnarkCircuitPublic public nextgroup=goSnarkCircuitInputName skipwhite
  27. syn match goSnarkCircuitInputName '\i\+' contained
  28. syn match goSnarkCircuitBraces "[{}\[\]]"
  29. syn match goSnarkCircuitParens "[()]"
  30. syn sync fromstart
  31. syn sync maxlines=100
  32. " Define the default highlighting.
  33. " Only when an item doesn't have highlighting yet
  34. hi def link goSnarkCircuitLineComment Comment
  35. hi def link goSnarkCircuitCommentTodo Todo
  36. hi def link goSnarkCircuitSpecialCharacter Special
  37. hi def link goSnarkCircuitNumber Number
  38. hi def link goSnarkCircuitOpSymbols Operator
  39. hi def link goSnarkCircuitFuncCall Function
  40. hi def link goSnarkCircuitEquals Identifier
  41. hi def link goSnarkCircuitFunction Keyword
  42. hi def link goSnarkCircuitBraces Function
  43. hi def link goSnarkCircuitPrivate Keyword
  44. hi def link goSnarkCircuitPublic Keyword
  45. hi def link goSnarkCircuitInputName Special
  46. hi def link goSnarkCircuitOut Special
  47. hi def link goSnarkCircuitPrivatePublic Keyword
  48. let b:current_syntax = "go-snark-circuit"
  49. if main_syntax == 'go-snark-circuit'
  50. unlet main_syntax
  51. endif
  52. let &cpo = s:cpo_save
  53. unlet s:cpo_save
  54. " vim: ts=8