You are browsing as a guest. Sign up (or log in) to start making projects!

3h 12m 57s logged

HOLDUP DID I COOK (dieLog #2)

Finished : automatic “INDENT” and “DEDENT”

  • enables codegen to space out blocks of code.

: “IF” statement

  • uses the new automatic system trough recusion

: MAIN() function search

  • for stzarting function for a basic C sytax.

: Math OPERATORS

  • such as “is” “is_not” “grater_than” less than… you get the point.

Since in suffer levels 1 and 2 are used basic symbol types “<,>” etc, i didnt bother much checking the correctnbes of the implementation.

CODE EXAMPLE (with the new stuff):
-fineLang ->

SUFFER: two
;
FUNCTION main():
let x = 5
if x > 3:
print(x)
if x > 4:
print(x)
let y = 6
if (x add y > 10):
print(“hi”)

  • to C ->

#include <stdio.h>
int main() {
int x = 5;
if (x > 3) {
printf(“%d\n”, x);
if (x > 4) {
printf(“%d\n”, x);
int y = 6;
if (x + y > 10) {
printf(“hi\n”);
}
}
}
}

INTO THE ULTIMATE COMPILED STATE ->

5
5
hi

To be honest.

this was a very complicated test case, and i wouldnt lie if i said that If this fails i wouldnt be surprised

THATS IT FOR TODAY!! thanks you for your time and have a nice day :>)

0
3

Comments 0

No comments yet. Be the first!