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.

65 lines
2.4 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 keyword goSnarkCircuitImport import
  25. syn match goSnarkCircuitFuncCall /\<\K\k*\ze\s*(/
  26. syn keyword goSnarkCircuitPrivate private nextgroup=goSnarkCircuitInputName skipwhite
  27. syn keyword goSnarkCircuitPublic public nextgroup=goSnarkCircuitInputName skipwhite
  28. syn match goSnarkCircuitInputName '\i\+' contained
  29. syn match goSnarkCircuitBraces "[{}\[\]]"
  30. syn match goSnarkCircuitParens "[()]"
  31. syn region goSnarkCircuitPath start=+"+ skip=+\\\\\|\\"+ end=+"\|$+
  32. syn sync fromstart
  33. syn sync maxlines=100
  34. " Define the default highlighting.
  35. " Only when an item doesn't have highlighting yet
  36. hi def link goSnarkCircuitLineComment Comment
  37. hi def link goSnarkCircuitCommentTodo Todo
  38. hi def link goSnarkCircuitSpecialCharacter Special
  39. hi def link goSnarkCircuitNumber Number
  40. hi def link goSnarkCircuitOpSymbols Operator
  41. hi def link goSnarkCircuitFuncCall Function
  42. hi def link goSnarkCircuitEquals Identifier
  43. hi def link goSnarkCircuitFunction Keyword
  44. hi def link goSnarkCircuitImport Keyword
  45. hi def link goSnarkCircuitBraces Function
  46. hi def link goSnarkCircuitPrivate Keyword
  47. hi def link goSnarkCircuitPublic Keyword
  48. hi def link goSnarkCircuitInputName Special
  49. hi def link goSnarkCircuitOut Special
  50. hi def link goSnarkCircuitPrivatePublic Keyword
  51. hi def link goSnarkCircuitPath String
  52. let b:current_syntax = "go-snark-circuit"
  53. if main_syntax == 'go-snark-circuit'
  54. unlet main_syntax
  55. endif
  56. let &cpo = s:cpo_save
  57. unlet s:cpo_save
  58. " vim: ts=8