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.

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