From f4aedb9486ff727240f94f3672a8c792f7f4707a Mon Sep 17 00:00:00 2001 From: John Fresco Date: Tue, 19 Mar 2019 21:04:57 -0600 Subject: [PATCH] Fix variant highlighting If a variant constructor is on its own line, didn't have an argument, and wasn't in the last position, it wouldn't receive highlighting. This hopefully fixes that. Example: 'A' wouldn't receive highlighting type t = | A | B(int) | C --- syntax/reason.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/reason.vim b/syntax/reason.vim index ad5dddf..8356cb3 100644 --- a/syntax/reason.vim +++ b/syntax/reason.vim @@ -38,7 +38,7 @@ syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\% syn match labelArgument "\(\l\|_\)\(\w\|'\)*::\(?\)\?"lc=0 "Allows any space between label name and :: syn match labelArgumentPunned "::\(?\)\?\(\l\|_\)\(\w\|'\)*"lc=0 "Allows any space between label name and :: -syn match rustEnumVariant "\<\u\(\w\|'\)*\>[^\.]"me=e-1 +syn match rustEnumVariant "\<\u\(\w\|'\)*\>" " Polymorphic variants syn match rustEnumVariant "`\w\(\w\|'\)*\>"