This commit is contained in:
Builders Brewery 2013-04-16 11:30:34 +02:00 committed by nightwing
commit 745ee98e4a

View file

@ -285,55 +285,55 @@ function LSLHighlightRules() {
"start" : [
{
token : "comment.line.double-slash.lsl",
regex : /\/\/.*$/
regex : "\\/\\/.*$"
}, {
token : "comment.block.lsl",
regex : /\/\*/,
regex : "\\/\\*",
next : "comment"
}, {
token : "string.quoted.double.lsl",
start : '"',
end : '"',
next : [
{ token : "constant.language.escape.lsl", regex : /\[tn"\]/ }
{ token : "constant.language.escape.lsl", regex : "\\[tn\"\\]" }
]
}, {
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"
}, {
token : "entity.name.state.lsl",
regex : /\b((state)\s+\w+|default)\b/
regex : "\\b((state)\\s+\\w+|default)\\b"
}, {
token : keywordMapper,
regex : /\b[a-zA-Z_]\w*\b/
regex : "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"
}, {
token : "support.function.user-defined.lsl",
regex : /\b([a-zA-Z0-9_]\w*)(?=\(.*?\))/
regex : /\b([a-zA-Z_]\w*)(?=\(.*?\))/
}, {
token : "keyword.operator.lsl",
regex : /\+\+|\-\-|<<|>>|&&?|\|\|?|\^|~|[!%<>=*+\-\/]=?/
regex : "\\+\\+|\\-\\-|<<|>>|&&?|\\|\\|?|\\^|~|[!%<>=*+\\-\\/]=?"
}, {
token : "punctuation.operator.lsl",
regex : /\,|\;/
regex : "\\,|\\;"
}, {
token : "paren.lparen.lsl",
regex : /[\[\(\{]/
regex : "[\\[\\(\\{]"
}, {
token : "paren.rparen.lsl",
regex : /[\]\)\}]/
regex : "[\\]\\)\\}]"
}, {
token : "text.lsl",
regex : /\s+/
regex : "\\s+"
}
],
"comment" : [
{
token : "comment.block.lsl",
regex : /.*?\*\//,
regex : ".*?\\*\\/",
next : "start"
}, {
token : "comment.block.lsl",
regex : /.+/
regex : ".+"
}
]
};