Skip to content

Commit

Permalink
Highlight Pulse keywords.
Browse files Browse the repository at this point in the history
  • Loading branch information
gebner committed Oct 11, 2024
1 parent 3276b98 commit 0e4b9a2
Showing 1 changed file with 50 additions and 11 deletions.
61 changes: 50 additions & 11 deletions syntaxes/fstar.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@
"name": "F*",
"patterns": [
{
"include": "#keywords"
},
{
"include": "#strings"
},
{
"include": "#characters"
},
{
"include": "#comments"
"include": "#fstar"
}
],
"repository": {
Expand Down Expand Up @@ -73,7 +64,55 @@
]
}
]

},
"dsl": {
"patterns": [
{
"name": "meta.dsl.fstar",
"begin": "(#lang-pulse)\\b",
"captures": {
"1": {"name": "keyword.dsl.fstar"}
},
"patterns": [
{ "name": "keyword.control.fstar.pulse", "match": "\\b(mut|invariant|while|fn|parallel|each|rewrite|fold|atomic|ghost|with_invariants|opens|show_proof_state)\\b" },
{ "include": "#fstar" }
],
"end": "(?=#lang-.*)"
},
{
"name": "meta.dsl.fstar",
"begin": "(#lang-fstar)\\b",
"captures": { "1": {"name": "keyword.dsl.fstar"} },
"patterns": [
{ "include": "#fstar" }
],
"end": "(?=#lang-.*)"
},
{
"name": "meta.dsl.fstar",
"match": "(#lang-\\w+)\\b",
"captures": { "1": {"name": "keyword.dsl.fstar"} }
}
]
},
"fstar": {
"patterns": [
{
"include": "#keywords"
},
{
"include": "#strings"
},
{
"include": "#characters"
},
{
"include": "#dsl"
},
{
"include": "#comments"
}
]
}
},
"scopeName": "source.fst"
Expand Down

0 comments on commit 0e4b9a2

Please sign in to comment.