Commit Graph

29 Commits

Author SHA1 Message Date
Andrew Kelley
289bfa890b fix c hello world example 2016-08-30 20:48:30 -07:00
Andrew Kelley
f1d338194e rewrite how importing works
* Introduce the concept of packages. Closes #3
 * Add support for error notes.
 * Introduce `@import` and `@c_import` builtin functions and
   remove the `import` and `c_import` top level declarations.
 * Introduce the `use` top level declaration.
 * Add `--check-unused` parameter to perform semantic
   analysis and codegen on all top level declarations, not
   just exported ones and ones referenced by exported ones.
 * Delete the root export node and add `--library` argument.
2016-03-01 03:13:40 -07:00
Andrew Kelley
97c61313da c_import of stdio.h works for some functions
See #88
2016-01-27 23:23:02 -07:00
Andrew Kelley
5afe473a86 different extern syntax and simplify parsing top level decls 2016-01-26 13:08:21 -07:00
Andrew Kelley
a37bb4a4da add the C integer types 2016-01-25 23:21:13 -07:00
Andrew Kelley
1d68150242 compiler enforces checking for error
See #23
2016-01-25 20:27:57 -07:00
Andrew Kelley
50854226a6 syntax: back to -> for return type, no more => 2016-01-25 17:08:18 -07:00
Andrew Kelley
bcb18338cd update std lib to use error type and global variables 2016-01-24 22:53:00 -07:00
Andrew Kelley
c0ea9290c4 main returns %void 2016-01-23 02:14:01 -07:00
Andrew Kelley
5e212db29c parsing error value decls and error value literals
and return with '?' or '%' prefix
2016-01-20 18:18:50 -07:00
Andrew Kelley
5f7685336f better main symbol prototype
closes #64
2016-01-16 00:07:34 -07:00
Andrew Kelley
dc162c7f83 rename "use" to "import" 2016-01-15 18:45:52 -07:00
Andrew Kelley
b28b7f63d1 all types are now expressions
See #22
2016-01-13 18:15:51 -07:00
Andrew Kelley
431d8f946f implicit casting from constant size array to string
closes #36
2015-12-15 17:29:44 -07:00
Andrew Kelley
f5a3281877 when linking with libc use the C runtime library 2015-12-15 12:44:42 -07:00
Andrew Kelley
1f48b626a1 std: even more efficient inline assembly 2015-12-15 02:47:39 -07:00
Andrew Kelley
f17e20d5fe instead of *mut and *const, & and &const
closes #33
2015-12-14 18:10:25 -07:00
Andrew Kelley
e411467e1d add number literal type
it gets implicitly casted to whatever is needed.

closes #24
2015-12-14 02:46:37 -07:00
Andrew Kelley
ac630d354d std: print_str no longer requires length argument
add explicit casting support from array to string
2015-12-12 02:05:08 -07:00
Andrew Kelley
a10277bd94 prepare codebase for struct and string support
parsing code for structs, strings, and c string literals
partial semantic analyzing code for structs, strings, and c string literals
2015-12-12 00:10:37 -07:00
Andrew Kelley
f740268ab7 move roadmap to github issues 2015-12-11 04:25:10 -07:00
Andrew Kelley
d697404f64 hello world working without libc 2015-12-11 03:55:26 -07:00
Andrew Kelley
15ba5bc54e provide std.zig and add it to import paths 2015-12-10 17:42:47 -07:00
Andrew Kelley
0dbee2300e add inline assembly support 2015-12-10 15:34:38 -07:00
Andrew Kelley
dfda85e870 ability to call external variadic functions 2015-12-09 01:03:04 -07:00
Andrew Kelley
5fd754c84a fix hello world example 2015-12-06 22:01:05 -07:00
Andrew Kelley
f8ca6c70c7 add labels and goto 2015-12-03 00:47:35 -07:00
Josh Wolfe
c6a9ab107b string literals have type *const u8 2015-12-01 14:41:03 -07:00
Andrew Kelley
55b8472374 refactor code to prepare for multiple files
verbose compiler output is now behind --verbose flag
2015-11-30 20:00:39 -07:00