Commit Graph

32 Commits

Author SHA1 Message Date
Andrew Kelley
7ba99e9715 analyze if maybe var expressions 2015-12-26 15:43:40 -07:00
Andrew Kelley
5943f99510 implement continue expression
closes #6
2015-12-24 15:36:49 -07:00
Andrew Kelley
44ca5e19dc add error for break outside loop
also fix break in nested loops
2015-12-24 15:30:55 -07:00
Andrew Kelley
5ceaae288c add break expression 2015-12-24 15:09:47 -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
fe3ad27d5f analyze: error for infinite size struct 2015-12-22 13:41:33 -07:00
Andrew Kelley
e4cb28dbf2 structs have debug information 2015-12-16 17:11:35 -07:00
Andrew Kelley
aa56f016f7 support addressof operator and struct pointer field access 2015-12-15 20:08:53 -07:00
Andrew Kelley
28c5a8f2ca analyze: clean up type checking 2015-12-15 18:21:59 -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
423ee0689b add implicit casting support 2015-12-15 17:11:57 -07:00
Andrew Kelley
f5a3281877 when linking with libc use the C runtime library 2015-12-15 12:44:42 -07:00
Andrew Kelley
4dc2b82506 constant initializers allow simple expressions 2015-12-14 23:49:56 -07:00
Andrew Kelley
83b68c9f13 add global variable support
closes #12
2015-12-14 23:10:18 -07:00
Andrew Kelley
52e19b4a9b analyze: BlockContext has concept of module scope 2015-12-14 22:06: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
3d8eb10897 fix incorrect debug info path to imports 2015-12-13 14:34:07 -07:00
Andrew Kelley
bd77bc749a structs are working 2015-12-12 22:55:29 -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
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
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
Josh Wolfe
f6eecfe5f4 getting started on array types 2015-12-07 08:29:19 -07:00
Josh Wolfe
5af4ef88ac local variables work 2015-12-03 10:56:17 -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
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
Josh Wolfe
9e0ff6faa2 factor analysis code out of codegen 2015-11-30 09:14:58 -07:00