fix lsl string - part one
This commit is contained in:
parent
a2cc97b34b
commit
4e4d8a553b
1 changed files with 25 additions and 16 deletions
|
|
@ -62,23 +62,13 @@ function LSLHighlightRules() {
|
||||||
token : "comment.line.double-slash.lsl",
|
token : "comment.line.double-slash.lsl",
|
||||||
regex : "\\/\\/.*$"
|
regex : "\\/\\/.*$"
|
||||||
}, {
|
}, {
|
||||||
token : "comment.block.lsl",
|
token : "comment.block.begin.lsl",
|
||||||
regex : "\\/\\*",
|
regex : "\\/\\*",
|
||||||
next : "comment"
|
next : "comment"
|
||||||
}, {
|
}, {
|
||||||
token : "string.quoted.double.lsl",
|
token : "string.quoted.double.begin.lsl",
|
||||||
start : '"',
|
regex : '"',
|
||||||
end : '"',
|
next : "string"
|
||||||
next : [
|
|
||||||
{
|
|
||||||
token : "constant.character.escape.lsl",
|
|
||||||
regex : /\\[tn"\\]/
|
|
||||||
},
|
|
||||||
{
|
|
||||||
token : "invalid.illegal.constant.character.escape.lsl",
|
|
||||||
regex : "\\."
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}, {
|
}, {
|
||||||
token : "constant.numeric.lsl",
|
token : "constant.numeric.lsl",
|
||||||
regex : "(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b"
|
regex : "(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b"
|
||||||
|
|
@ -113,13 +103,32 @@ function LSLHighlightRules() {
|
||||||
],
|
],
|
||||||
"comment" : [
|
"comment" : [
|
||||||
{
|
{
|
||||||
token : "comment.block.lsl",
|
token : "comment.block.end.lsl",
|
||||||
regex : ".*?\\*\\/",
|
regex : "\\*\\/",
|
||||||
next : "start"
|
next : "start"
|
||||||
}, {
|
}, {
|
||||||
token : "comment.block.lsl",
|
token : "comment.block.lsl",
|
||||||
regex : ".+"
|
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();
|
this.normalizeRules();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue