trying to fix udf regex for LSL

This commit is contained in:
Builders Brewery 2013-04-15 23:58:59 +02:00 committed by nightwing
commit bbd8721a02

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_][a-zA-Z0-9_]*\\b"
regex : /\b[a-zA-Z_]\w*\b/
}, {
token : "support.function.user-defined.lsl",
regex : /\w+\s+\w+\s*(?=\(.*?\))/
regex : /\b([a-zA-Z0-9_]\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 : /.+/
}
]
};