Wooo actual scoping and better C interop
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
import io:*
|
||||
|
||||
|int| main() {
|
||||
|int| a = -1
|
||||
println(a)
|
||||
println(-a)
|
||||
println(+a); // this is still -1! (as C has it, anyway) (darn comment/semicolon interaction)
|
||||
|
||||
|int| b = 7
|
||||
println(b)
|
||||
println(-b)
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "test_negative_number_unary.krak.h"
|
||||
|
||||
/**
|
||||
* Variable Declarations
|
||||
*/
|
||||
|
||||
/**
|
||||
* Function Definitions
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
/**
|
||||
* Plain Typedefs
|
||||
*/
|
||||
|
||||
/**
|
||||
* Import Includes
|
||||
*/
|
||||
|
||||
/**
|
||||
* Top Level C Passthrough
|
||||
*/
|
||||
|
||||
/**
|
||||
* Extern Variable Declarations
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class Structs
|
||||
*/
|
||||
|
||||
/**
|
||||
* Function Prototypes
|
||||
*/
|
||||
|
||||
2
tests/test_negative_number_unary.krak/test_negative_number_unary.krak.sh
Executable file
2
tests/test_negative_number_unary.krak/test_negative_number_unary.krak.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
cc -std=c99 test_negative_number_unary.krak.c -o test_negative_number_unary.krak
|
||||
Reference in New Issue
Block a user