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

Introduce prepending and appending to a literal define list (+=, =+) #433

Merged
merged 1 commit into from
Jan 27, 2024

Conversation

mkruselj
Copy link
Collaborator

Enables fun stuff like:

define FOO := name
define FOO += surname
define FOO =+ how, about, them, apples

on init
    literate_macro(declare #l#) on HELLO
    literate_macro(message(#l#)) on HELLO
end on

which results in:

on init
    declare $how
    declare $about
    declare $them
    declare $apples
    declare $name
    declare $surname
    message($how)
    message($about)
    message($them)
    message($apples)
    message($name)
    message($surname)
end on

Wahey!

@mkruselj mkruselj merged commit a2f843e into nojanath:master Jan 27, 2024
1 check passed
@mkruselj mkruselj deleted the define-append-prepend branch January 27, 2024 01:51
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.

1 participant