Skip to content

Code linking#38

Merged
sidrasali merged 3 commits intomainfrom
Code-Linking
Sep 13, 2025
Merged

Code linking#38
sidrasali merged 3 commits intomainfrom
Code-Linking

Conversation

@JoudiAlakkad
Copy link
Contributor

@JoudiAlakkad JoudiAlakkad commented Sep 11, 2025

The target was to link the source code (C) with AST nodes, Tacky and Assembly instructions to achieve source code highlighting.
We added to each AST node SourceLocation where we save the location (start line, end line, start column and end column), additionally we added a unique sourceId to distinguish different nodes. We propagated the sourceId to tacky representation so that when we translate into tacky instructions we still have each instruction to which AST node it belongs to. The same we did for assembly instructions. Finally, we sent the instructions with IDs to the frontend. We serialised the tacky and assembly instructions for better handling at the frontend. closes #36

@sidrasali sidrasali merged commit 42befe6 into main Sep 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Code Linking

2 participants