Skip to content

Commit 08f965e

Browse files
sverweijmarijnh
authored andcommitted
[mscgen mode] Add new keywords for xù and msgenny
options: wordwrapentities attributes (xù only): title, activate, deactivate, activation
1 parent fc60137 commit 08f965e

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

mode/mscgen/mscgen.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
},
3434
xu: {
3535
"keywords" : ["msc", "xu"],
36-
"options" : ["hscale", "width", "arcgradient", "wordwraparcs", "watermark"],
36+
"options" : ["hscale", "width", "arcgradient", "wordwraparcs", "wordwrapentities", "watermark"],
3737
"constants" : ["true", "false", "on", "off", "auto"],
38-
"attributes" : ["label", "idurl", "id", "url", "linecolor", "linecolour", "textcolor", "textcolour", "textbgcolor", "textbgcolour", "arclinecolor", "arclinecolour", "arctextcolor", "arctextcolour", "arctextbgcolor", "arctextbgcolour", "arcskip"],
38+
"attributes" : ["label", "idurl", "id", "url", "linecolor", "linecolour", "textcolor", "textcolour", "textbgcolor", "textbgcolour", "arclinecolor", "arclinecolour", "arctextcolor", "arctextcolour", "arctextbgcolor", "arctextbgcolour", "arcskip", "title", "deactivate", "activate", "activation"],
3939
"brackets" : ["\\{", "\\}"], // [ and ] are brackets too, but these get handled in with lists
4040
"arcsWords" : ["note", "abox", "rbox", "box", "alt", "else", "opt", "break", "par", "seq", "strict", "neg", "critical", "ignore", "consider", "assert", "loop", "ref", "exc"],
4141
"arcsOthers" : ["\\|\\|\\|", "\\.\\.\\.", "---", "--", "<->", "==", "<<=>>", "<=>", "\\.\\.", "<<>>", "::", "<:>", "->", "=>>", "=>", ">>", ":>", "<-", "<<=", "<=", "<<", "<:", "x-", "-x"],
@@ -44,7 +44,7 @@
4444
},
4545
msgenny: {
4646
"keywords" : null,
47-
"options" : ["hscale", "width", "arcgradient", "wordwraparcs", "watermark"],
47+
"options" : ["hscale", "width", "arcgradient", "wordwraparcs", "wordwrapentities", "watermark"],
4848
"constants" : ["true", "false", "on", "off", "auto"],
4949
"attributes" : null,
5050
"brackets" : ["\\{", "\\}"],

mode/mscgen/mscgen_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
);
2626

2727
MT("xù/ msgenny keywords classify as 'base'",
28-
"[base watermark]",
28+
"[base watermark wordwrapentities]",
2929
"[base alt loop opt ref else break par seq assert]"
3030
);
3131

mode/mscgen/msgenny_test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
MT("xù/ msgenny keywords classify as 'keyword'",
2222
"[keyword watermark]",
23+
"[keyword wordwrapentities]",
2324
"[keyword alt]","[keyword loop]","[keyword opt]","[keyword ref]","[keyword else]","[keyword break]","[keyword par]","[keyword seq]","[keyword assert]"
2425
);
2526

mode/mscgen/xu_test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,16 @@
6060
"[attribute id]","[attribute url]","[attribute idurl]",
6161
"[attribute linecolor]","[attribute linecolour]","[attribute textcolor]","[attribute textcolour]","[attribute textbgcolor]","[attribute textbgcolour]",
6262
"[attribute arclinecolor]","[attribute arclinecolour]","[attribute arctextcolor]","[attribute arctextcolour]","[attribute arctextbgcolor]","[attribute arctextbgcolour]",
63-
"[attribute arcskip][bracket ]]]"
63+
"[attribute arcskip]","[attribute title]",
64+
"[attribute activate]","[attribute deactivate]","[attribute activation][bracket ]]]"
6465
);
6566

6667
MT("outside an attribute list, attributes classify as base",
6768
"[base label]",
6869
"[base id]","[base url]","[base idurl]",
6970
"[base linecolor]","[base linecolour]","[base textcolor]","[base textcolour]","[base textbgcolor]","[base textbgcolour]",
7071
"[base arclinecolor]","[base arclinecolour]","[base arctextcolor]","[base arctextcolour]","[base arctextbgcolor]","[base arctextbgcolour]",
71-
"[base arcskip]"
72+
"[base arcskip]", "[base title]"
7273
);
7374

7475
MT("a typical program",
@@ -79,7 +80,7 @@
7980
"[base b][bracket [[][attribute label][operator =][string \"Entity B\"][bracket ]]][base ,]",
8081
"[base c][bracket [[][attribute label][operator =][string \"Entity C\"][bracket ]]][base ;]",
8182
"[base a ][keyword =>>][base b][bracket [[][attribute label][operator =][string \"Hello entity B\"][bracket ]]][base ;]",
82-
"[base a ][keyword <<][base b][bracket [[][attribute label][operator =][string \"Here's an answer dude!\"][bracket ]]][base ;]",
83+
"[base a ][keyword <<][base b][bracket [[][attribute label][operator =][string \"Here's an answer dude!\"][base , ][attribute title][operator =][string \"This is a title for this message\"][bracket ]]][base ;]",
8384
"[base c ][keyword :>][base *][bracket [[][attribute label][operator =][string \"What about me?\"][base , ][attribute textcolor][operator =][base red][bracket ]]][base ;]",
8485
"[bracket }]"
8586
);

0 commit comments

Comments
 (0)