1
0
mirror of https://github.com/cmur2/joe-syntax.git synced 2024-12-22 12:54:23 +01:00

Add draft Makefile highlighter

This commit is contained in:
cn 2017-04-18 21:18:38 +02:00
parent c1a644af8b
commit 1c43114a71
2 changed files with 86 additions and 5 deletions

10
ftyperc
View File

@ -689,27 +689,27 @@
Makefile Makefile
*Makefile *Makefile
-autoindent -autoindent
-syntax conf -syntax makefile
-pound_comment -pound_comment
*makefile *makefile
-autoindent -autoindent
-syntax conf -syntax makefile
-pound_comment -pound_comment
*Makefile.in *Makefile.in
-autoindent -autoindent
-syntax conf -syntax makefile
-pound_comment -pound_comment
*makefile.in *makefile.in
-autoindent -autoindent
-syntax conf -syntax makefile
-pound_comment -pound_comment
*MAKEFILE *MAKEFILE
-autoindent -autoindent
-syntax conf -syntax makefile
-pound_comment -pound_comment
Pascal Pascal

81
makefile.jsf Normal file
View File

@ -0,0 +1,81 @@
# JOE syntax highlight file for Makefile
=Idle
=Comment green
=CommentLabel bold green
=Constant cyan
=Escape bold cyan
=Bad bold red
=BadSpace inverse red
=Variable blue
=Target fg_310 # brown
=TargetRest
:line_start Idle
* idle noeat
" " bad_space recolor=-1
"#" line_comment recolor=-1
"a-zA-Z_" maybe_var_or_target mark
:idle Idle
* idle
"$" maybe_substitute
"\n" line_start
:maybe_substitute Idle
* idle noeat
"(" substitute recolor=-2
:substitute Constant
* substitute
")" idle
:bad_space BadSpace
* line_start noeat
:line_comment Comment
* line_comment
# might be TODO label
"BFHNTX" comment noeat call=.comment_todo()
"\n" line_start
:maybe_var_or_target Idle
* idle noeat
"a-zA-Z_-" maybe_var_or_target
"=" variable recolormark
":" target noeat recolormark
:variable Variable
* idle noeat
:target Target
* target_rest
:target_rest TargetRest
* target_rest
"\n" line_start
.subr comment_todo
# initial state
:comment_todo_init Comment
* comment_todo_guess buffer
# highlight common TODO labels
:comment_todo_guess Comment
* comment_todo_unknown noeat strings
"BUG" comment_todo
"FIXME" comment_todo
"HACK" comment_todo
"NOTE" comment_todo
"TODO" comment_todo
"XXX" comment_todo
done
"A-Z" comment_todo_guess
:comment_todo_unknown Comment
* NULL noeat return
:comment_todo CommentLabel
* NULL noeat return
.end