exokomodo / exokomodo/daybreak
Add defc macros
- Dominant language
- C
- Stars
- 10
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
**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
```pascal
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.
Contributor guide
Research direction
Start by locating the generation step and the existing C-defined math-operation macros. Compare the proposed defc syntax with how expressions and emitted output are currently handled; done means math operations are defined in Daybreak using defc and generate the expected underlying-language output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100