-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use clang-ast-dump
as a replacement of show-clang-ast
#212
Comments
Currently, Should we add it to |
TravisCardwell
added a commit
that referenced
this issue
Oct 11, 2024
This commit is a squashed version of a number of previous commits, rebased to work with a recent redesign of `Fold`. `FoldM` uses `MonadIO`, and I refactored the code to call `liftIO` minimizing changes. Now that we can use a `Reader`, it is possible to track indentation within the `Reader` environment, using `local` for indentation, but I have not implemented that. The new version of `Fold` no longer provides `parent`, as the parent cursor can be queried using the API. I rewrote the code to query both the semantic and lexical parents. When they are equal and are not the target file, just "parent" is displayed. Otherwise, "semantic parent" and "lexical parent" are displayed separately. This program uses features added in the `doxygen` branch (#26), but I am referencing the new `clang-ast-dump` issue (#212).
3 tasks
TravisCardwell
added a commit
that referenced
this issue
Oct 11, 2024
Let's make it an executable in |
TravisCardwell
added a commit
that referenced
this issue
Oct 11, 2024
This commit is a squashed version of a number of previous commits, rebased to work with a recent redesign of `Fold`. `FoldM` uses `MonadIO`, and I refactored the code to call `liftIO` minimizing changes. Now that we can use a `Reader`, it is possible to track indentation within the `Reader` environment, using `local` for indentation, but I have not implemented that. The new version of `Fold` no longer provides `parent`, as the parent cursor can be queried using the API. I rewrote the code to query both the semantic and lexical parents. When they are equal and are not the target file, just "parent" is displayed. Otherwise, "semantic parent" and "lexical parent" are displayed separately. This program uses features added in the `doxygen` branch (#26), but I am referencing the new `clang-ast-dump` issue (#212).
TravisCardwell
added a commit
that referenced
this issue
Oct 11, 2024
TravisCardwell
added a commit
that referenced
this issue
Oct 11, 2024
The `clang-ast-dump` utility is now an `executable` of `hs-bindgen-libclang`. It is therefore build and tested with everything else. This is good because it ensures that it is kept up-to-date with any changes to the libraries. If we do not want to build it by default, however, we can add a Cabal flag.
TravisCardwell
added a commit
that referenced
this issue
Oct 11, 2024
This commit is a squashed version of a number of previous commits, rebased to work with a recent redesign of `Fold` as well as the reorganized module hierarchy. `FoldM` uses `MonadIO`, and I refactored the code to call `liftIO` minimizing changes. Now that we can use a `Reader`, it is possible to track indentation within the `Reader` environment, using `local` for indentation, but I have not implemented that. The new version of `Fold` no longer provides `parent`, as the parent cursor can be queried using the API. I rewrote the code to query both the semantic and lexical parents. When they are equal and are not the target file, just "parent" is displayed. Otherwise, "semantic parent" and "lexical parent" are displayed separately.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A
show-clang-ast
command was implemented in thehs-bindgen
executable. It displayed information from theElement
representations of the Clang AST.Example Usage
A separate
clang-ast-dump
utility aims to aid with development. It traverses the Clang AST directly, displaying results from Clang function calls. The goal is to provide low-level information about the AST, which helps implementing the translation between Clang types and our Haskell types.It looks like
show-clang-ast
has already been removed. Theclang-ast-dump
utility was initially developed to understand the Clang documentation AST (#26), currently in thedoxygen
branch. It should be useful as we continue to develop support for more C features, however, so we should go ahead and make it the official replacement ofshow-clang-ast
.Note that the Clang
ast-dump
command is also useful, but it is not as detailed.Example Usage
The text was updated successfully, but these errors were encountered: