Commit Graph

102 Commits

Author SHA1 Message Date
Andrew Kelley
968b85ad77 closer to guess number example working 2016-01-02 03:38:45 -07:00
Andrew Kelley
9a8851515b basic maybe type working 2016-01-02 00:06:06 -07:00
Andrew Kelley
b3ac5c16ec block expressions require parens
closes #39
2015-12-31 16:04:13 -07:00
Andrew Kelley
7ba99e9715 analyze if maybe var expressions 2015-12-26 15:43:40 -07:00
Andrew Kelley
1f8e3871ee parse if maybe expression 2015-12-26 15:05:27 -07:00
Andrew Kelley
50357dad45 add struct value expression 2015-12-24 00:00:23 -07:00
Andrew Kelley
e21369a153 codegen: support byvalue struct assignment 2015-12-23 03:19:22 -07:00
Andrew Kelley
431170d981 codegen: fix struct pointer field access 2015-12-22 13:22:40 -07:00
Andrew Kelley
437e9b954d add some brainstorming example zig code 2015-12-17 14:59:08 -07:00
Andrew Kelley
4d45d14b55 use realpath to avoid duplicate imports 2015-12-15 21:48:41 -07:00
Andrew Kelley
aa56f016f7 support addressof operator and struct pointer field access 2015-12-15 20:08:53 -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
66ca916805 std: expose exit syscall 2015-12-15 00:07:51 -07:00
Andrew Kelley
3049410260 const and var instead of let and let mut
closes #34
2015-12-14 18:51:07 -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
bd77bc749a structs are working 2015-12-12 22:55:29 -07:00
Andrew Kelley
38f12adbda progress on struct support 2015-12-12 02:34:09 -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
358d699fa9 add test for arrays 2015-12-08 15:46:36 -07:00
Andrew Kelley
e8550814c5 support assigning to arrays 2015-12-08 15:31:43 -07:00
Andrew Kelley
6e0c3dc173 array access support 2015-12-08 14:47:17 -07:00
Andrew Kelley
75efc31329 add array access syntax 2015-12-08 14:15:34 -07:00
Andrew Kelley
3c3be10a60 add mutable local variables 2015-12-06 23:09:46 -07:00
Andrew Kelley
5fd754c84a fix hello world example 2015-12-06 22:01:05 -07:00
Andrew Kelley
a398afa7cc more C header interoperability 2015-12-03 17:06:33 -07:00
Josh Wolfe
f4b9b03f54 fix codegen for void parameters 2015-12-03 14:29:19 -07:00
Josh Wolfe
f1aaf1353e add bool literals 2015-12-03 12:15:07 -07:00
Josh Wolfe
6494cf208e fix if-else type mismatch crash 2015-12-03 11:56:59 -07:00
Josh Wolfe
0c2cc9d2cf tests for local variables 2015-12-03 11:06:05 -07:00
Josh Wolfe
5af4ef88ac local variables work 2015-12-03 10:56:17 -07:00
Andrew Kelley
f8ca6c70c7 add labels and goto 2015-12-03 00:47:35 -07:00
Josh Wolfe
c89f77dd8e parsing variable declaration 2015-12-02 16:33:06 -07:00
Andrew Kelley
370de7386c fix parameter access and thus shared library example 2015-12-02 00:53:57 -07:00
Josh Wolfe
c6a9ab107b string literals have type *const u8 2015-12-01 14:41:03 -07:00
Andrew Kelley
dfb6682089 add test for bad import 2015-12-01 02:29:21 -07:00
Andrew Kelley
58e375d0a1 support multiple files 2015-12-01 02:08:58 -07:00
Andrew Kelley
cd68969115 closer to multiple files working 2015-11-30 22:53:37 -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
Andrew Kelley
8f0f318c39 add directive to specify root export version 2015-11-30 02:12:20 -07:00
Andrew Kelley
9b477230e0 ability to generate shared library and h file 2015-11-29 18:02:20 -07:00
Andrew Kelley
918e7641fc rename unary expression to prefix op expression 2015-11-29 14:00:34 -07:00
Andrew Kelley
cb4773ce29 add root export declaration which is overridable by command line options 2015-11-27 21:24:47 -07:00
Andrew Kelley
024052b448 add pub and export visibility modifiers and optimization 2015-11-27 15:46:06 -07:00