Browse Source

New JOE highlighter for Java's .properties files

Features:
- many :p
- value continuation on next line
- unicode escape codes
- line comments on # and !
- good error detection (simpler on stricter files)
pull/3/head
Christian Nicolai 10 years ago
parent
commit
6ce845cb5a
3 changed files with 95 additions and 1 deletions
  1. +0
    -1
      debian.jsf
  2. +4
    -0
      ftyperc
  3. +91
    -0
      properties.jsf

+ 0
- 1
debian.jsf View File

@ -4,7 +4,6 @@
=Comment green
=Keyword bold
=Bad bold red
=Help yellow
=URL cyan


+ 4
- 0
ftyperc View File

@ -781,3 +781,7 @@
Ant's build.xml
*build.xml
-syntax ant
Java's .properties
*.properties
-syntax properties

+ 91
- 0
properties.jsf View File

@ -0,0 +1,91 @@
# JOE syntax highlight file for properties files
=Idle
=Comment green
=Bad bold red
=Key
=KeyEscape bold
=Separator bold
=Constant cyan
=Escape bold cyan
:line_start Idle
* key noeat
"\n" line_start
" \t\r" line_start # leading spaces
"#!" line_comment recolor=-1
"=:" missing_key recolor=-1
:line_rest Idle
* line_rest
"\n" line_start
:line_comment Comment
* line_comment
"\n" line_start
:missing_key Bad
* value_pre noeat
:key Key
* key
"\\" key_esc recolor=-1
" \t\r" key_post noeat
"=:" sep recolor=-1
"\n" key_error recolor=-2
# one escaped char
:key_esc KeyEscape
* key
"\n" key_error recolor=-2
:key_post Idle
* value_pre noeat
" \t\r" key_post
"=:" sep recolor=-1
:key_error Bad
* key noeat
:sep Separator
* value_pre noeat
:value_pre Idle
* value noeat
" \t\r" value_pre
:value Constant
* value
"\\" value_esc recolor=-1
"\n" line_start
:value_esc Escape
* value_error recolor=-2
"u" value_unicode_hex1
"\n" value_cont
:value_unicode_hex1 Escape
* value_error recolor=-3
"A-Fa-f0-9" value_unicode_hex2
:value_unicode_hex2 Escape
* value_error recolor=-4
"A-Fa-f0-9" value_unicode_hex3
:value_unicode_hex3 Escape
* value_error recolor=-5
"A-Fa-f0-9" value_unicode_hex4
:value_unicode_hex4 Escape
* value_error recolor=-6
"A-Fa-f0-9" value
:value_cont Constant
* value
" \t\r" value_cont # leading spaces
:value_error Bad
* value noeat

Loading…
Cancel
Save