Skip to content

Commit f614187

Browse files
authored
Add syntax highlighting support for int polyvars (#38)
* Add syntax highlighting support for int polyvars * Update polyvar syntaxes
1 parent a2196b5 commit f614187

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## master
44

5+
**Improvements:**
6+
- Add syntax support for int polyvariants
7+
58
## 2.0.1
69

710
- Fixes an issue where `:RescriptTypeHint`, `:RescriptUpgrade` fail with an 127 exit code (due to missing analysis binaries)

examples/basic/src/polySyntax.res

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
let a = #normal
2+
3+
let b = #"exo-tic"
4+
5+
let c = #\"legacy exo-tic"
6+
7+
let d = #732

syntax/rescript.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ syntax region resString start="\v[a-z]`" end="\v`" contains=resInterpolationVari
8888

8989
" Polymorphic variants
9090
syntax match resPolyVariant "\v#[A-za-z][A-Za-z0-9_'$]*"
91+
syntax match resPolyVariant "\v#[0-9]+"
9192
syntax match resPolyVariant "\v#\".*\""
9293
syntax match resPolyVariant "\v#\\\".*\""
9394

0 commit comments

Comments
 (0)