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

Fix inline comments #96

Merged
merged 4 commits into from
Apr 11, 2023
Merged

Fix inline comments #96

merged 4 commits into from
Apr 11, 2023

Conversation

spinillos
Copy link
Member

v.Doc() function from Cuelang doesn't retrieve inner comments. When it happens, we need to cast the cue.Value to ast.File and iterate it (We did something similar in thema) to retrieve the missing ones: code

Another changes in the PR:

  • Merged commentsFor with commentsForGroup and use only commentsFor.
  • Moved comments related of ts class to its own one and created its own Comment struct.
  • ObjectLit was putting commas at the end of each line, so the comma was after the comment instead after the value type. When the value comes from a KeyValueExpr, we put the semicolon after the value type: here and here.

Copy link

@joanlopez joanlopez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! 🚀

@spinillos spinillos merged commit 9ee4277 into main Apr 11, 2023
@spinillos spinillos deleted the fix-inline-comments branch April 11, 2023 11:40
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.

2 participants