Skip to content

Commit

Permalink
Update fold syntax (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-botbol authored Oct 22, 2024
2 parents 05c776d + 22f8e85 commit a323940
Show file tree
Hide file tree
Showing 20 changed files with 1,341 additions and 1,294 deletions.
10 changes: 6 additions & 4 deletions compiler/driver.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1113,10 +1113,12 @@ module Commands = struct
else
Format.pp_print_list ~pp_sep:Format.pp_print_space
(fun ppf ext ->
let base = File.(dirname f / ModuleName.to_string m) in
Format.pp_print_string ppf base;
if ext <> "" then Format.(pp_print_char ppf '.'; pp_print_string ppf ext)
)
let base = File.(dirname f / ModuleName.to_string m) in
Format.pp_print_string ppf base;
if ext <> "" then (
Format.(
pp_print_char ppf '.';
pp_print_string ppf ext)))
ppf extension)
Format.std_formatter modules_list_topo;
Format.close_box ();
Expand Down
237 changes: 147 additions & 90 deletions compiler/plugins/explain.ml

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions compiler/surface/lexer.cppo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ module R = Re.Pcre
#ifndef MR_BUT_REPLACE
#define MR_BUT_REPLACE MS_BUT_REPLACE
#endif
#ifndef MR_COMBINE
#define MR_COMBINE MS_COMBINE
#endif
#ifndef MR_INITIALLY
#define MR_INITIALLY MS_INITIALLY
#endif
#ifndef MR_AND_THEN
#define MR_AND_THEN MS_AND_THEN
#endif
#ifndef MR_CARDINAL
#define MR_CARDINAL MS_CARDINAL
#endif
Expand Down Expand Up @@ -326,8 +326,8 @@ let token_list : (string * token) list =
(MS_IS, IS);
(MS_LIST_EMPTY, LIST_EMPTY);
(MS_BUT_REPLACE, BUT_REPLACE);
(MS_COMBINE, COMBINE);
(MS_INITIALLY, INITIALLY);
(MS_AND_THEN, AND_THEN);
(MS_CARDINAL, CARDINAL);
(MS_YEAR, YEAR);
(MS_MONTH, MONTH);
Expand Down Expand Up @@ -585,12 +585,12 @@ let rec lex_code (lexbuf : lexbuf) : token =
| MR_BUT_REPLACE ->
L.update_acc lexbuf;
BUT_REPLACE
| MR_COMBINE ->
L.update_acc lexbuf;
COMBINE
| MR_INITIALLY ->
L.update_acc lexbuf;
INITIALLY
| MR_AND_THEN ->
L.update_acc lexbuf;
AND_THEN
| MR_CARDINAL ->
L.update_acc lexbuf;
CARDINAL
Expand Down
3 changes: 1 addition & 2 deletions compiler/surface/lexer_en.cppo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@
#define MR_LIST_EMPTY "list", space_plus, "empty"
#define MS_BUT_REPLACE "but replace"
#define MR_BUT_REPLACE "but", space_plus, "replace"
#define MS_COMBINE "combine"
#define MS_INITIALLY "initially"
#define MS_AND_THEN "and then"
#define MR_AND_THEN "and", space_plus, "then"
#define MS_CARDINAL "number"
#define MS_YEAR "year"
#define MS_MONTH "month"
Expand Down
5 changes: 3 additions & 2 deletions compiler/surface/lexer_fr.cppo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@
#define MS_IS "est"
#define MS_LIST_EMPTY "liste vide"
#define MR_LIST_EMPTY "liste", space_plus, "vide"
#define MS_BUT_REPLACE "mais en rempla\195\167ant"
#define MS_BUT_REPLACE "mais en remplaçant"
#define MR_BUT_REPLACE "mais", space_plus, "en", space_plus, "rempla", 0xE7, "ant"
#define MS_COMBINE "combinaison de"
#define MR_COMBINE "combinaison", space_plus, "de"
#define MS_INITIALLY "initialement"
#define MS_AND_THEN "puis"
#define MS_CARDINAL "nombre"
#define MS_YEAR "an"
#define MS_MONTH "mois"
Expand Down
4 changes: 2 additions & 2 deletions compiler/surface/lexer_pl.cppo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@
#define MR_LIST_EMPTY "lista", space_plus, "pusta"
#define MS_BUT_REPLACE "ale zastąpić"
#define MR_BUT_REPLACE "ale", space_plus, "zast", 0x0105, "pi", 0x0107
#define MS_COMBINE "łączyć"
#define MR_COMBINE 0x0142, 0x0105, "czy", 0x0107
#define MS_INITIALLY "początkowo"
#define MR_INITIALLY "pocz", 0X0105, "tkowo"
#define MS_AND_THEN "a następnie"
#define MR_AND_THEN "a", space_plus, "nast", 0x0119, "pnie"
#define MS_CARDINAL "liczba"
#define MS_YEAR "rok"
#define MS_MONTH "miesiąc"
Expand Down
Loading

0 comments on commit a323940

Please sign in to comment.