jskinner / DefaultPackages

Old bug tracker for Sublime Text's "Default Packages", e.g. bad syntax highlighting
http://web.archive.org/web/20150524043750/https://www.sublimetext.com/forum/viewtopic.php?f=2&t=12095
26 stars 2 forks source link

lisp syntax highlighting treats ?\" as the start of a string. #186

Open alexflint opened 8 years ago

alexflint commented 8 years ago

The lisp syntax highlighting incorrectly treats ?\" as the start of a string, where in fact it is a character literal. This results in an inversion of string/non-string regions:

screenshot 2016-04-26 12 11 44

ST3, Build 3103, OSX 10.10

wbond commented 8 years ago

I know effectively nothing about lisp, so I looked into this.

It seems #\ is common lisp and ?\ is emacs lisp? It seems the current syntax supports the former, but not that later. Is that correct?

alexflint commented 8 years ago

@wbond Yes that is correct. I should have mentioned that I'm working with elisp.

wbond commented 8 years ago

Does syntax highlighting of lisp usually take into account both variants, or are there usually enough differences to cause problems?

alexflint commented 8 years ago

I'm actually not sure what other editors do, but there are relatively few syntactic differences between Common lisp / Elisp so it's probably possible to deal with them together. (Most of the differences are at the semantic level.)