Syntax highlighting for exceptions. (#9318)

* Syntax highlighting for exceptions.

* Add `exception`, `try`, and `catch` as keywords.
* Add `throw` as function name.

changelog_begin
changelog_end

* Updated wrong language definition.

* Add 'message'
This commit is contained in:
Sofia Faro 2021-04-06 09:45:12 +01:00 committed by GitHub
parent 3c1bfc49c8
commit 14b062ce40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -120,7 +120,7 @@
"match": "\\b(case|commits|fails|daml|else|ensure|exercise|if|import|in|let|match|must|of|on|qualified|scenario|template|then|type|data|where|while|with|anytime|signatory|observer|returning|to|agreement|do|does|test|def|fetch|controller|can)\\b"
},
{
"name": "entity.name.function",
"name": "entity.name.function",
"match": "\\b(pure|return|assert|create|mustFailAt|fromRelTime|toRelTime|fromInteger|toInteger|pass|toText|singleton|unpack|divD|remD|round|cons|nil|subTime|addRelTime)\\b"
},
{

View File

@ -412,6 +412,7 @@
| key
| maintainer
| daml
| exception
)(\b(?!'))
</string>
<key>name</key>
@ -425,13 +426,13 @@
</dict>
<dict>
<key>match</key>
<string>\b(m?agreement|controller|can|ensure|signatory|nonconsuming|observer|preconsuming|postconsuming)(\b(?!'))</string>
<string>\b(m?agreement|controller|can|ensure|signatory|nonconsuming|observer|preconsuming|postconsuming|message)(\b(?!'))</string>
<key>name</key>
<string>keyword.other.daml</string>
</dict>
<dict>
<key>match</key>
<string>\b(do|if|then|else|case|of)(\b(?!'))</string>
<string>\b(do|if|then|else|case|of|try|catch)(\b(?!'))</string>
<key>name</key>
<string>keyword.control.daml</string>
</dict>