Sublime Forum

[patch] D syntax update

#1

Since recently the do keyword can be used in place of the body keyword in function declarations with contracts.The following patch to D.sublime-package\D.sublime-syntax straightens an otherwise confused syntax highlighter.

--- D.sublime-package.orig.unzip\D.sublime-syntax	Fri Mar 18 09:47:42 2016
+++ D.sublime-package.unzip\D.sublime-syntax	Mon Dec 04 23:48:48 2017
@@ -261,7 +261,7 @@
             - include: $top_level_main
         - match: (in|out)
           scope: keyword.control.statement.d
-        - match: (?=body)
+        - match: (?=body|do)
           pop: true
     - match: '(?<=\})'
       pop: true
1 Like

#2

You can open a issue on https://github.com/sublimehq/Packages/issues to discuss it with their developers.

0 Likes

#3

Thanks. https://github.com/sublimehq/Packages/pull/1345

1 Like