浏览代码

MPIDE-29: highlighter more lenient with whitespace

Austin Meagher 10 年之前
父节点
当前提交
ca5fbe7442
共有 1 个文件被更改,包括 13 次插入6 次删除
  1. 13 6
      src/web/assets/scripts/modellang.js

+ 13 - 6
src/web/assets/scripts/modellang.js

@@ -27,51 +27,58 @@ function(require, exports, module) {
 					token: [
 						"keyword",
 						"text",
+						"text",
 						"variable.other",
 						"text",
 						"punctuation.operator",
 						],
-					regex: /(\bSYSTEM\b:)(\s*)(\w+)(\s*)(=)/,
+					regex: /(\bSYSTEM\b)(\s*:)(\s*)(\w+)(\s*)(=)/,
 					push: "behaviorPattern",
 				},
 				{
 					token: [
 						"keyword",
 						"text",
+						"text",
 						"support.constant",
 						"text",
 						"punctuation.operator",
 						],
-					regex: /(\bBEHAVIOR\b:)(\s*)(\w+)(\s*)(=)/,
+					regex: /(\bBEHAVIOR\b)(\s*:)(\s*)(\w+)(\s*)(=)/,
 					push: "behaviorPattern",
 				},
 				{
-					token: "keyword.control",
-					regex: /(\bINTERACTION\b:)/,
+					token: [
+						"keyword.control",
+						"text",
+					],
+					regex: /(\bINTERACTION\b)(\s*:)/,
 					push: "behaviorPattern",
 				},
 				{
 					token: [
 						"keyword.control",
 						"text",
+						"text",
 						"variable",
 						"support.constant",
 						"support.constant",
 						"text",
 						"text",
 						],
-					regex: /(\bWHEN\b:)(\s*)(\w+)(:)(\w+)(\s+)({)/,
+					regex: /(\bWHEN\b)(\s*:)(\s*)(\w+)(:)(\w+)(\s+)({)/,
 					next: "javascript-start",
 				},
 				{
 					token: [
 						"keyword.control",
 						"text",
+						"text",
 						"variable",
 						"text",
 						"text",
 						],
-					regex: /(\bINIT\b:)(\s*)(\w+)(\s*)({)/,
+					regex: /(\bINIT\b)(\s*:)(\s*)(\w+)(\s*)({)/,
 					next: "javascript-start",
 				},
 				{