You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using extension v1.18.1 with OCaml version 5.2.0 (and 4.14.2), I have an unexpected behaviour when saving an ocamllex file (ending in .mll). The extension formats the file in a way which is no longer valid but also not readable.
My example is the following one:
{
openParserexceptionError of stringletfailexplanation= raise (Error explanation)
}
let space = [' ''\t''\r']+let ident = ['a'-'z''A'-'Z''0'-'9''_']+
rule token =
parse
| space { token lexbuf }
|'\n' { Lexing.new_line lexbuf; token lexbuf }
|"Type" { TYPE }
|':' { COLON }
|'.' { DOT }
| eof { EOF }
| ident as id { ID id }
| _ as c { fail (Printf.sprintf "Unexpected character: %C (codepoint: %d)" c (Char.code c)) }
and on save, the extension produces this file:
{
open
Parser
exception
Error
of
string
let
fail
explanation
=
raise
(Error explanation)
}
let
space
=
['
'
'\t'
'\r']+
let
ident
=
['a'-'z''A'-'Z''0'-'9''_']+
rule
token
=
parse
|
space
{
token
lexbuf
}
|
'\n'
{
Lexing.new_line
lexbuf
; token lexbuf }
|
"Type"
{
TYPE
}
|
':'
{
COLON
}
|
'.'
{
DOT
}
|
eof
{
EOF
}
|
ident
as
id
{
ID
id
}
|
_
as
c
{
fail
(Printf.sprintf
"Unexpected character: %C (codepoint: %d)"
c
(Char.code c))
}
Deactivating the extension enables to not observe this behaviour.
The text was updated successfully, but these errors were encountered:
Using extension v1.18.1 with OCaml version 5.2.0 (and 4.14.2), I have an unexpected behaviour when saving an ocamllex file (ending in
.mll
). The extension formats the file in a way which is no longer valid but also not readable.My example is the following one:
and on save, the extension produces this file:
Deactivating the extension enables to not observe this behaviour.
The text was updated successfully, but these errors were encountered: