m3quake.vim 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. " Vim syntax file
  2. " Language: Modula-3 Quake
  3. " Maintainer: Doug Kearns <dougkearns@gmail.com>
  4. " Last Change: 2021 April 15
  5. if exists("b:current_syntax")
  6. finish
  7. endif
  8. " Keywords
  9. syn keyword m3quakeKeyword else end foreach if in is local or proc readonly
  10. syn keyword m3quakeKeyword return
  11. " Builtin procedures {{{
  12. " Generated from m3-sys/m3quake/src/QMachine.m3
  13. syn keyword m3quakeProcedure arglist cp_if defined empty equal error escape
  14. syn keyword m3quakeProcedure exec cm3_exec file format include make_dir
  15. syn keyword m3quakeProcedure normalize path stale try_exec try_cm3_exec
  16. syn keyword m3quakeProcedure unlink_file write datetime date datestamp
  17. syn keyword m3quakeProcedure TRACE_INSTR eval_func hostname
  18. syn keyword m3quakeProcedure pushd popd cd getwd
  19. syn keyword m3quakeProcedure quake
  20. syn keyword m3quakeProcedure q_exec q_exec_put q_exec_get
  21. syn keyword m3quakeProcedure fs_exists fs_readable fs_writable fs_executable
  22. syn keyword m3quakeProcedure fs_isdir fs_isfile fs_contents fs_putfile
  23. syn keyword m3quakeProcedure fs_mkdir fs_touch fs_lsdirs fs_lsfiles fs_rmdir
  24. syn keyword m3quakeProcedure fs_rmfile fs_rmrec fs_cp
  25. syn keyword m3quakeProcedure pn_valid pn_decompose pn_compose pn_absolute
  26. syn keyword m3quakeProcedure pn_prefix pn_last pn_base pn_lastbase pn_lastext
  27. syn keyword m3quakeProcedure pn_join pn_join2 pn_replace_ext pn_parent
  28. syn keyword m3quakeProcedure pn_current
  29. syn keyword m3quakeProcedure len
  30. syn keyword m3quakeProcedure split sub skipl skipr squeeze compress pos
  31. syn keyword m3quakeProcedure tcontains bool encode decode subst_chars
  32. syn keyword m3quakeProcedure del_chars subst subst_env add_prefix add_suffix
  33. " }}}
  34. " Identifiers
  35. syn match m3quakeEnvVariable "$\h\w\+"
  36. " Operators
  37. syn match m3quakeOperator "&"
  38. syn match m3quakeOperator "\<\%(contains\|not\|and\|or\)\>"
  39. " Strings
  40. syn match m3quakeEscape "\\[\\nrtbf"]" contained display
  41. syn region m3quakeString start=+"+ end=+"+ contains=m3quakeEscape
  42. " Comments
  43. syn keyword m3quakeTodo TODO FIXME XXX contained
  44. syn region m3quakeComment start="%" end="$" contains=m3quakeTodo,@Spell
  45. syn region m3quakeComment start="/\*" end="\*/" contains=m3quakeTodo,@Spell
  46. " Default highlighting
  47. hi def link m3quakeCommand Statement
  48. hi def link m3quakeComment Comment
  49. hi def link m3quakeEnvVariable Identifier
  50. hi def link m3quakeEscape Special
  51. hi def link m3quakeKeyword Keyword
  52. hi def link m3quakeOperator Operator
  53. hi def link m3quakeProcedure Function
  54. hi def link m3quakeString String
  55. hi def link m3quakeTodo Todo
  56. let b:current_syntax = "m3quake"
  57. " vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker: