sample.elv 609 B

1234567891011121314151617181920212223242526
  1. # A sample file to test syntax highlighting.
  2. nop "double \n quoted" and 'single '' quoted' # comment
  3. # Various variable contexts
  4. nop $pid
  5. var var-name = { var fn-name~ = {var not-var-name} }
  6. nop (set var-name = foo | tmp var-name = bar); del var-name
  7. for var-name [] { }
  8. try { } catch var-name { }
  9. # Builtin functions
  10. != a (nop b) | echo c
  11. # Builtin special command
  12. and a b # "operator"
  13. use re # "other"
  14. if a { } elif b { } else { }
  15. try { } except err { } else { } finally { }
  16. # Metacharacters
  17. echo ** () []
  18. # Regression tests
  19. set-env # should highlight entire set-env
  20. set-foo # should highlight nothing