neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

lace.vim (4075B)


      1 " Vim syntax file
      2 " Language:		lace
      3 " Maintainer:	Jocelyn Fiat <utilities@eiffel.com>
      4 " Last Change:	2001 May 09
      5 
      6 " Copyright Interactive Software Engineering, 1998
      7 " You are free to use this file as you please, but
      8 " if you make a change or improvement you must send
      9 " it to the maintainer at <utilities@eiffel.com>
     10 
     11 
     12 " quit when a syntax file was already loaded
     13 if exists("b:current_syntax")
     14  finish
     15 endif
     16 
     17 " LACE is case insensitive, but the style guide lines are not.
     18 
     19 if !exists("lace_case_insensitive")
     20 syn case match
     21 else
     22 syn case ignore
     23 endif
     24 
     25 " A bunch of useful LACE keywords
     26 syn keyword laceTopStruct		system root default option visible cluster
     27 syn keyword laceTopStruct		external generate end
     28 syn keyword laceOptionClause	collect assertion debug optimize trace
     29 syn keyword laceOptionClause	profile inline precompiled multithreaded
     30 syn keyword laceOptionClause	exception_trace dead_code_removal
     31 syn keyword laceOptionClause	array_optimization
     32 syn keyword laceOptionClause	inlining_size inlining
     33 syn keyword laceOptionClause	console_application dynamic_runtime
     34 syn keyword laceOptionClause	line_generation
     35 syn keyword laceOptionMark		yes no all
     36 syn keyword laceOptionMark		require ensure invariant loop check
     37 syn keyword laceClusterProp		use include exclude
     38 syn keyword laceAdaptClassName	adapt ignore rename as
     39 syn keyword laceAdaptClassName	creation export visible
     40 syn keyword laceExternal		include_path object makefile
     41 
     42 " Operators
     43 syn match   laceOperator		"\$"
     44 syn match   laceBrackets		"[[\]]"
     45 syn match   laceExport			"[{}]"
     46 
     47 " Constants
     48 syn keyword laceBool		true false
     49 syn keyword laceBool		True False
     50 syn region  laceString		start=+"+ skip=+%"+ end=+"+ contains=laceEscape,laceStringError
     51 syn match   laceEscape		contained "%[^/]"
     52 syn match   laceEscape		contained "%/\d\+/"
     53 syn match   laceEscape		contained "^[ \t]*%"
     54 syn match   laceEscape		contained "%[ \t]*$"
     55 syn match   laceStringError	contained "%/[^0-9]"
     56 syn match   laceStringError	contained "%/\d\+[^0-9/]"
     57 syn match   laceStringError	"'\(%[^/]\|%/\d\+/\|[^'%]\)\+'"
     58 syn match   laceCharacter	"'\(%[^/]\|%/\d\+/\|[^'%]\)'" contains=laceEscape
     59 syn match   laceNumber		"-\=\<\d\+\(_\d\+\)*\>"
     60 syn match   laceNumber		"\<[01]\+[bB]\>"
     61 syn match   laceNumber		"-\=\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\)\=\([eE][-+]\=\d\+\(_\d\+\)*\)\="
     62 syn match   laceNumber		"-\=\.\d\+\(_\d\+\)*\([eE][-+]\=\d\+\(_\d\+\)*\)\="
     63 syn match   laceComment		"--.*" contains=laceTodo
     64 
     65 
     66 syn case match
     67 
     68 " Case sensitive stuff
     69 
     70 syn keyword laceTodo		TODO XXX FIXME
     71 syn match	laceClassName	"\<[A-Z][A-Z0-9_]*\>"
     72 syn match	laceCluster		"[a-zA-Z][a-zA-Z0-9_]*\s*:"
     73 syn match	laceCluster		"[a-zA-Z][a-zA-Z0-9_]*\s*(\s*[a-zA-Z][a-zA-Z0-9_]*\s*)\s*:"
     74 
     75 " Catch mismatched parentheses
     76 syn match laceParenError	")"
     77 syn match laceBracketError	"\]"
     78 syn region laceGeneric		transparent matchgroup=laceBrackets start="\[" end="\]" contains=ALLBUT,laceBracketError
     79 syn region laceParen		transparent start="(" end=")" contains=ALLBUT,laceParenError
     80 
     81 " Should suffice for even very long strings and expressions
     82 syn sync lines=40
     83 
     84 " Define the default highlighting.
     85 " Only when an item doesn't have highlighting yet
     86 
     87 hi def link laceTopStruct			PreProc
     88 
     89 hi def link laceOptionClause		Statement
     90 hi def link laceOptionMark			Constant
     91 hi def link laceClusterProp		Label
     92 hi def link laceAdaptClassName		Label
     93 hi def link laceExternal			Statement
     94 hi def link laceCluster			ModeMsg
     95 
     96 hi def link laceEscape				Special
     97 
     98 hi def link laceBool				Boolean
     99 hi def link laceString				String
    100 hi def link laceCharacter			Character
    101 hi def link laceClassName			Type
    102 hi def link laceNumber				Number
    103 
    104 hi def link laceOperator			Special
    105 hi def link laceArray				Special
    106 hi def link laceExport				Special
    107 hi def link laceCreation			Special
    108 hi def link laceBrackets			Special
    109 hi def link laceConstraint			Special
    110 
    111 hi def link laceComment			Comment
    112 
    113 hi def link laceError				Error
    114 hi def link laceStringError		Error
    115 hi def link laceParenError			Error
    116 hi def link laceBracketError		Error
    117 hi def link laceTodo				Todo
    118 
    119 
    120 let b:current_syntax = "lace"
    121 
    122 " vim: ts=4