48 lines
		
	
	
		
			1000 B
		
	
	
	
		
			VimL
		
	
	
	
	
	
		
		
			
		
	
	
			48 lines
		
	
	
		
			1000 B
		
	
	
	
		
			VimL
		
	
	
	
	
	
| 
								 | 
							
								" Vim syntax file
							 | 
						||
| 
								 | 
							
								" Language: Kyn
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								if exists("b:current_syntax")
							 | 
						||
| 
								 | 
							
								  finish
							 | 
						||
| 
								 | 
							
								endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								" Keywords
							 | 
						||
| 
								 | 
							
								syn keyword kynKeyword fun struct let if while return assert is
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								" Instructions/Modules
							 | 
						||
| 
								 | 
							
								syn keyword kynInstruction println print math exit compare input concat split file
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								" Comments
							 | 
						||
| 
								 | 
							
								syn match kynComment /#.*/
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								" Strings
							 | 
						||
| 
								 | 
							
								syn region kynString start=/"/ end=/"/
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								" Numbers
							 | 
						||
| 
								 | 
							
								syn match kynNumber /\d\+\(\.\d\+\)\?/
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								" Variables
							 | 
						||
| 
								 | 
							
								syn match kynVariable /\$[a-zA-Z_][a-zA-Z0-9_]*/
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								" Type Placeholders
							 | 
						||
| 
								 | 
							
								syn match kynType /<[a-zA-Z_][a-zA-Z0-9_]*>/
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								" Operators
							 | 
						||
| 
								 | 
							
								syn match kynOperator /[=+\-*\/^%]/
							 | 
						||
| 
								 | 
							
								syn match kynOperator /==\|!=\|>=\|<=/
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								" Special variables
							 | 
						||
| 
								 | 
							
								syn keyword kynSpecial self
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								" Highlighting links
							 | 
						||
| 
								 | 
							
								hi def link kynKeyword Keyword
							 | 
						||
| 
								 | 
							
								hi def link kynInstruction Statement
							 | 
						||
| 
								 | 
							
								hi def link kynComment Comment
							 | 
						||
| 
								 | 
							
								hi def link kynString String
							 | 
						||
| 
								 | 
							
								hi def link kynNumber Number
							 | 
						||
| 
								 | 
							
								hi def link kynVariable Identifier
							 | 
						||
| 
								 | 
							
								hi def link kynType Type
							 | 
						||
| 
								 | 
							
								hi def link kynOperator Operator
							 | 
						||
| 
								 | 
							
								hi def link kynSpecial Special
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								let b:current_syntax = "kyn"
							 |