baleezo / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

apostrophes in OCaml are not handled correctly #130

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In OCAML you can use apostrophes in identifiers:
  let f' x' = x' + 1

What is between apostrophes should *not* be highlighted as a string constant. 
This is both with and without lang-ml.js (and the corresponding lang-ml class).

Perhaps lang-ml could simply color as a string constant only '.' (as opposed to 
'.*')?

Original issue reported on code.google.com by radugrig...@gmail.com on 15 Sep 2010 at 6:17

GoogleCodeExporter commented 8 years ago
I remember that from type placeholders in SML/NJ.

I think I made that mistake based on 
http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/spec.htm
l#_Toc270597388
which describes single quotes as legal around single characters and I ended up 
generalizing that to n character strings and missed the single quote after the 
combining marks in the identifier grammar.

Should be fixed at r117 : 
http://code.google.com/p/google-code-prettify/source/diff?spec=svn117&r=117&form
at=side&path=/trunk/src/lang-ml.js

Original comment by mikesamuel@gmail.com on 26 Oct 2010 at 4:43