Skip to content

Reviewing metadata #1196

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

Merged
merged 8 commits into from
Jul 21, 2025
Merged

Reviewing metadata #1196

merged 8 commits into from
Jul 21, 2025

Conversation

Janther
Copy link
Contributor

@Janther Janther commented Jul 9, 2025

This PR addresses how we interact with the getMetadata() and updateMetadata() functions.
Since every node calls these functions in order to retrieve the location information of the node and the comments contained by it.

All node files will have the same changes and the important changes are:

  1. The introduction of the src/slang-nodes/SlangNode.ts which from now on starts behaving as a base class for all nodes.
  2. The introduction of the src/slang-nodes/CommentNode.ts which from now on starts behaving as a base class for all comments.
  3. The removal of src/slang-utils/metadata.ts since all of it's logic was moved into src/slang-nodes/SlangNode.ts as constructor or instance function.

To check the progress step by step, here are the main changes to look at commit by commit:

  • fa46253 src/slang-utils/metadata.ts and src/types.d.ts
  • e5fa3ed every file have the same change pattern.
  • 7b09497 src/slang-utils/metadata.ts and src/types.d.ts.
  • 4498ad2 added src/slang-nodes/SlangNode.ts and src/slang-nodes/CommentNode.ts and removed src/slang-utils/metadata.ts.
  • 76056f3 small change in the function signature of updateMetadata in src/slang-nodes/SlangNode.ts

@Janther Janther requested a review from fvictorio July 9, 2025 19:07
@Janther Janther added enhancement New feature or request refactor reorganising the code without changes performance Results in smaller size, better memory usage, or faster execution and removed performance Results in smaller size, better memory usage, or faster execution labels Jul 9, 2025
@Janther Janther force-pushed the reviewing-metadata branch 5 times, most recently from c6ec971 to 4461a37 Compare July 12, 2025 18:38
@Janther Janther force-pushed the reviewing-metadata branch from 4461a37 to cae69e7 Compare July 21, 2025 14:21
@Janther Janther merged commit f3310eb into main Jul 21, 2025
7 checks passed
@Janther Janther deleted the reviewing-metadata branch July 21, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Results in smaller size, better memory usage, or faster execution refactor reorganising the code without changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants