Merge pull request #396 from emillon/removed-string-set
Handle Syntaxerr.Removed_string_set
This commit is contained in:
commit
e2a765f36f
|
@ -305,6 +305,14 @@ let parse_default parse str eos_is_error =
|
||||||
| Syntaxerr.Invalid_package_type (loc, s) ->
|
| Syntaxerr.Invalid_package_type (loc, s) ->
|
||||||
Error ([mkloc loc],
|
Error ([mkloc loc],
|
||||||
Printf.sprintf "Invalid package type: %s" s)
|
Printf.sprintf "Invalid package type: %s" s)
|
||||||
|
#endif
|
||||||
|
#if OCAML_VERSION >= (5, 0, 0)
|
||||||
|
| Syntaxerr.Removed_string_set loc ->
|
||||||
|
Error ([mkloc loc],
|
||||||
|
"Syntax error: strings are immutable, there is no assignment \
|
||||||
|
syntax for them.\n\
|
||||||
|
Hint: Mutable sequences of bytes are available in the Bytes module.\n\
|
||||||
|
Hint: Did you mean to use 'Bytes.set'?")
|
||||||
#endif
|
#endif
|
||||||
end
|
end
|
||||||
| Syntaxerr.Escape_error | Parsing.Parse_error ->
|
| Syntaxerr.Escape_error | Parsing.Parse_error ->
|
||||||
|
|
Loading…
Reference in New Issue