mirror of
https://github.com/kennethreitz-archive/kJS.tmbundle.git
synced 2026-06-05 23:50:19 +00:00
-- Changed scopeName to "source.js" instead of "source.javascript". Didn't see the need for such a long name. (Might be missing something)
-- Added some comments and cleaned it slightly. This file now will replace the soon to be deleted JavaScript (PHP) file. git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@751 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
This commit is contained in:
+34
-15
@@ -10,7 +10,7 @@
|
||||
----------------- */
|
||||
|
||||
name = "JavaScript";
|
||||
scopeName = "source.javascript";
|
||||
scopeName = "source.js";
|
||||
uuid = "93E017CC-6F27-11D9-90EB-000D93589AF6";
|
||||
fileTypes = ( js, htc );
|
||||
|
||||
@@ -26,8 +26,11 @@
|
||||
3 = { name = "function-argument"; };
|
||||
};
|
||||
},
|
||||
|
||||
{ name = "constant.numeric.js"; match = "\\<((0(x|X)[0-9a-fA-F]+)|([0-9]+(\\.[0-9]+)?))\\>"; },
|
||||
|
||||
/* CONSTANTS:: Numeric */
|
||||
{ name = "constant.numeric.js";
|
||||
match = "\\<((0(x|X)[0-9a-fA-F]+)|([0-9]+(\\.[0-9]+)?))\\>";
|
||||
},
|
||||
|
||||
/*{ // This is useless - why match called methods?
|
||||
/*
|
||||
@@ -50,22 +53,36 @@
|
||||
"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 = "//.*"; },
|
||||
|
||||
/* STRINGS: Single */
|
||||
{ name = "string.single-quoted.js";
|
||||
begin = "'";
|
||||
end = "'";
|
||||
swallow = "\\\\.";
|
||||
},
|
||||
/* STRINGS: Double */
|
||||
{ name = "string.double-quoted.js";
|
||||
begin = "\"";
|
||||
end = "\"";
|
||||
swallow = "\\\\.";
|
||||
},
|
||||
/* COMMENTS: Block */
|
||||
{ name = "comment.block.js";
|
||||
begin = "/\\*";
|
||||
end = "\\*/";
|
||||
swallow = "\\\\.";
|
||||
},
|
||||
/* COMMENTS: Single Line */
|
||||
{ name = "comment.line.js";
|
||||
match = "//.*";
|
||||
},
|
||||
/* HTML COMMENTS: inside <script></script> embedded in a HTML page */
|
||||
{ name = "comment.html.js";
|
||||
match = "(<!--|-->)";
|
||||
},
|
||||
|
||||
},
|
||||
/* KEYWORDS: */
|
||||
{ name = "keyword.declaration.js";
|
||||
match = "\\<(function)\\>";
|
||||
},
|
||||
|
||||
},
|
||||
/* KEYWORDS: Reserved */
|
||||
{ name = "keyword.reserved.js";
|
||||
match = "\\<(boolean|break|byte|case|catch|char|class|const|continue|debugger|default|delete|do|double|else|enum|export|extends|false|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|null|package|private|protected|public|return|short|static|super|switch|synchronized|this|throw|throws|transient|true|try|typeof|var|void|volatile|while|with)\\>";
|
||||
@@ -107,8 +124,10 @@
|
||||
{ name = "constant.js";
|
||||
match = "\\<(Infinity|NaN|Undefined)\\>";
|
||||
},
|
||||
|
||||
{ begin = "(([=(]|^)\\s*)(/)(?![*/])"; end = "(/([igm]+)?)";
|
||||
|
||||
/* STRINGS REGEX:: */
|
||||
{ begin = "(([=(]|^)\\s*)(/)(?![*/])";
|
||||
end = "(/([igm]+)?)";
|
||||
beginCaptures = {
|
||||
1 = { name = "dummy.regexp-start"; };
|
||||
3 = { name = "string.regexp.js"; };
|
||||
|
||||
Reference in New Issue
Block a user