OCamlPro / ocaml-top

A simple cross-platform OCaml code editor built for top-level evaluation.
http://typerex.org/ocaml-top.html
GNU General Public License v3.0
64 stars 8 forks source link

tab in source file may lead to irrelevant syntax errors #60

Open lebotlan opened 7 years ago

lebotlan commented 7 years ago

Consider a source file which contains tabs (\t)

tab.ml.gz

(tab.ml md5sum is 6684e09f9bb32a7ca8a570c86caa398e -- to check that no character conversion occured.)

let f x = (* the tabs are here *) x + 1 + 2 + (3 + 4)

When opening it in ocaml-top and running it, strange syntax errors appear as if the line with tabs was not completely parsed.

Syntax error: ')' expected, the highlighted '(' might be unmatched

Note : a source file may contain tabs when it is edited with another text editor (e.g. vi, or the kind of indecent text editor that students use at home).