compiler: start work on binary expressions & stuff

Reviewed-on: NeoFlock/noom#7
Co-authored-by: tema5002 <tema5002@tuta.io>
Co-committed-by: tema5002 <tema5002@tuta.io>
This commit is contained in:
2026-06-09 20:11:29 +02:00
committed by Blendi
parent 8709efda7d
commit c29c2796d7
5 changed files with 191 additions and 62 deletions

View File

@@ -241,7 +241,9 @@ int main(int argc, char **argv) {
}
char* code = read_file(params.script_path);
if (code == 0) return 1;
return the_theoretical_function_to_execute_your_code_that_should_be_replaced_later(code, argv[0], params.script_path);
int offset = 0;
if (code[0] == '#' && code[1] == '!') for (offset = 2; code[offset] && code[offset] != '\n'; offset++);
return the_theoretical_function_to_execute_your_code_that_should_be_replaced_later(code + offset, argv[0], params.script_path);
}
if (params.use_stdin) {
char* code = read_stdin();