-
Notifications
You must be signed in to change notification settings - Fork 100
Add AST section to examples #545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ppx-by-example
Are you sure you want to change the base?
Add AST section to examples #545
Conversation
3c7b85f
to
e5e4945
Compare
6a2f1e9
to
6ad21fe
Compare
6ad21fe
to
160f335
Compare
Makefile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NathanReb I've made some improvements on Makefile, can you check out if it makes sense?
The main feature is to add doc-dev
, but I also added the help
command
@patricoferris Tagging you for the review as you reacted to this PR |
doc/dune
Outdated
(system "mkdir -p %{project_root}/_doc/_html/ppxlib/assets/images") | ||
(system "cp -R ./images/ %{project_root}/_doc/_html/ppxlib/assets/images/")))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, I didn't know any other way to get assets on odoc. Do you guys happen to know?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NathanReb @patricoferris I know that Odoc v3 supports it; maybe there is no alternative other than due to a hack similar to this one. Do you guys know a better hack?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, this hack will unfortunately not work for the documentation generated for ocaml.org.
The proper way to do it is to:
- install the image files in the
odoc-pages
folder of the doc (see this example for how to do it with dune) - Include it with the odoc3 syntax, in your case
{image!filename.png}
The tooling support for for odoc 3 is still under construction, so dune
won't yet be able to build the documentation with the images... however, odoc_driver
can and soon dune and ocaml.org will be able to do it! You would be one of the first users of images the odoc 3 way!
(Another way to do it is to use permalinks to the image eg {image:https://github.com/ocaml-ppx/ppxlib/<hash>/filename.png}
)
I also wonder if turning some images into text wouldn't be better for accessibility.
7bf1887
to
2aeef20
Compare
@pedrobslisboa just pushed a |
Signed-off-by: Nathan Rebours <[email protected]>
Signed-off-by: Nathan Rebours <[email protected]>
Signed-off-by: Nathan Rebours <[email protected]>
…27-0 Update ocamlformat 0.27.0
Add a x-maintenance-intent field to opam files
2aeef20
to
e585e65
Compare
Bump AST to OCaml 5.2.0
Signed-off-by: Patrick Ferris <[email protected]>
Fix traverse sexp tests after 5.2 AST merge
Signed-off-by: Patrick Ferris <[email protected]>
Use setup-ocaml@v3 for trunk build
Location.none has been changed to match the compiler's Location.none as of OCaml 4.08 which has been stable for some time. Since ppxlib only supports compilers greater than or equal to 4.08 we do not need to handle other possible none location values. Signed-off-by: Patrick Ferris <[email protected]>
Signed-off-by: Patrick Ferris <[email protected]>
…ummy-loc Match compilers dummy loc
…e transformations. Signed-off-by: Jay Mody <[email protected]>
Add `[@@@expand_inline]` and support for floating attribute context free transformations
Signed-off-by: Nathan Rebours <[email protected]>
Signed-off-by: Nathan Rebours <[email protected]>
Signed-off-by: Nathan Rebours <[email protected]>
Signed-off-by: Nathan Rebours <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ation Fix location inserted when migrating constants from 5.2 to 5.3
There are only two significant changes to the AST from 5.2 to 5.3: the addition of a dedicated effects AST node and constant nodes getting a location. The latter will likely be the most impacting change to downstream dependencies of ppxlib. Signed-off-by: Patrick Ferris <[email protected]>
Signed-off-by: Patrick Ferris <[email protected]>
Signed-off-by: Patrick Ferris <[email protected]>
Signed-off-by: Patrick Ferris <[email protected]>
This patch introduces a new GitHub Actions workflow with dune package management. It'd help us ensure ppxlib builds with dune PM. Signed-off-by: Sudha Parimala <[email protected]>
Add a dune package management GHA workflow
While we want to keep an eye on this, we don't want to make it a hard requirement Signed-off-by: Sudha Parimala <[email protected]>
Dune pkg GHA: continue on failure
Signed-off-by: Pedro B S Lisboa <[email protected]>
e585e65
to
737d517
Compare
Signed-off-by: Pedro B S Lisboa <[email protected]>
Signed-off-by: Pedro B S Lisboa <[email protected]>
Signed-off-by: Pedro B S Lisboa <[email protected]>
737d517
to
f08cc55
Compare
41 files where: 20 are pngs and 8 are old examples files deleted. So don't be scared
Description
This is the first part of adding the ppx-by-example to ppxlib
I will divide it into PR so we can review it better, focusing on the explanation and typos without having tons of files to review. It is really necessary that this section is easy to understand and is aligned with ppxlib.
@NathanReb Can you create a
ppx-by-example
base branch? So I can point this one to it, and after all merges (Other sections) on this branch, we move with the entireppx-by-example
branch to main?AST
This PR adds the AST sections AST / Building ASTs / Destructing ASTs
How to test it (It's important to check it not only by code but also as styles)