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 defc macros #86

Open
jamesaorson opened this issue Mar 30, 2022 · 0 comments
Open

Add defc macros #86

jamesaorson opened this issue Mar 30, 2022 · 0 comments
Labels

Comments

@jamesaorson
Copy link
Contributor

jamesaorson commented Mar 30, 2022

Is your feature request related to a problem? Please describe.
All of the math operations of Daybreak are defined as macros. These should be defined in Daybreak and not be defined directly as C code in the generation step.

Describe the solution you'd like
This should be the syntax for macros

defc add(x y) do
  // ASM code in here, asm being whatever output language we are generating
  ((x)+(y))
end

Describe alternatives you've considered
I have considered directly taking the C syntax but that feels nasty. This is consistent with the language's general design.

Additional context
This will be the equivalent to emitting assembly for our language for expressions. Our assembly being the underlying language you emit to.

@jamesaorson jamesaorson changed the title Add expression macros Add C macros Apr 27, 2022
@jamesaorson jamesaorson changed the title Add C macros Add asm macros Apr 27, 2022
@jamesaorson jamesaorson changed the title Add asm macros Add defc macros Apr 27, 2022
@jamesaorson jamesaorson added the enhancement New feature or request label Apr 27, 2022
@jamesaorson jamesaorson moved this to Backlog in Daybreak May 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

1 participant