Skip to content

Commit

Permalink
highlight comments inside let, allow names starting with 'of', and ha…
Browse files Browse the repository at this point in the history
…ndle string escapes (fixes vrjuliao#12, vrjuliao#13, vrjuliao#15)
  • Loading branch information
shwestrick committed Jan 30, 2022
1 parent ab504ff commit c27bbea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions syntax/sml.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
"patterns": [
{
"include": "#dec"
},
{
"include": "#comment"
}
]
},
Expand Down Expand Up @@ -259,7 +262,7 @@
"name": "string.double",
"patterns": [
{
"match": "\\\\\""
"match": "(?x)\\\\(?:[\"\\\\abtnvfr]|[0-9]{3}|\\^[@-_]|u[0-9a-fA-F]{4}|[^\\\\]*\\\\)"
}
]
},
Expand Down Expand Up @@ -521,7 +524,7 @@
]
},
{
"begin": "(?<=[^[:word:]]of|^of)",
"begin": "(?<=[^[:word:]]of|^of)(?=[^[:word:]])",
"end": "(?=,|\\}|\\)|\\]|\\b(?:abstype|and|datatype|exception|fun|infix|infixr|local|nonfix|open|type|val|include|local|functor|signature|structure|end|in)\\b(?:$|[[:space:]]|(?<=[^:!?'@/\\-\\*\\\\\\+\\|&#%`^<=>~$]),|\\}|\\)|\\](?=[^:!?'@/\\-\\*\\\\\\+\\|&#%`^<=>~$])))",
"endCaptures": {
"0": {
Expand Down

0 comments on commit c27bbea

Please sign in to comment.