Skip to content

Conversation

esb
Copy link

@esb esb commented May 21, 2024

Add support for Pragmas. A pragma can be added by the addition of a comment at the end of a line. The comment has the format "# Pragma: xxxxx" where xxxxx is the name of a specific supported pragma. Each pragma, when enabled changes the way in which the line is translated in some way.

Initial support is included for a nullish coalescing pragma which changes all '||' operators to '??' within a line. It is enabled with a '??' pragma.

For example:

a ||= b # Pragma: ??

This results in the translation:

a ??= b;

@jaredcwhite
Copy link
Member

@esb Apologies for the delay in reviews…I was rather out of commission last month for personal reasons, but trying to get caught up now. Will look at this and other outstanding issues. TY!

@jaredcwhite jaredcwhite self-requested a review July 3, 2024 00:03
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.

3 participants