Skip to content

Commit

Permalink
Merge branch 'main' into context-free
Browse files Browse the repository at this point in the history
  • Loading branch information
Burnleydev1 authored Nov 23, 2023
2 parents 257e202 + df3f389 commit a83582c
Show file tree
Hide file tree
Showing 45 changed files with 2,437 additions and 508 deletions.
5 changes: 4 additions & 1 deletion .ocamlformat-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ astlib/ast_413.ml
astlib/ast_414.ml
astlib/ast_501.ml

# Files that use cinaps to generate bode blocks from other code blocks work well,
# Files that use cinaps to generate code blocks from other code blocks work well,
# but files that inject freely formatted code via cinaps must be excluded
ast/versions.ml
ast/versions.mli
ast/import.ml
astlib/migrate_414_500.ml
astlib/migrate_500_414.ml

# Currently our expect-test lexer is too strict for our expect tests to
# work well with ocamlformat
Expand Down
72 changes: 46 additions & 26 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,39 @@
unreleased
-------------------


- raising an exception does no longer cancel the whole context free phase(#453, @burnleydev1)

- Add API to manipulate attributes that are used as flags (#404, @dianaoigo)

- Update changelog to use ISO 8061 date format: YYYY-MM-DD. (#445, @ceastlund)

0.31.0 (2023-09-21)
-------------------

- Fix support for OCaml 5.1: migrated code preserves generative
functor warnings, without creating more. Locations are better
preserved. (#432, @pitag-ha, @panglesd)

- Driver: Add `-unused-code-warnings` command-line flag. (#444, @ceastlund)

- Add `?warning` flag to `Deriving.Generator.make`. (#440, @jacksonzou123 via @ceastlund)

- Restore the "path_arg" functionality in the V3 API (#431, @ELLIOTTCABLE)

0.30.0 (20/06/2023)
- Expose migration/copying/etc. functions for all AST types needed by `Pprintast` (#454, @antalsz)

- Preserve quoted attributes on antiquotes in metaquot (#441, @ncik-roberts)

- Attribute namespaces: Fix semantics of reserving multi-component namespaces (#443, @ncik-roberts)

0.30.0 (2023-06-20)
-------------------

- Adopt the OCaml Code of Conduct on the repo (#426, @pitag-ha)

- Replace `Caml` with `Stdlib`. (#427, @ceastlund)

- Clean up misleading attribute hints when declared for proper context. (#425, @ceastlund)

- Ast_pattern now has ebool, pbool helper, and a new map.(#402, @burnleydev1)
Expand Down Expand Up @@ -41,19 +61,19 @@ unreleased
- Add support for OCaml 5.1, excluding OCaml `5.1.0~alpha1` (#428, @shym, @Octachron , @pitag-ha, @panglesd)
- Driver: Fix `-locations-check` option for coercions with ground (#428, @Octachron)

0.29.1 (14/02/2023)
0.29.1 (2023-02-14)
------------------

- Allow users to vendor `ppxlib` as-is, as well as `ppx_sexp_conv` in the same project (#386, @kit-ty-kate)

0.29.0 (06/02/2023)
0.29.0 (2023-02-06)
------------------

- Remove `File_path` exports. (#381, @ceastlund)

- Add `Ppxlib.Expansion_helpers` with name mangling utilities from ppx_deriving (#370, @sim642)

0.28.0 (05/10/2022)
0.28.0 (2022-10-05)
-------------------

- Make `esequence` right-associative. (#366, @ceastlund)
Expand All @@ -69,7 +89,7 @@ unreleased

- Add driver benchmarks (#376, @gridbugs)

0.27.0 (14/06/2022)
0.27.0 (2022-06-14)
-------------------

- Update expansion context to leave out value name when multiple are
Expand Down Expand Up @@ -102,17 +122,17 @@ unreleased
- API: For each function that could raise a located error, add a function that
return a `result` instead (#329, @panglesd)

0.26.0 (21/03/2022)
0.26.0 (2022-03-21)
-------------------

- Bump ppxlib's AST to 4.14/5.00 (#320, @pitag-ha)

0.25.1 (17/06/2022)
0.25.1 (2022-06-17)
-------------------

- Add support for OCaml 5.0 (#355, @pitag-ha)

0.25.0 (03/03/2022)
0.25.0 (2022-03-03)
-------------------

- Added `error_extensionf` function to the `Location` module (#316, @panglesd)
Expand All @@ -125,7 +145,7 @@ unreleased
- Driver: Append the last valid AST to the error in case of located exception
when embedding errors (#315, @panglesd)

0.24.0 (08/12/2021)
0.24.0 (2021-12-08)
-------------------

- Add support for OCaml 4.14 (#304, @kit-ty-kate)
Expand All @@ -147,7 +167,7 @@ unreleased
payload (#299, @NathanReb)


0.23.0 (31/08/2021)
0.23.0 (2021-08-31)
-------------------

- Drop `Parser` from the API (#263, @pitag-ha)
Expand Down Expand Up @@ -199,27 +219,27 @@ unreleased
- Expose a part of `Ast_io` in order to allow reading AST values from binary
files (#270, @arozovyk)

0.22.2 (23/06/2021)
0.22.2 (2021-06-23)
-------------------

- Make ppxlib compatible with 4.13 compiler (#260, @kit-ty-kate)

0.22.1 (10/06/2021)
0.22.1 (2021-06-10)
-------------------

- Fix location in parse error reporting (#257, @pitag-ha)

0.21.1 (09/06/2021)
0.21.1 (2021-06-09)
-------------------

- Fix location in parse error reporting (#256, @pitag-ha)

0.22.0 (04/02/2021)
0.22.0 (2021-02-04)
-------------------

- Bump ppxlib's AST to 4.12 (#193, @NathanReb)

0.21.0 (22/01/2021)
0.21.0 (2021-01-22)
-------------------

- Fix ppxlib.traverse declaration and make it a deriver and not a rewriter
Expand All @@ -243,37 +263,37 @@ unreleased
- Location.Error: add functions `raise` and `update_loc`
(#205, @pitag-ha)

0.20.0 (16/11/2020)
0.20.0 (2020-11-16)
-------------------

- Expose `Ppxlib.Driver.map_signature` (#194, @kit-ty-kate)

0.19.0 (23/10/2020)
0.19.0 (2020-10-23)
-------------------

- Make ppxlib compatible with 4.12 compiler (#191, @kit-ty-kate)

0.18.0 (06/10/2020)
0.18.0 (2020-10-06)
-------------------

- Bump ppxlib's AST to 4.11 (#180, @NathanReb)

0.17.0 (17/09/2020)
0.17.0 (2020-09-17)
-------------------

- Add accessors for `code_path` and `tool_name` to `Expansion_context.Base`
(#173, @jberdine)
- Add `cases` methods to traversal classes in `Ast_traverse` (#183, @pitag-ha)

0.16.0 (18/08/2020)
0.16.0 (2020-08-18)
-------------------

- `Driver.register_transformation`: add optional parameter `~instrument`
(#161, @pitag-ha)
- Add missing `Location.init` (#165, @pitag-ha)
- Upgrade to ocaml-migrate-parsetree.2.0.0 (#164, @ceastlund)

0.15.0 (04/08/2020)
0.15.0 (2020-08-04)
-------------------

- Remove `base` and `stdio` dependencies (#151, @ceastlund)
Expand All @@ -284,7 +304,7 @@ unreleased

- Implement name mangling for `ppxlib_traverse` (#159, @ceastlund)

0.14.0 (08/07/2020)
0.14.0 (2020-07-08)
-------------------

- Bump ppxlib's AST to 4.10 (#130, @NathanReb)
Expand All @@ -296,7 +316,7 @@ unreleased
`structure` instead of a `Migrate_parsetree.Driver.some_structure`.
(#153, @NathanReb)

0.13.0 (04/15/2020)
0.13.0 (2020-04-15)
-------------------

- Add 'metaquot.' prefix to disambiguate metaquote extensions (#121,
Expand All @@ -305,17 +325,17 @@ unreleased
- Bump dune language to 1.11 since the cinaps extension requires at
least Dune 1.11 (#126, @diml)

0.12.0 (01/07/2020)
0.12.0 (2020-01-07)
-------------------

- Support for OCaml 4.10 (#109, @xclerc)

0.11.0 (01/07/2020)
0.11.0 (2020-01-07)
-------------------

- Invariant check on locations (#107, @trefis)

0.10.0 (11/21/2019)
0.10.0 (2019-11-21)
-------------------

- Do not produce a suprious empty correction when deriving_inline
Expand Down
30 changes: 6 additions & 24 deletions ast/cinaps/ast_cinaps_helpers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,15 @@
include StdLabels
include Printf

let nl () = printf "\n"

let qualified_types =
[
( "Parsetree",
[
"structure";
"signature";
"toplevel_phrase";
"core_type";
"expression";
"pattern";
"case";
"type_declaration";
"type_extension";
"extension_constructor";
] );
]
let capitalize_ascii = Stdppx.String.capitalize_ascii

(* Reexports from [Astlib_cinaps_helpers] *)
let nl = Astlib_cinaps_helpers.nl
let qualified_types = Astlib_cinaps_helpers.qualified_types
let foreach_module = Astlib_cinaps_helpers.foreach_module
let foreach_type = Astlib_cinaps_helpers.foreach_type
let all_types = List.concat (List.map ~f:snd qualified_types)

let foreach_module f =
nl ();
List.iter qualified_types ~f:(fun (m, types) -> f m types)

let foreach_type f = foreach_module (fun m -> List.iter ~f:(f m))

let foreach_version f =
nl ();
List.iter Supported_version.all ~f:(fun v ->
Expand Down
2 changes: 1 addition & 1 deletion ast/cinaps/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(library
(name ast_cinaps_helpers)
(libraries supported_version))
(libraries stdppx supported_version astlib_cinaps_helpers))
Loading

0 comments on commit a83582c

Please sign in to comment.