Skip to content
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

Feature/ast visualization #2

Merged
merged 142 commits into from
Jan 28, 2025
Merged

Feature/ast visualization #2

merged 142 commits into from
Jan 28, 2025

Conversation

Process-ing
Copy link
Contributor

@Process-ing Process-ing commented Jan 28, 2025

NOTE: This PR is a revamp of this one, in the LARA Framework repository, and most of the things here are also referred in the previous PR.

Description

Closes #1. This PR adds a visualization tool that allows the visual mapping of source code to AST. This tool was develop on the context of the summer internship with topic "[CSE01] Visual Mapping of Source Code to Abstract Syntax Tree (AST)", from the INESC TEC Summer Internship 2024 programme.

In specific, this PR adds the generic implementation of the tool, that can be used with any LARA-based compiler that implements the needed classes, and adds support for including the tool as an NPM package. After merging this PR, this one can also be merged.

Changes Made

  • Added a class (GenericVisualizationTool), as part of the LARA API, with methods that allows the launching of the tool.
  • Created a web interface that allows the visualization of the AST and the source code side-by-side and all the functionalities implemented for the code mapping, like the node-code highlighting and many others.
  • Added an interface (GenericAstConverter) with all the needed operations from the compiler, which every LARA-based compiler should implement to use the tool.
  • Configured the base NPM project so that the tool can be used in a LARA project as an NPM package.

How Has This Been Tested

This was mainly tested manually and in the context of the Clava implementation. More details about how to test this by yourself can be found in the respective PR.

@Process-ing Process-ing requested a review from joaobispo January 28, 2025 19:33
@joaobispo joaobispo merged commit 02e6a92 into main Jan 28, 2025
@joaobispo joaobispo deleted the feature/ast-visualization branch January 28, 2025 21:17
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.

Move LARA AST Visualization to NPM Repo/Package
2 participants