-
Notifications
You must be signed in to change notification settings - Fork 444
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
[p4fmt]: Add a pretty printer for p4fmt. #4862
Conversation
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.
I would call it a different name. P4Formatter? Also feel free to prune as many members and methods as possible. I think most of them are not needed here.
Also add a preorder function for const IR::Node *
throw a P4C_UNIMPLEMENTED exception there.
Sure.
Yes, was planning to do this. |
Just to clarify things, did you mean I should rename 'toP4' class to 'P4Formatter' ? |
Yes, or whatever name you find most appropriate. |
Need to update the namespace after #4825 has been merged, then we are good to go. |
@snapdgn is this ready to be merged? It is still in draft mode. |
Signed-off-by: Nitish <snapdgnn@proton.me>
Signed-off-by: Nitish <snapdgnn@proton.me>
Signed-off-by: Nitish <snapdgnn@proton.me>
Signed-off-by: Nitish <snapdgnn@proton.me>
Signed-off-by: Nitish <snapdgnn@proton.me>
Signed-off-by: Nitish <snapdgnn@proton.me>
Signed-off-by: Nitish <snapdgnn@proton.me>
Signed-off-by: Nitish <snapdgnn@proton.me>
Sorry, this should be ready now. |
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.
LGTM other than the directory structure.
Signed-off-by: Nitish <snapdgnn@proton.me>
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.
See comments
Signed-off-by: Nitish <snapdgnn@proton.me>
…tion` function Signed-off-by: Nitish <snapdgnn@proton.me>
Signed-off-by: Nitish <snapdgnn@proton.me>
Signed-off-by: Nitish <snapdgnn@proton.me>
Signed-off-by: Nitish <snapdgnn@proton.me>
Signed-off-by: Nitish <snapdgnn@proton.me>
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.
@asl I will go ahead and merge this today if you do not have any other comments.
Dismissing @asl's review to merge, we can address remaining issues in subsequent PRs. |
Yes, I don't think I missed resolving any of the suggestions. |
pretty printer for p4fmt