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

Add identity and ignore container blocks #20

Open
cromo opened this issue May 25, 2021 · 0 comments
Open

Add identity and ignore container blocks #20

cromo opened this issue May 25, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@cromo
Copy link
Owner

cromo commented May 25, 2021

As mentioned in the comments of #15, two container blocks could be very handy - especially when paired with the ability to move and fold their contents (#17 and #18).

The identity container would pass through its contents to the code generator unaltered and undecorated. At first glance this wouldn't be very useful, but considering that it can be used to group code and move it around and fold it, could be useful. The idea is similar to a #region in some more traditional languages like C#.

The ignore container would do even less - it would return nothing, effectively commenting out its contents. This is useful for debugging, where code can be temporarily enabled while testing and disabled later without deleting it. It provides a group for such code so that it can be moved or folded as a unit.

Together, switching back and forth between an identity and an ignore container gives a compile-time enable switch for a block of code (or even a single token!), which could be quite useful.

@cromo cromo added the enhancement New feature or request label May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant