Start using UnaryOp/PostUnaryOp ++/-- now works post/pre and also on pointers. Fix ++/-- on any number. Added examples. c3c now compiles files by default. Extended symbol resolution. Addition of 'extern'. Multi-level paths.

This commit is contained in:
Christoffer Lerno
2019-12-16 11:28:39 +01:00
parent 641c8b7b76
commit cdc1bfe267
74 changed files with 5924 additions and 457 deletions

View File

@@ -0,0 +1,11 @@
module bar;
import baz::foo;
import testbaz;
public func void test()
{
Foo x;
foo::test();
Zab z;
}

View File

@@ -0,0 +1,20 @@
module baz::foo;
import bar;
public struct Foo
{
int a;
}
extern func void printf(char *hello);
local func void ofke()
{}
func void exple() {}
public func void test()
{
printf("Hello from baz::foo::test()!\n");
}

View File

@@ -0,0 +1,11 @@
module hello_world;
import bar;
extern func void printf(char *hello);
func int main(int x)
{
printf("Hello World!\n");
bar::test();
return 1;
}

View File

@@ -0,0 +1,10 @@
[[executable]]
name = "hello_world"
version = "0.1.0"
authors = ["John Doe <john.doe@example.com>"]
langrev = "1"
warnings = ["no-unused"]
# sources compiled
sources = ["./**"]
# libraries to use
libs = []

View File

@@ -0,0 +1,6 @@
module testbaz::zab;
public struct Zab
{
double a;
}