-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5.3 support: Backport utf8 identifiers (#2622)
Vendor required code from Misc.Utf8_lexeme, String, Bytes and Uchar. Backport utf8 identifiers to standard and extended parser. This reduces the diff with upstream. * test: Add utf8_identifiers.ml Taken from the compiler source. * test_branch: Ignore parsing errors on 'infer' The project contains a syntax error, that is new in OCaml 5.3: (** [x < min({x'|x'∊l})] *)
- Loading branch information
Showing
14 changed files
with
825 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
ocamlformat: ignoring "tests/unit_lex.ml" (syntax error) | ||
File "tests/unit_lex.ml", line 18, characters 4-10: | ||
18 | ������ (* this file must be iso-8859-1 *) | ||
^^^^^^ | ||
Alert deprecated: ISO-Latin1 characters in identifiers | ||
ocamlformat: ignoring "tests/unit_lex.ml" (syntax error) | ||
|
||
File "tests/unit_lex.ml", line 55, characters 2-8: | ||
55 | '\999'; (* wrong, but yet... *) | ||
^^^^^^ | ||
Error: Illegal backslash escape in string or character ('\999'): 999 is outside the range of legal characters (0-255). | ||
Error: Invalid encoding of identifier ������. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
File "tests/unit_values.ml", line 6, characters 10-11: | ||
6 | let i32 = −1073741824, 1073741823 | ||
^ | ||
Alert deprecated: ISO-Latin1 characters in identifiers | ||
ocamlformat: ignoring "tests/unit_values.ml" (syntax error) | ||
|
||
File "tests/unit_values.ml", line 6, characters 11-12: | ||
File "tests/unit_values.ml", line 6, characters 10-23: | ||
6 | let i32 = −1073741824, 1073741823 | ||
^ | ||
Error: Illegal character (\136) | ||
^^^^^^^^^^^^^ | ||
Error: Invalid character U+2212 in identifier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(* TEST | ||
readonly_files = "genfiles.ml"; | ||
setup-ocamlc.byte-build-env; | ||
all_modules = "genfiles.ml"; | ||
program = "./genfiles.byte.exe"; | ||
ocamlc.byte; | ||
run; | ||
all_modules = "été.ml ça.ml test.ml"; | ||
program = "./main.byte.exe"; | ||
ocamlc.byte; | ||
run; | ||
*) | ||
|
||
let _ = | ||
(* Source is NFC *) | ||
assert (Été.x + Ça.x = 3); | ||
(* Source is NFD *) | ||
assert (Été.x + Ça.x = 3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
(* TEST | ||
readonly_files = "genfiles.ml"; | ||
setup-ocamlc.byte-build-env; | ||
all_modules = "genfiles.ml"; | ||
program = "./genfiles.byte.exe"; | ||
ocamlc.byte; | ||
run; | ||
all_modules = "été.ml ça.ml test.ml"; | ||
program = "./main.byte.exe"; | ||
ocamlc.byte; | ||
run; | ||
*) | ||
|
||
let _ = | ||
(* Source is NFC *) | ||
assert (Été.x + Ça.x = 3); | ||
(* Source is NFD *) | ||
assert (Été.x + Ça.x = 3) | ||
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(* TEST | ||
readonly_files = "genfiles.ml"; | ||
setup-ocamlc.byte-build-env; | ||
all_modules = "genfiles.ml"; | ||
program = "./genfiles.byte.exe"; | ||
ocamlc.byte; | ||
run; | ||
all_modules = "été.ml ça.ml test.ml"; | ||
program = "./main.byte.exe"; | ||
ocamlc.byte; | ||
run; | ||
*) | ||
|
||
let _ = | ||
(* Source is NFC *) | ||
assert (Été.x + Ça.x = 3) ; | ||
(* Source is NFD *) | ||
assert (Été.x + Ça.x = 3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(* TEST | ||
readonly_files = "genfiles.ml"; | ||
setup-ocamlc.byte-build-env; | ||
all_modules = "genfiles.ml"; | ||
program = "./genfiles.byte.exe"; | ||
ocamlc.byte; | ||
run; | ||
all_modules = "été.ml ça.ml test.ml"; | ||
program = "./main.byte.exe"; | ||
ocamlc.byte; | ||
run; | ||
*) | ||
|
||
let _ = | ||
(* Source is NFC *) | ||
assert (Été.x + Ça.x = 3); | ||
(* Source is NFD *) | ||
assert (Été.x + Ça.x = 3) |
Oops, something went wrong.