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

Allow macros to be defined and called without arguments #822

Merged
merged 1 commit into from
Jun 12, 2023
Merged

Allow macros to be defined and called without arguments #822

merged 1 commit into from
Jun 12, 2023

Conversation

mataha
Copy link
Contributor

@mataha mataha commented Jun 10, 2023

This PR proposes a shorthand for defining and calling macros when using them as a reusable substitute for variables assigned complex values (e.g. string literals with or without newline escapes). The use-case is formatting - from my experience it's easier to visually parse a macro-endmacro block than a multiline variable assignment.

I might be alone in that regard, though - opinions?

This commit introduces a shorthand for defining and calling macros when
using them as a reusable substitute for variables assigned complex values
(e.g. string literals with or without newline escapes). The use-case is
formatting - from my experience it's easier to visually parse a `macro`
`endmacro` block than a multiline variable assignment.

Signed-off-by: mataha <mataha@users.noreply.github.com>
Copy link
Owner

@djc djc left a comment

Choose a reason for hiding this comment

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

Thanks!

@djc djc merged commit cba1fb8 into djc:main Jun 12, 2023
@mataha mataha deleted the feat/macro-no-args branch June 12, 2023 15:01
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