davidcelis / language-thrift

Atom syntax highlighting and snippets for Thrift files.
MIT License
1 stars 5 forks source link

Escaping a double quote throws off highlighter #3

Open MikeAllenSqrrl opened 9 years ago

MikeAllenSqrrl commented 9 years ago

I have a struct definition that looks something like this:

struct MyOptions { 1: optional int foo, 2: optional separatorChar = "\"", 3: optional escapeChar = "\", 4: optional int bar }

Past the separatorChar definition, that syntax highlighting goes into sort of a tizzy, thinking that the quoted string is never closed. See attached image.

screen shot 2015-06-26 at 10 24 49 pm

davidcelis commented 9 years ago

Hey, thanks for this bug report. I'll echo what I said in #1: I'd fix this, but I'm not terribly familiar with the grammar and how to make that work in the cson file. This is foremost a simple port of the Thrift tmbundle and I haven't done much editing with it since it seemed to work for the Thrift I was writing at New Relic. I also haven't had to write any Thrift since I left New Relic, so I'm unfortunately not in a rush to fix that.

I would be happy to accept a PR to fix the issue of optional ListSeparators, and willing to give a commit bit to anybody who wants to do so and is more familiar with the Thrift grammar! I know this isn't an ideal response, but it's the truth.