mirror of
https://github.com/cmur2/joe-syntax.git
synced 2024-11-01 00:56:15 +01:00
268167c81e
This marks bad tabulators (inverse red) to make clear that YAML only relies on spaces for indentation.
129 lines
2.0 KiB
Plaintext
129 lines
2.0 KiB
Plaintext
# JOE syntax highlight file for YAML
|
|
|
|
=Idle
|
|
=Comment green
|
|
=Constant cyan
|
|
=Escape bold cyan
|
|
=Type bold
|
|
=Keyword bold
|
|
=Bad bold red
|
|
=Brace magenta
|
|
|
|
=Directive red
|
|
=Reference yellow
|
|
=LocalType fg_310 # brown
|
|
=BlockDelim bold blue
|
|
|
|
=BadTab inverse red
|
|
|
|
:line_start Idle
|
|
* idle noeat
|
|
"\t" bad_tab recolor=-1
|
|
" " line_start
|
|
|
|
:idle Idle
|
|
* idle
|
|
"\n" line_start
|
|
"%" directive recolor=-1
|
|
"#" line_comment recolor=-1
|
|
"'" string_sq_1 recolor=-1
|
|
"\"" string_dq_1 recolor=-1
|
|
"{[]}" brace recolor=-1
|
|
"-" maybe_block1
|
|
"." maybe_block_end1
|
|
"*&" maybe_reference
|
|
"!" maybe_typecast
|
|
|
|
# mark bad tabs until the first non-whitespace
|
|
:bad_tab BadTab
|
|
* line_start noeat
|
|
|
|
:line_comment Comment
|
|
* line_comment
|
|
"\n" line_start
|
|
|
|
:brace Brace
|
|
* idle noeat
|
|
|
|
:directive Directive
|
|
* directive
|
|
"\n" line_start
|
|
|
|
:string_sq_1 Constant
|
|
* string_sq noeat
|
|
|
|
:string_sq Constant
|
|
* string_sq
|
|
"\'" idle
|
|
"\\" string_sq_esc recolor=-1
|
|
|
|
:string_sq_esc Escape
|
|
* string_sq
|
|
"\n" string_sq recolor=-2
|
|
|
|
:string_dq_1 Constant
|
|
* string_dq noeat
|
|
|
|
:string_dq Constant
|
|
* string_dq
|
|
"\"" idle
|
|
"\\" string_dq_esc recolor=-1
|
|
|
|
:string_dq_esc Escape
|
|
* string_dq
|
|
"\n" string_dq recolor=-2
|
|
|
|
:maybe_block1 Idle
|
|
* idle noeat
|
|
"-" maybe_block2
|
|
|
|
:maybe_block2 Idle
|
|
* idle noeat
|
|
"-" block recolor=-3
|
|
|
|
:block BlockDelim
|
|
* idle noeat
|
|
|
|
:maybe_block_end1 Idle
|
|
* idle noeat
|
|
"." maybe_block_end2
|
|
|
|
:maybe_block_end2 Idle
|
|
* idle noeat
|
|
"." block_end recolor=-3
|
|
|
|
:block_end BlockDelim
|
|
* idle noeat
|
|
|
|
:maybe_reference Idle
|
|
* idle
|
|
"a-zA-Z_" reference recolor=-2
|
|
|
|
:reference Reference
|
|
* idle noeat
|
|
"a-zA-Z0-9_" reference
|
|
|
|
:maybe_typecast Idle
|
|
* idle noeat
|
|
"a-zA-Z_" local_type recolor=-1
|
|
"!" builtin_type
|
|
|
|
:builtin_type Idle
|
|
* idle noeat
|
|
"a-zA-Z" builtin_type2 buffer
|
|
|
|
:builtin_type2 Idle
|
|
* idle noeat strings
|
|
"str" type
|
|
"float" type
|
|
"binary" type
|
|
done
|
|
"a-zA-Z_" builtin_type2
|
|
|
|
:type Type
|
|
* idle noeat
|
|
|
|
:local_type LocalType
|
|
* idle noeat
|
|
"a-zA-Z_" local_type
|