Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mod: syntax highlighting: Improve syntax highlighting (deployment + keywords) #425

Merged
merged 6 commits into from
Oct 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions syntaxes/plantuml.yaml-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ repository:
patterns:
- comment: line begin keywords
name: keyword.other.linebegin.source.wsd
match: (?i)^\s*(usecase|actor|object|participant|boundary|control|entity|database|create|component|interface|package|node|folder|frame|cloud|annotation|enum|abstract|class|abstract\s+class|state|autonumber(\s+stop|resume)?|activate|deactivate|return|destroy|newpage|alt|else|opt|loop|par|break|critical|group|box|rectangle|namespace|partition)\b
match: (?i)^\s*(usecase|actor|object|participant|boundary|control|entity|database|create|component|interface|package|node|folder|frame|cloud|annotation|enum|abstract\s+class|abstract|class|state|autonumber(\s+stop|resume)?|activate|deactivate|return|destroy|newpage|alt|else|opt|loop|par|break|critical|group|box|rectangle|namespace|partition|agent|artifact|card|circle|collections|file|hexagon|label|person|queue|stack|storage|mainframe|map|repeat|backward|diamond)\b
- comment: whole line keywords
name: keyword.other.wholeline.source.wsd
match: (?i)^\s*(split( again)?|endif|repeat|start|stop|end|end\s+fork|end\s+split|fork( again)?|detach|end\s+box|top\s+to\s+bottom\s+direction|left\s+to\s+right\s+direction)\s*$
match: (?i)^\s*(split( again)?|endif|repeat|start|stop|end|end\s+fork|end\s+split|fork( again)?|detach|end\s+box|top\s+to\s+bottom\s+direction|left\s+to\s+right\s+direction|kill|end\s+merge)\s*$
- comment: other keywords
name: keyword.other.other.source.wsd
match: (?i)\b(as|{(static|abstract)\})\b
Expand Down Expand Up @@ -200,7 +200,7 @@ repository:
'3': {name: meta.comment.header_legend_footer.source.wsd}
- comment: Preprocessings
name: support.class.preprocessings.source.wsd
match: (?i)(!includesub|!include|!enddefinelong|!definelong|!define|!startsub|!endsub|!ifdef|!else|!endif|!ifndef)
match: (?i)(!includesub|!include|!enddefinelong|!definelong|!define|!startsub|!endsub|!ifdef|!else|!endif|!ifndef|!if|!elseif|!endif|!while|!endwhile|!(unquoted\s|final\s)*procedure|!(unquoted\s|final\s)*function|!end\s*(function|procedure)|!return|!import|!includedef|!includeurl|!include_many|!include_once|!log|!dump_memory|!theme)
- comment: links
begin: (?i)((?:(?:(?:\s+[ox]|[+*])?(?:<<|<\|?|\\\\|\\|//|\}|\^|#|0|0\))?)(?=[-.~=]))[-.~=]+(\[(?:\#(?:[0-9a-f]{6}|[0-9a-f]{3}|\w+)(?:[-\\/](?:[0-9a-f]{6}|[0-9a-f]{3}|\w+))?\b)\])?(?:(left|right|up|down)(?:[-.~=]))?[-.]*(?:(?:>>|\|?>|\\\\|\\|//|\{|\^|#|0|\(0)?(?:[ox]\s+|[+*])?))
beginCaptures:
Expand Down Expand Up @@ -310,7 +310,7 @@ repository:
Class:
patterns:
- comment: class group & enum
begin: (?i)^\s*(enum|abstract|class|abstract\s+class)\s+([\w\d_\.]+|"[^"]+")(\s*(<<.+?>>))?(\s+(as)\s+([\w\d_\.]+|"[^"]+")(\s*(<<.+?>>))?)?(\s+#(([\w\|\\\/\-]+)))?\s*\{\s*$
begin: (?i)^\s*(enum|abstract\s+class|abstract|class)\s+([\w\d_\.]+|"[^"]+")(\s*(<<.+?>>))?(\s+(as)\s+([\w\d_\.]+|"[^"]+")(\s*(<<.+?>>))?)?(\s+#(([\w\|\\\/\-]+)))?\s*\{\s*$
beginCaptures:
'1': {name: keyword.other.class.group.source.wsd}
'2': {name: support.variable.class.group.source.wsd}
Expand Down