mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-28 13:39:44 +07:00
* Remove docs folder. This was a redirect from a GitHub pages site that does not appear to be in use. * Rename api folder to api-samples. * Move examples to functional-samples folder. * Move cookbook sample to functional-samples. * Move tutorials to functional-samples folder. * Move mv2 and apps folders to _archive. * Rename tools folder to .repo. * Move reference folder to functional-samples. * Update README. Update README with new relative links for reorg. * Update README.md Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com> --------- Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>
27 lines
867 B
JavaScript
27 lines
867 B
JavaScript
CodeMirror.defineMode("vbscript", function() {
|
|
var regexVBScriptKeyword = /^(?:Call|Case|CDate|Clear|CInt|CLng|Const|CStr|Description|Dim|Do|Each|Else|ElseIf|End|Err|Error|Exit|False|For|Function|If|LCase|Loop|LTrim|Next|Nothing|Now|Number|On|Preserve|Quit|ReDim|Resume|RTrim|Select|Set|Sub|Then|To|Trim|True|UBound|UCase|Until|VbCr|VbCrLf|VbLf|VbTab)$/im;
|
|
|
|
return {
|
|
token: function(stream) {
|
|
if (stream.eatSpace()) return null;
|
|
var ch = stream.next();
|
|
if (ch == "'") {
|
|
stream.skipToEnd();
|
|
return "comment";
|
|
}
|
|
if (ch == '"') {
|
|
stream.skipTo('"');
|
|
return "string";
|
|
}
|
|
|
|
if (/\w/.test(ch)) {
|
|
stream.eatWhile(/\w/);
|
|
if (regexVBScriptKeyword.test(stream.current())) return "keyword";
|
|
}
|
|
return null;
|
|
}
|
|
};
|
|
});
|
|
|
|
CodeMirror.defineMIME("text/vbscript", "vbscript");
|