if (typeof exports == "object" && typeof module == "object")
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd)
define(["../../lib/codemirror"], mod);
})(function(CodeMirror) {
CodeMirror.defineMode("d", function(config, parserConfig) {
var indentUnit = config.indentUnit,
statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,
keywords = parserConfig.keywords || {},
builtin = parserConfig.builtin || {},
blockKeywords = parserConfig.blockKeywords || {},
atoms = parserConfig.atoms || {},
hooks = parserConfig.hooks || {},
multiLineStrings = parserConfig.multiLineStrings;
var isOperatorChar = /[+\-*&%=<>!?|\/]/;
function tokenBase(stream, state) {
var result = hooks[ch](stream, state);
if (result !== false) return result;
if (ch == '"' || ch == "'" || ch == "`") {
state.tokenize = tokenString(ch);
return state.tokenize(stream, state);
if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
stream.eatWhile(/[\w\.]/);
state.tokenize = tokenComment;
return tokenNestedComment(stream, state);
state.tokenize = tokenComment;
return tokenComment(stream, state);
if (isOperatorChar.test(ch)) {
stream.eatWhile(isOperatorChar);
stream.eatWhile(/[\w\$_\xa1-\uffff]/);