Files
kraken/tests/test_c_passthrough.krak

35 lines
668 B
Plaintext
Raw Normal View History

import c_passthrough_diff
__if_comp__ __C__ simple_passthrough """
#include <stdio.h>
int same = 5;
"""
fun main(): int {
__if_comp__ __C__ simple_passthrough """
printf("same_file: %d\n", same);
"""
c_passthrough_diff::print_it();
var i: int = 7;
var j: int = 6;
__if_comp__ __C__ simple_passthrough(i = i, j = j : j = j:) """
j = i + j;
"""
c_passthrough_diff::print_it(j)
// test new shorthand for same name assignments
var r: int = 1000;
var s: int = 337;
__if_comp__ __C__ simple_passthrough(r, s : s:) """
s = r + s;
"""
c_passthrough_diff::print_it(s)
return 0
}