# JOE syntax highlight file for Joe Colors

=Idle
=Comment
=Preproc
=Define		+DefinedIdent
=ColorSection	+Preproc
=BuiltinSpec	+Keyword
=ColorAttr	+Keyword
=ColorDef	+Type
=ColorRef	+Type
=Constant
=Number		+Constant
=Operator
=Macro		+Variable +Escape

:idle Idle
	*		idle
	"#"		comment		recolor=-1
	"0-9"		number		recolor=-1
	"$"		hex_color	recolor=-1
	"*"		asterisk	recolor=-1
	"="		color_def	recolor=-1
	"+"		color_ref	recolor=-1
	"."		pre		recolor=-1 buffer
	"/"		slash		recolor=-1
	"-"		builtin		recolor=-1
	"["		macro_ref	recolor=-1
	"a-zA-Z"	attribute	recolor=-1

:comment Comment comment
	*		comment
	"\n"		idle

:number Number
	*		idle		noeat
	"0-9"		number

:hex_color Number
	*		idle		noeat
	"0-9a-fA-F"	hex_color

:asterisk Operator
	*		idle		noeat

:slash Operator
	*		idle		noeat

:color_def ColorDef
	*		idle		noeat
	"\c."		color_def

:color_ref ColorRef
	*		idle		noeat
	"\c."		color_ref

:pre Preproc
	*		idle		noeat strings
	".colors"	color_section
	".set"		macro_def
done
	"\c"		pre

:color_section ColorSection
	*		idle		noeat

:macro_def Preproc
	*		idle
	" \t"		macro_def
	"\i"		macro_name	noeat

:macro_name Define
	*		idle
	"\i\c"		macro_name

:macro_ref Macro
	*		macro_ref
	"\n]"		idle

:builtin BuiltinSpec
	*		idle		noeat
	"\c"		builtin

:attribute ColorAttr
	*		idle		noeat
	"a-zA-Z"	attribute
