From 9f79ed929e4156dc8b5b45161895d70d51cfa5a2 Mon Sep 17 00:00:00 2001
From: Wu Cheng-Han
Date: Mon, 28 Nov 2016 01:36:48 +0800
Subject: Update to move custom CodeMirror codebase to our own repo and update
webpack build config
---
public/vendor/codemirror/mode/mscgen/index.html | 151 ------------------
public/vendor/codemirror/mode/mscgen/mscgen.js | 169 ---------------------
.../vendor/codemirror/mode/mscgen/mscgen_test.js | 75 ---------
.../vendor/codemirror/mode/mscgen/msgenny_test.js | 71 ---------
public/vendor/codemirror/mode/mscgen/xu_test.js | 75 ---------
5 files changed, 541 deletions(-)
delete mode 100644 public/vendor/codemirror/mode/mscgen/index.html
delete mode 100644 public/vendor/codemirror/mode/mscgen/mscgen.js
delete mode 100644 public/vendor/codemirror/mode/mscgen/mscgen_test.js
delete mode 100644 public/vendor/codemirror/mode/mscgen/msgenny_test.js
delete mode 100644 public/vendor/codemirror/mode/mscgen/xu_test.js
(limited to 'public/vendor/codemirror/mode/mscgen')
diff --git a/public/vendor/codemirror/mode/mscgen/index.html b/public/vendor/codemirror/mode/mscgen/index.html
deleted file mode 100644
index 8c28ee62..00000000
--- a/public/vendor/codemirror/mode/mscgen/index.html
+++ /dev/null
@@ -1,151 +0,0 @@
-
-
-
-MscGen mode
-
-
-
-Xù mode
-
-
-
-MsGenny mode
-
-
-
- Simple mode for highlighting MscGen and two derived sequence
- chart languages.
-
-
-
-
- MIME types defined:
- text/x-mscgen
- text/x-xu
- text/x-msgenny
-
-
-
diff --git a/public/vendor/codemirror/mode/mscgen/mscgen.js b/public/vendor/codemirror/mode/mscgen/mscgen.js
deleted file mode 100644
index d61b4706..00000000
--- a/public/vendor/codemirror/mode/mscgen/mscgen.js
+++ /dev/null
@@ -1,169 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// mode(s) for the sequence chart dsl's mscgen, xù and msgenny
-// For more information on mscgen, see the site of the original author:
-// http://www.mcternan.me.uk/mscgen
-//
-// This mode for mscgen and the two derivative languages were
-// originally made for use in the mscgen_js interpreter
-// (https://sverweij.github.io/mscgen_js)
-
-(function(mod) {
- if ( typeof exports == "object" && typeof module == "object")// CommonJS
- mod(require("../../lib/codemirror"));
- else if ( typeof define == "function" && define.amd)// AMD
- define(["../../lib/codemirror"], mod);
- else// Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- var languages = {
- mscgen: {
- "keywords" : ["msc"],
- "options" : ["hscale", "width", "arcgradient", "wordwraparcs"],
- "attributes" : ["label", "idurl", "id", "url", "linecolor", "linecolour", "textcolor", "textcolour", "textbgcolor", "textbgcolour", "arclinecolor", "arclinecolour", "arctextcolor", "arctextcolour", "arctextbgcolor", "arctextbgcolour", "arcskip"],
- "brackets" : ["\\{", "\\}"], // [ and ] are brackets too, but these get handled in with lists
- "arcsWords" : ["note", "abox", "rbox", "box"],
- "arcsOthers" : ["\\|\\|\\|", "\\.\\.\\.", "---", "--", "<->", "==", "<<=>>", "<=>", "\\.\\.", "<<>>", "::", "<:>", "->", "=>>", "=>", ">>", ":>", "<-", "<<=", "<=", "<<", "<:", "x-", "-x"],
- "singlecomment" : ["//", "#"],
- "operators" : ["="]
- },
- xu: {
- "keywords" : ["msc"],
- "options" : ["hscale", "width", "arcgradient", "wordwraparcs", "watermark"],
- "attributes" : ["label", "idurl", "id", "url", "linecolor", "linecolour", "textcolor", "textcolour", "textbgcolor", "textbgcolour", "arclinecolor", "arclinecolour", "arctextcolor", "arctextcolour", "arctextbgcolor", "arctextbgcolour", "arcskip"],
- "brackets" : ["\\{", "\\}"], // [ and ] are brackets too, but these get handled in with lists
- "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"],
- "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" : ["="]
- }
- }
-
- CodeMirror.defineMode("mscgen", function(_, modeConfig) {
- var language = languages[modeConfig && modeConfig.language || "mscgen"]
- return {
- startState: startStateFn,
- copyState: copyStateFn,
- token: produceTokenFunction(language),
- lineComment : "#",
- blockCommentStart : "/*",
- blockCommentEnd : "*/"
- };
- });
-
- CodeMirror.defineMIME("text/x-mscgen", "mscgen");
- CodeMirror.defineMIME("text/x-xu", {name: "mscgen", language: "xu"});
- CodeMirror.defineMIME("text/x-msgenny", {name: "mscgen", language: "msgenny"});
-
- function wordRegexpBoundary(pWords) {
- return new RegExp("\\b(" + pWords.join("|") + ")\\b", "i");
- }
-
- function wordRegexp(pWords) {
- return new RegExp("(" + pWords.join("|") + ")", "i");
- }
-
- function startStateFn() {
- return {
- inComment : false,
- inString : false,
- inAttributeList : false,
- inScript : false
- };
- }
-
- function copyStateFn(pState) {
- return {
- inComment : pState.inComment,
- inString : pState.inString,
- inAttributeList : pState.inAttributeList,
- inScript : pState.inScript
- };
- }
-
- function produceTokenFunction(pConfig) {
-
- return function(pStream, pState) {
- if (pStream.match(wordRegexp(pConfig.brackets), true, true)) {
- return "bracket";
- }
- /* comments */
- if (!pState.inComment) {
- if (pStream.match(/\/\*[^\*\/]*/, true, true)) {
- pState.inComment = true;
- return "comment";
- }
- if (pStream.match(wordRegexp(pConfig.singlecomment), true, true)) {
- pStream.skipToEnd();
- return "comment";
- }
- }
- if (pState.inComment) {
- if (pStream.match(/[^\*\/]*\*\//, true, true))
- pState.inComment = false;
- else
- pStream.skipToEnd();
- return "comment";
- }
- /* strings */
- if (!pState.inString && pStream.match(/\"(\\\"|[^\"])*/, true, true)) {
- pState.inString = true;
- return "string";
- }
- if (pState.inString) {
- if (pStream.match(/[^\"]*\"/, true, true))
- pState.inString = false;
- else
- pStream.skipToEnd();
- return "string";
- }
- /* keywords & operators */
- if (!!pConfig.keywords && pStream.match(wordRegexpBoundary(pConfig.keywords), true, true))
- return "keyword";
-
- if (pStream.match(wordRegexpBoundary(pConfig.options), true, true))
- return "keyword";
-
- if (pStream.match(wordRegexpBoundary(pConfig.arcsWords), true, true))
- return "keyword";
-
- if (pStream.match(wordRegexp(pConfig.arcsOthers), true, true))
- return "keyword";
-
- if (!!pConfig.operators && pStream.match(wordRegexp(pConfig.operators), true, true))
- return "operator";
-
- /* attribute lists */
- if (!pConfig.inAttributeList && !!pConfig.attributes && pStream.match(/\[/, true, true)) {
- pConfig.inAttributeList = true;
- return "bracket";
- }
- if (pConfig.inAttributeList) {
- if (pConfig.attributes !== null && pStream.match(wordRegexpBoundary(pConfig.attributes), true, true)) {
- return "attribute";
- }
- if (pStream.match(/]/, true, true)) {
- pConfig.inAttributeList = false;
- return "bracket";
- }
- }
-
- pStream.next();
- return "base";
- };
- }
-
-});
diff --git a/public/vendor/codemirror/mode/mscgen/mscgen_test.js b/public/vendor/codemirror/mode/mscgen/mscgen_test.js
deleted file mode 100644
index e319a399..00000000
--- a/public/vendor/codemirror/mode/mscgen/mscgen_test.js
+++ /dev/null
@@ -1,75 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
- var mode = CodeMirror.getMode({indentUnit: 2}, "mscgen");
- function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
-
- MT("empty chart",
- "[keyword msc][bracket {]",
- "[base ]",
- "[bracket }]"
- );
-
- MT("comments",
- "[comment // a single line comment]",
- "[comment # another single line comment /* and */ ignored here]",
- "[comment /* A multi-line comment even though it contains]",
- "[comment msc keywords and \"quoted text\"*/]");
-
- MT("strings",
- "[string \"// a string\"]",
- "[string \"a string running over]",
- "[string two lines\"]",
- "[string \"with \\\"escaped quote\"]"
- );
-
- MT("xù/ msgenny keywords classify as 'base'",
- "[base watermark]",
- "[base alt loop opt ref else break par seq assert]"
- );
-
- MT("mscgen options classify as keyword",
- "[keyword hscale]", "[keyword width]", "[keyword arcgradient]", "[keyword wordwraparcs]"
- );
-
- MT("mscgen arcs classify as keyword",
- "[keyword note]","[keyword abox]","[keyword rbox]","[keyword box]",
- "[keyword |||...---]", "[keyword ..--==::]",
- "[keyword ->]", "[keyword <-]", "[keyword <->]",
- "[keyword =>]", "[keyword <=]", "[keyword <=>]",
- "[keyword =>>]", "[keyword <<=]", "[keyword <<=>>]",
- "[keyword >>]", "[keyword <<]", "[keyword <<>>]",
- "[keyword -x]", "[keyword x-]", "[keyword -X]", "[keyword X-]",
- "[keyword :>]", "[keyword <:]", "[keyword <:>]"
- );
-
- MT("within an attribute list, attributes classify as attribute",
- "[bracket [[][attribute label]",
- "[attribute id]","[attribute url]","[attribute idurl]",
- "[attribute linecolor]","[attribute linecolour]","[attribute textcolor]","[attribute textcolour]","[attribute textbgcolor]","[attribute textbgcolour]",
- "[attribute arclinecolor]","[attribute arclinecolour]","[attribute arctextcolor]","[attribute arctextcolour]","[attribute arctextbgcolor]","[attribute arctextbgcolour]",
- "[attribute arcskip][bracket ]]]"
- );
-
- MT("outside an attribute list, attributes classify as base",
- "[base label]",
- "[base id]","[base url]","[base idurl]",
- "[base linecolor]","[base linecolour]","[base textcolor]","[base textcolour]","[base textbgcolor]","[base textbgcolour]",
- "[base arclinecolor]","[base arclinecolour]","[base arctextcolor]","[base arctextcolour]","[base arctextbgcolor]","[base arctextbgcolour]",
- "[base arcskip]"
- );
-
- MT("a typical program",
- "[comment # typical mscgen program]",
- "[keyword msc][base ][bracket {]",
- "[keyword wordwraparcs][operator =][string \"true\"][base , ][keyword hscale][operator =][string \"0.8\"][keyword arcgradient][operator =][base 30;]",
- "[base a][bracket [[][attribute label][operator =][string \"Entity A\"][bracket ]]][base ,]",
- "[base b][bracket [[][attribute label][operator =][string \"Entity B\"][bracket ]]][base ,]",
- "[base c][bracket [[][attribute label][operator =][string \"Entity C\"][bracket ]]][base ;]",
- "[base a ][keyword =>>][base b][bracket [[][attribute label][operator =][string \"Hello entity B\"][bracket ]]][base ;]",
- "[base a ][keyword <<][base b][bracket [[][attribute label][operator =][string \"Here's an answer dude!\"][bracket ]]][base ;]",
- "[base c ][keyword :>][base *][bracket [[][attribute label][operator =][string \"What about me?\"][base , ][attribute textcolor][operator =][base red][bracket ]]][base ;]",
- "[bracket }]"
- );
-})();
diff --git a/public/vendor/codemirror/mode/mscgen/msgenny_test.js b/public/vendor/codemirror/mode/mscgen/msgenny_test.js
deleted file mode 100644
index 80173de0..00000000
--- a/public/vendor/codemirror/mode/mscgen/msgenny_test.js
+++ /dev/null
@@ -1,71 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
- var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-msgenny");
- function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "msgenny"); }
-
- MT("comments",
- "[comment // a single line comment]",
- "[comment # another single line comment /* and */ ignored here]",
- "[comment /* A multi-line comment even though it contains]",
- "[comment msc keywords and \"quoted text\"*/]");
-
- MT("strings",
- "[string \"// a string\"]",
- "[string \"a string running over]",
- "[string two lines\"]",
- "[string \"with \\\"escaped quote\"]"
- );
-
- MT("xù/ msgenny keywords classify as 'keyword'",
- "[keyword watermark]",
- "[keyword alt]","[keyword loop]","[keyword opt]","[keyword ref]","[keyword else]","[keyword break]","[keyword par]","[keyword seq]","[keyword assert]"
- );
-
- MT("mscgen options classify as keyword",
- "[keyword hscale]", "[keyword width]", "[keyword arcgradient]", "[keyword wordwraparcs]"
- );
-
- MT("mscgen arcs classify as keyword",
- "[keyword note]","[keyword abox]","[keyword rbox]","[keyword box]",
- "[keyword |||...---]", "[keyword ..--==::]",
- "[keyword ->]", "[keyword <-]", "[keyword <->]",
- "[keyword =>]", "[keyword <=]", "[keyword <=>]",
- "[keyword =>>]", "[keyword <<=]", "[keyword <<=>>]",
- "[keyword >>]", "[keyword <<]", "[keyword <<>>]",
- "[keyword -x]", "[keyword x-]", "[keyword -X]", "[keyword X-]",
- "[keyword :>]", "[keyword <:]", "[keyword <:>]"
- );
-
- MT("within an attribute list, mscgen/ xù attributes classify as base",
- "[base [[label]",
- "[base idurl id url]",
- "[base linecolor linecolour textcolor textcolour textbgcolor textbgcolour]",
- "[base arclinecolor arclinecolour arctextcolor arctextcolour arctextbgcolor arctextbgcolour]",
- "[base arcskip]]]"
- );
-
- MT("outside an attribute list, mscgen/ xù attributes classify as base",
- "[base label]",
- "[base idurl id url]",
- "[base linecolor linecolour textcolor textcolour textbgcolor textbgcolour]",
- "[base arclinecolor arclinecolour arctextcolor arctextcolour arctextbgcolor arctextbgcolour]",
- "[base arcskip]"
- );
-
- MT("a typical program",
- "[comment # typical msgenny program]",
- "[keyword wordwraparcs][operator =][string \"true\"][base , ][keyword hscale][operator =][string \"0.8\"][base , ][keyword arcgradient][operator =][base 30;]",
- "[base a : ][string \"Entity A\"][base ,]",
- "[base b : Entity B,]",
- "[base c : Entity C;]",
- "[base a ][keyword =>>][base b: ][string \"Hello entity B\"][base ;]",
- "[base a ][keyword alt][base c][bracket {]",
- "[base a ][keyword <<][base b: ][string \"Here's an answer dude!\"][base ;]",
- "[keyword ---][base : ][string \"sorry, won't march - comm glitch\"]",
- "[base a ][keyword x-][base b: ][string \"Here's an answer dude! (won't arrive...)\"][base ;]",
- "[bracket }]",
- "[base c ][keyword :>][base *: What about me?;]"
- );
-})();
diff --git a/public/vendor/codemirror/mode/mscgen/xu_test.js b/public/vendor/codemirror/mode/mscgen/xu_test.js
deleted file mode 100644
index f9a50f0a..00000000
--- a/public/vendor/codemirror/mode/mscgen/xu_test.js
+++ /dev/null
@@ -1,75 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
- var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-xu");
- function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "xu"); }
-
- MT("empty chart",
- "[keyword msc][bracket {]",
- "[base ]",
- "[bracket }]"
- );
-
- MT("comments",
- "[comment // a single line comment]",
- "[comment # another single line comment /* and */ ignored here]",
- "[comment /* A multi-line comment even though it contains]",
- "[comment msc keywords and \"quoted text\"*/]");
-
- MT("strings",
- "[string \"// a string\"]",
- "[string \"a string running over]",
- "[string two lines\"]",
- "[string \"with \\\"escaped quote\"]"
- );
-
- MT("xù/ msgenny keywords classify as 'keyword'",
- "[keyword watermark]",
- "[keyword alt]","[keyword loop]","[keyword opt]","[keyword ref]","[keyword else]","[keyword break]","[keyword par]","[keyword seq]","[keyword assert]"
- );
-
- MT("mscgen options classify as keyword",
- "[keyword hscale]", "[keyword width]", "[keyword arcgradient]", "[keyword wordwraparcs]"
- );
-
- MT("mscgen arcs classify as keyword",
- "[keyword note]","[keyword abox]","[keyword rbox]","[keyword box]",
- "[keyword |||...---]", "[keyword ..--==::]",
- "[keyword ->]", "[keyword <-]", "[keyword <->]",
- "[keyword =>]", "[keyword <=]", "[keyword <=>]",
- "[keyword =>>]", "[keyword <<=]", "[keyword <<=>>]",
- "[keyword >>]", "[keyword <<]", "[keyword <<>>]",
- "[keyword -x]", "[keyword x-]", "[keyword -X]", "[keyword X-]",
- "[keyword :>]", "[keyword <:]", "[keyword <:>]"
- );
-
- MT("within an attribute list, attributes classify as attribute",
- "[bracket [[][attribute label]",
- "[attribute id]","[attribute url]","[attribute idurl]",
- "[attribute linecolor]","[attribute linecolour]","[attribute textcolor]","[attribute textcolour]","[attribute textbgcolor]","[attribute textbgcolour]",
- "[attribute arclinecolor]","[attribute arclinecolour]","[attribute arctextcolor]","[attribute arctextcolour]","[attribute arctextbgcolor]","[attribute arctextbgcolour]",
- "[attribute arcskip][bracket ]]]"
- );
-
- MT("outside an attribute list, attributes classify as base",
- "[base label]",
- "[base id]","[base url]","[base idurl]",
- "[base linecolor]","[base linecolour]","[base textcolor]","[base textcolour]","[base textbgcolor]","[base textbgcolour]",
- "[base arclinecolor]","[base arclinecolour]","[base arctextcolor]","[base arctextcolour]","[base arctextbgcolor]","[base arctextbgcolour]",
- "[base arcskip]"
- );
-
- MT("a typical program",
- "[comment # typical mscgen program]",
- "[keyword msc][base ][bracket {]",
- "[keyword wordwraparcs][operator =][string \"true\"][keyword hscale][operator =][string \"0.8\"][keyword arcgradient][operator =][base 30;]",
- "[base a][bracket [[][attribute label][operator =][string \"Entity A\"][bracket ]]][base ,]",
- "[base b][bracket [[][attribute label][operator =][string \"Entity B\"][bracket ]]][base ,]",
- "[base c][bracket [[][attribute label][operator =][string \"Entity C\"][bracket ]]][base ;]",
- "[base a ][keyword =>>][base b][bracket [[][attribute label][operator =][string \"Hello entity B\"][bracket ]]][base ;]",
- "[base a ][keyword <<][base b][bracket [[][attribute label][operator =][string \"Here's an answer dude!\"][bracket ]]][base ;]",
- "[base c ][keyword :>][base *][bracket [[][attribute label][operator =][string \"What about me?\"][base , ][attribute textcolor][operator =][base red][bracket ]]][base ;]",
- "[bracket }]"
- );
-})();
--
cgit v1.2.3