Wooo actual scoping and better C interop

This commit is contained in:
Nathan Braswell
2015-04-10 00:37:31 -04:00
parent e37836aea5
commit e3aa531856
23 changed files with 194 additions and 46 deletions

View File

@@ -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;
}

View File

@@ -0,0 +1,10 @@
#include "test_negative_number_unary.krak.h"
/**
* Variable Declarations
*/
/**
* Function Definitions
*/

View File

@@ -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
*/

View File

@@ -0,0 +1,2 @@
#!/bin/sh
cc -std=c99 test_negative_number_unary.krak.c -o test_negative_number_unary.krak