Implementing for #2

Open
opened 2026-05-05 17:28:44 +00:00 by dalmurii · 1 comment
Owner

@coder0908 wants to contribute to this project actively.
I am assigning a job for him: for.

This compiler must understand at least C99+ feature of for.
Thus it must parse following code:

for(int i = 0; i < 30; i += 1) {}

For better understanding a very primitive implementation while would be helpful.
https://talkischeap.work.gd/ae3f/aclspv/src/branch/master/src/emit/body/while.cc
https://talkischeap.work.gd/ae3f/aclspv/src/branch/master/lib/emit/entp_body.c

@coder0908 wants to contribute to this project actively. I am assigning a job for him: `for`. This compiler must understand at least C99+ feature of for. Thus it must parse following code: ```c for(int i = 0; i < 30; i += 1) {} ``` For better understanding a very primitive implementation `while` would be helpful. https://talkischeap.work.gd/ae3f/aclspv/src/branch/master/src/emit/body/while.cc https://talkischeap.work.gd/ae3f/aclspv/src/branch/master/lib/emit/entp_body.c
Contributor
https://talkischeap.work.gd/ae3f/aclspv/src/branch/master/src/emit/body/while.cc -> https://talkischeap.work.gd/ae3f/aclspv/src/branch/master/src/lib/emit/body/while.cc
Sign in to join this conversation.
No description provided.