{ scopeName = 'source.java-props';
fileTypes = ( 'properties' );
patterns = (
{ name = 'comment.line.number-sign.java-props';
match = '^\s*([#!])(.+)?$\n?';
captures = { 1 = { name = 'punctuation.definition.comment.java-props'; }; };
},
{ comment = 'Empty Property Definition';
match = '^\s*((?:\\:|\\=|[^:=\s])+)\s*([:=])\s*$';
captures = {
1 = { name = 'keyword.other.java-props'; };
2 = { name = 'punctuation.separator.key-value.java-props'; };
};
},
{ comment = 'Property Definition';
begin = '^\s*((?:\\:|\\=|[^:=\s])+)\s*([:=])\s*';
end = '(?<!\\{1})$\n?';
beginCaptures = {
1 = { name = 'keyword.other.java-props'; };
2 = { name = 'punctuation.separator.key-value.java-props'; };
};
patterns = (
{ name = 'entity.name.variable.java-props';
match = '\{\d+\}';
},
{ comment = 'Leading space on a continued line is ignored';
match = '^\s*';
},
{ name = 'punctuation.separator.continuation.java-props';
match = '(\\)(?=$\n)';
},
{ name = 'constant.character.escape.java-props';
match = '\\(?:[\\nt\"'']|u[0-9A-Fa-f]{4})';
},
{ name = 'invalid.illegal.character.escape.java-props';
match = '\\.';
},
{ name = 'string.java-props';
match = '.';
},
);
},
{ comment = 'Ignore blank lines';
match = '^\s*$';
},
{ name = 'invalid.illegal.java-props';
comment = 'Anything else is illegal';
match = '.*';
},
);
}