FStarLang / VimFStar

A Vim mode for FStar
Vim License
24 stars 12 forks source link

module syntax line not correctly ended #19

Open maxzinkus opened 4 years ago

maxzinkus commented 4 years ago
module Foo
open Bar
open Baz

will not correctly highlight the first open. However,

module Foo (* quux *)
open Bar
open Baz

will correctly color everything. I assume this means the module region isn't correctly ending.

maxzinkus commented 4 years ago

The nextgroup for fstarModule is fstarPreDef, which looks like this: fstarPreDef start="."me=e-1 matchgroup=fstarKeyword end="\l\|=\|)"me=e-1 I feel like this region (start on any character, end on lowercase, =, or ) is wrong.

maxzinkus commented 4 years ago

Ah, no, I think the actual fix for this is to change fstarModule's end from end="\<\u\(\w\|'\)*\>" to end="\<\u\(\w\|'\)*\>"me=e-1 to prevent the word-ending \> match from consuming the newline.