Files
kJS.tmbundle/Syntaxes/JavaScript.plist
T
2005-04-26 08:15:27 +00:00

65 lines
2.3 KiB
Plaintext

{
name = "JavaScript";
scopeName = "source.javascript";
uuid = "93E017CC-6F27-11D9-90EB-000D93589AF6";
fileTypes = ( js, htc );
foldingStartMarker = "^\\s*([A-Za-z0-9.]+\s*=\\s*)?(function)\\>";
foldingStopMarker = "^\\s*\\}";
patterns = (
{ name = "declaration.function.js";
match = "^\\s*(function)\\s*([a-zA-Z_]\\w*)\\s*\\(([^)]*)\\)";
captures = {
1 = { name = "keyword.js"; };
2 = { name = "function-name"; };
3 = { name = "function-argument"; };
};
},
{ name = "keyword.js"; match = "\\<(this|typeof|new|true|false|undefined|null|for|in|break|continue|while|do|return|if|else|case|switch|var)\\>"; },
{ name = "constant.numeric.js"; match = "\\<((0(x|X)[0-9a-fA-F]+)|([0-9]+(\\.[0-9]+)?))\\>"; },
/*{ // This is useless - why match called methods?
/*
Methods:
obj.method(arguments)
* /
name = "keyword.function.js";
match = "(\\<|\\.)([a-zA-Z_]\\w*(?=\\s*\\())";
"foregroundColor[2]" = "#CC3833";
},
{ // This is also useless - why match used instance vars?
/*
Instance Variables:
RegExp.$3
ary.length
* /
name = "keyword.instance-variables.js";
match = "\\.([a-zA-Z_]\\w*|\\$\\d{1,2})(?!\\s*\\()";
"foregroundColor[1]" = "#779938";
},*/
{ name = "string.single-quoted.js"; begin = "'"; end = "'"; swallow = "\\\\."; },
{ name = "string.double-quoted.js"; begin = "\""; end = "\""; swallow = "\\\\."; },
{ name = "comment.block.js"; begin = "/\\*"; end = "\\*/"; swallow = "\\\\."; },
{ name = "comment.line.js"; match = "//.*"; },
{ begin = "(([=(]|^)\\s*)(/)(?![*/])"; end = "(/([igm]+)?)";
beginCaptures = {
1 = { name = "dummy.regexp-start"; };
3 = { name = "string.regexp.js"; };
};
endCaptures = {
1 = { name = "string.regexp.js"; };
};
patterns = (
{ name = "string.regexp.js"; match = "[^/]*"; },
{ name = "string.regexp.js"; match = "\\\\/"; }
);
},
);
}