trying to fix udf regex for LSL
This commit is contained in:
parent
e0e6c38d17
commit
bbd8721a02
1 changed files with 14 additions and 14 deletions
|
|
@ -285,55 +285,55 @@ function LSLHighlightRules() {
|
||||||
"start" : [
|
"start" : [
|
||||||
{
|
{
|
||||||
token : "comment.line.double-slash.lsl",
|
token : "comment.line.double-slash.lsl",
|
||||||
regex : "\\/\\/.*$"
|
regex : /\/\/.*$/
|
||||||
}, {
|
}, {
|
||||||
token : "comment.block.lsl",
|
token : "comment.block.lsl",
|
||||||
regex : "\\/\\*",
|
regex : /\/\*/,
|
||||||
next : "comment"
|
next : "comment"
|
||||||
}, {
|
}, {
|
||||||
token : "string.quoted.double.lsl",
|
token : "string.quoted.double.lsl",
|
||||||
start : '"',
|
start : '"',
|
||||||
end : '"',
|
end : '"',
|
||||||
next : [
|
next : [
|
||||||
{ token : "constant.language.escape.lsl", regex : "\\[tn\"\\]" }
|
{ token : "constant.language.escape.lsl", regex : /\[tn"\]/ }
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
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/
|
||||||
}, {
|
}, {
|
||||||
token : "entity.name.state.lsl",
|
token : "entity.name.state.lsl",
|
||||||
regex : "\\b((state)\\s+\\w+|default)\\b"
|
regex : /\b((state)\s+\w+|default)\b/
|
||||||
}, {
|
}, {
|
||||||
token : keywordMapper,
|
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",
|
token : "support.function.user-defined.lsl",
|
||||||
regex : /\w+\s+\w+\s*(?=\(.*?\))/
|
regex : /\b([a-zA-Z0-9_]\w*)(?=\(.*?\))/
|
||||||
}, {
|
}, {
|
||||||
token : "keyword.operator.lsl",
|
token : "keyword.operator.lsl",
|
||||||
regex : "\\+\\+|\\-\\-|<<|>>|&&?|\\|\\|?|\\^|~|[!%<>=*+\\-\\/]=?"
|
regex : /\+\+|\-\-|<<|>>|&&?|\|\|?|\^|~|[!%<>=*+\-\/]=?/
|
||||||
}, {
|
}, {
|
||||||
token : "punctuation.operator.lsl",
|
token : "punctuation.operator.lsl",
|
||||||
regex : "\\,|\\;"
|
regex : /\,|\;/
|
||||||
}, {
|
}, {
|
||||||
token : "paren.lparen.lsl",
|
token : "paren.lparen.lsl",
|
||||||
regex : "[\\[\\(\\{]"
|
regex : /[\[\(\{]/
|
||||||
}, {
|
}, {
|
||||||
token : "paren.rparen.lsl",
|
token : "paren.rparen.lsl",
|
||||||
regex : "[\\]\\)\\}]"
|
regex : /[\]\)\}]/
|
||||||
}, {
|
}, {
|
||||||
token : "text.lsl",
|
token : "text.lsl",
|
||||||
regex : "\\s+"
|
regex : /\s+/
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"comment" : [
|
"comment" : [
|
||||||
{
|
{
|
||||||
token : "comment.block.lsl",
|
token : "comment.block.lsl",
|
||||||
regex : ".*?\\*\\/",
|
regex : /.*?\*\//,
|
||||||
next : "start"
|
next : "start"
|
||||||
}, {
|
}, {
|
||||||
token : "comment.block.lsl",
|
token : "comment.block.lsl",
|
||||||
regex : ".+"
|
regex : /.+/
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue