openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

mscgen.min.js (3958B)


      1 (function(t){if(typeof exports=='object'&&typeof module=='object')t(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],t);else t(CodeMirror)})(function(t){'use strict';var n={mscgen:{'keywords':['msc'],'options':['hscale','width','arcgradient','wordwraparcs'],'constants':['true','false','on','off'],'attributes':['label','idurl','id','url','linecolor','linecolour','textcolor','textcolour','textbgcolor','textbgcolour','arclinecolor','arclinecolour','arctextcolor','arctextcolour','arctextbgcolor','arctextbgcolour','arcskip'],'brackets':['\\{','\\}'],'arcsWords':['note','abox','rbox','box'],'arcsOthers':['\\|\\|\\|','\\.\\.\\.','---','--','<->','==','<<=>>','<=>','\\.\\.','<<>>','::','<:>','->','=>>','=>','>>',':>','<-','<<=','<=','<<','<:','x-','-x'],'singlecomment':['//','#'],'operators':['=']},xu:{'keywords':['msc','xu'],'options':['hscale','width','arcgradient','wordwraparcs','watermark'],'constants':['true','false','on','off','auto'],'attributes':['label','idurl','id','url','linecolor','linecolour','textcolor','textcolour','textbgcolor','textbgcolour','arclinecolor','arclinecolour','arctextcolor','arctextcolour','arctextbgcolor','arctextbgcolour','arcskip'],'brackets':['\\{','\\}'],'arcsWords':['note','abox','rbox','box','alt','else','opt','break','par','seq','strict','neg','critical','ignore','consider','assert','loop','ref','exc'],'arcsOthers':['\\|\\|\\|','\\.\\.\\.','---','--','<->','==','<<=>>','<=>','\\.\\.','<<>>','::','<:>','->','=>>','=>','>>',':>','<-','<<=','<=','<<','<:','x-','-x'],'singlecomment':['//','#'],'operators':['=']},msgenny:{'keywords':null,'options':['hscale','width','arcgradient','wordwraparcs','watermark'],'constants':['true','false','on','off','auto'],'attributes':null,'brackets':['\\{','\\}'],'arcsWords':['note','abox','rbox','box','alt','else','opt','break','par','seq','strict','neg','critical','ignore','consider','assert','loop','ref','exc'],'arcsOthers':['\\|\\|\\|','\\.\\.\\.','---','--','<->','==','<<=>>','<=>','\\.\\.','<<>>','::','<:>','->','=>>','=>','>>',':>','<-','<<=','<=','<<','<:','x-','-x'],'singlecomment':['//','#'],'operators':['=']}};t.defineMode('mscgen',function(t,r){var e=n[r&&r.language||'mscgen'];return{startState:o,copyState:i,token:c(e),lineComment:'#',blockCommentStart:'/*',blockCommentEnd:'*/'}});t.defineMIME('text/x-mscgen','mscgen');t.defineMIME('text/x-xu',{name:'mscgen',language:'xu'});t.defineMIME('text/x-msgenny',{name:'mscgen',language:'msgenny'});function e(t){return new RegExp('\\b('+t.join('|')+')\\b','i')};function r(t){return new RegExp('('+t.join('|')+')','i')};function o(){return{inComment:!1,inString:!1,inAttributeList:!1,inScript:!1}};function i(t){return{inComment:t.inComment,inString:t.inString,inAttributeList:t.inAttributeList,inScript:t.inScript}};function c(t){return function(n,o){if(n.match(r(t.brackets),!0,!0)){return'bracket'};if(!o.inComment){if(n.match(/\/\*[^\*\/]*/,!0,!0)){o.inComment=!0;return'comment'};if(n.match(r(t.singlecomment),!0,!0)){n.skipToEnd();return'comment'}};if(o.inComment){if(n.match(/[^\*\/]*\*\//,!0,!0))o.inComment=!1;else n.skipToEnd();return'comment'};if(!o.inString&&n.match(/"(\\"|[^"])*/,!0,!0)){o.inString=!0;return'string'};if(o.inString){if(n.match(/[^"]*"/,!0,!0))o.inString=!1;else n.skipToEnd();return'string'};if(!!t.keywords&&n.match(e(t.keywords),!0,!0))return'keyword';if(n.match(e(t.options),!0,!0))return'keyword';if(n.match(e(t.arcsWords),!0,!0))return'keyword';if(n.match(r(t.arcsOthers),!0,!0))return'keyword';if(!!t.operators&&n.match(r(t.operators),!0,!0))return'operator';if(!!t.constants&&n.match(r(t.constants),!0,!0))return'variable';if(!t.inAttributeList&&!!t.attributes&&n.match(/\[/,!0,!0)){t.inAttributeList=!0;return'bracket'};if(t.inAttributeList){if(t.attributes!==null&&n.match(e(t.attributes),!0,!0)){return'attribute'};if(n.match(/]/,!0,!0)){t.inAttributeList=!1;return'bracket'}};n.next();return'base'}}});