Pull out comment_todo into separate jsf

Note: Python has a second, special flavor for docstrings - might be a problem.
This commit is contained in:
cn 2015-02-18 14:53:07 +01:00
parent 255766b9b5
commit 1bdac950b3
6 changed files with 7 additions and 143 deletions

View File

@ -1,18 +1,7 @@
# ===== Color Definitions =====
=Comment green
=CommentLabel bold green
# ===== Example Usage =====
:line_comment Comment
* line_comment
# might be TODO label
"BFHNTX" line_comment noeat call=.comment_todo()
"\n" idle
# ===== Subroutine Declaration =====
.subr comment_todo
# initial state
:comment_todo_init Comment

View File

@ -5,7 +5,6 @@
=Idle
=Comment green
=CommentLabel bold green
=Constant cyan
=Escape bold cyan
=Type bold
@ -57,7 +56,7 @@
:comment Comment
* comment
# might be TODO label
"BFHNTX" comment noeat call=.comment_todo()
"BFHNTX" comment noeat call=comment_todo.comment_todo()
"*" maybe_end_comment
:maybe_end_comment Comment
@ -68,7 +67,7 @@
:line_comment Comment
* line_comment
# might be TODO label
"BFHNTX" line_comment noeat call=.comment_todo()
"BFHNTX" line_comment noeat call=comment_todo.comment_todo()
"\n" idle
:first_digit Constant
@ -258,27 +257,3 @@ done
* idle noeat
.end
.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

29
js.jsf
View File

@ -4,7 +4,6 @@
=Idle
=Comment green
=CommentLabel bold green
=Constant cyan
=String cyan
=StringEscape bold cyan
@ -189,7 +188,7 @@ done
:comment Comment
* comment
# might be TODO label
"BFHNTX" comment noeat call=.comment_todo()
"BFHNTX" comment noeat call=comment_todo.comment_todo()
"*" maybe_end_comment
:maybe_end_comment Comment
@ -200,7 +199,7 @@ done
:line_comment Comment
* line_comment
# might be TODO label
"BFHNTX" line_comment noeat call=.comment_todo()
"BFHNTX" line_comment noeat call=comment_todo.comment_todo()
"\n" idle
:regex Regexp
@ -522,27 +521,3 @@ done
"." prop_sep recolor=-1
.end
.subr comment_todo
# initial state
:todo_init Comment
* todo_guess buffer
# highlight common TODO labels
:todo_guess Comment
* todo_unknown noeat strings
"BUG" todo
"FIXME" todo
"HACK" todo
"NOTE" todo
"TODO" todo
"XXX" todo
done
"A-Z" todo_guess
:todo_unknown Comment
* NULL noeat return
:todo CommentLabel
* NULL noeat return
.end

View File

@ -6,7 +6,6 @@
=Idle
=Comment green
=CommentLabel bold green
=Docstring green
=DocstringLabel bold green
=DocEscape bold cyan
@ -40,7 +39,7 @@
:comment Comment
* comment
# might be TODO label
"BFHNTX" comment noeat call=.comment_todo()
"BFHNTX" comment noeat call=commend_todo.comment_todo()
"\n" idle
:string_sq_1 Constant
@ -199,30 +198,6 @@ done
* idle noeat
"a-zA-Z0-9_" priv_member
.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
.subr comment_todo_docstr
# initial state
:comment_todo_init Docstring

View File

@ -186,7 +186,7 @@ done
"%" line_comment_maybe_erb_end
.endif
# might be TODO label
"BFHNTX" line_comment noeat call=.comment_todo()
"BFHNTX" line_comment noeat call=commend_todo.comment_todo()
.ifdef haml
"\n" NULL return
.else
@ -570,27 +570,3 @@ done
"a-zA-Z0-9_" global_var
.end
.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

28
tex.jsf
View File

@ -2,7 +2,6 @@
=Idle
=Comment green
=CommentLabel bold green
=Keyword bold
=Mathmode cyan
=Brace magenta
@ -20,7 +19,7 @@
:comment Comment
* comment
# might be TODO label
"BFHNTX" comment noeat call=.comment_todo()
"BFHNTX" comment noeat call=comment_todo.comment_todo()
"\n" idle
:math Mathmode
@ -81,28 +80,3 @@ done
#:env_begin_name Bad
# * env_begin_name
# "}" idle noeat
.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