fix lsl string - part one

This commit is contained in:
Builder's Brewery 2014-02-18 17:22:47 +01:00
commit 4e4d8a553b

View file

@ -62,23 +62,13 @@ function LSLHighlightRules() {
token : "comment.line.double-slash.lsl",
regex : "\\/\\/.*$"
}, {
token : "comment.block.lsl",
token : "comment.block.begin.lsl",
regex : "\\/\\*",
next : "comment"
}, {
token : "string.quoted.double.lsl",
start : '"',
end : '"',
next : [
{
token : "constant.character.escape.lsl",
regex : /\\[tn"\\]/
},
{
token : "invalid.illegal.constant.character.escape.lsl",
regex : "\\."
}
]
token : "string.quoted.double.begin.lsl",
regex : '"',
next : "string"
}, {
token : "constant.numeric.lsl",
regex : "(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b"
@ -113,13 +103,32 @@ function LSLHighlightRules() {
],
"comment" : [
{
token : "comment.block.lsl",
regex : ".*?\\*\\/",
token : "comment.block.end.lsl",
regex : "\\*\\/",
next : "start"
}, {
token : "comment.block.lsl",
regex : ".+"
}
],
"string" : [
{
token : "constant.character.escape.lsl",
regex : /\\[tn"\\]/
},
{
token : "invalid.illegal.constant.character.escape.lsl",
regex : /\\./
},
{
token : "string.quoted.double.end.lsl",
regex : /"/,
next : "start"
},
{
token : "string.quoted.double.lsl",
regex : ".+"
}
]
};
this.normalizeRules();