Translating source locations to locations in the AST #999
Replies: 5 comments 4 replies
-
Each symbol has a |
Beta Was this translation helpful? Give feedback.
-
I've added the necessary changes to print out source line information in JSon files in a local fork here: https://github.com/KennethDRoe/slang.git. The changes are all in ASTSerializer. Is this class used for anything other than printing json files? I saw a some regression failures after making the changes. Are there known failures in master? |
Beta Was this translation helpful? Give feedback.
-
It looks like I get the same failures with a clean tree without my changes. I suspect the issue is with my environment. I'm building on an M1 Mac with Xcode 15.2 (15C500b), cmake 3.27.5 and Python 3.11.9. I looked at your workflows. It looks like you don't test on the Mac. |
Beta Was this translation helpful? Give feedback.
-
Can you add me as a collaborator? I'd like to submit a pull request for the change I made to print source file information in the json dump. |
Beta Was this translation helpful? Give feedback.
-
I've updated master in my fork with the changes you requested. The three
JSON tests are passing. I don't have a way of running the entire test
suite on one of your platforms. The same tests are failing on my M1 Mac as
before. Let me know what you think.
…On Sun, May 26, 2024 at 1:09 PM Michael Popoloski ***@***.***> wrote:
You should be able to submit a pull request without me doing anything on
my end.
—
Reply to this email directly, view it on GitHub
<#999 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIIJFINDYQPA7RJD7WVZVPLZEF4BHAVCNFSM6AAAAABH5BSADWVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TKNJZGQ3TK>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I would like to modify the printJson function so that each AST node is printed with a source range showing the beginning and end of the object. I see an ASTSerializer class that is used to print out json objects. It has a class member ASTSerializer::visit which has the code for printing the objects. What do I need to add to this code to print the location of the object in the source?
Beta Was this translation helpful? Give feedback.
All reactions