Commit Graph

46 Commits

Author SHA1 Message Date
Andrew Kelley
72fa03bada add undefined reserved word 2016-01-22 16:05:29 -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
c17309dbc5 add switch statement support to parser 2016-01-19 20:29:36 -07:00
Andrew Kelley
fbbef14013 add for loop which can iterate over arrays
See #51
2016-01-18 07:00:45 -07:00
Andrew Kelley
dc162c7f83 rename "use" to "import" 2016-01-15 18:45:52 -07:00
Andrew Kelley
5f9ecb8566 instead of 'as' to cast, call type as function 2016-01-14 02:52:33 -07:00
Andrew Kelley
d121ed961a fix noalias codegen
also make some parsing error messages better
2016-01-13 22:18:10 -07:00
Andrew Kelley
b28b7f63d1 all types are now expressions
See #22
2016-01-13 18:15:51 -07:00
Andrew Kelley
d4b8852d78 parsing enum declarations 2016-01-10 11:48:54 -07:00
Andrew Kelley
0c24ed8a81 rename restrict to noalias 2016-01-08 23:48:24 -07:00
Andrew Kelley
b7dd88ad68 suport checked arithmetic operations via intrinsics
closes #32
2016-01-08 23:41:40 -07:00
Andrew Kelley
14b9cbd43c add restrict qualifier on pointer arguments 2016-01-08 20:59:47 -07:00
Andrew Kelley
a3c97081ca add ?? maybe unwrapping binary operator
add null literal
fix number literal / maybe interactions
2016-01-07 03:23:38 -07:00
Andrew Kelley
968b85ad77 closer to guess number example working 2016-01-02 03:38:45 -07:00
Andrew Kelley
1f8e3871ee parse if maybe expression 2015-12-26 15:05:27 -07:00
Andrew Kelley
a030b60aeb add while loop 2015-12-24 14:37:43 -07:00
Josh Wolfe
f2a9b40231 more number literal syntax is supported. floats still need work 2015-12-15 04:05:53 -07:00
Josh Wolfe
cf88fcb2ad tokenizer parses all number literal types 2015-12-15 04:05:53 -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
Josh Wolfe
eb1542c102 tokenizing assignment operators 2015-12-12 18:17:27 -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
0dbee2300e add inline assembly support 2015-12-10 15:34:38 -07:00
Josh Wolfe
6a48c007a6 fix typo 2015-12-09 01:08:18 -07:00
Andrew Kelley
dfda85e870 ability to call external variadic functions 2015-12-09 01:03:04 -07:00
Josh Wolfe
f6eecfe5f4 getting started on array types 2015-12-07 08:29:19 -07:00
Josh Wolfe
f1aaf1353e add bool literals 2015-12-03 12:15:07 -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
08a2311efd support if conditionals 2015-12-01 21:19:38 -07:00
Josh Wolfe
1ed926c321 implicit void statements and all tests pass with type checking 2015-12-01 15:54:46 -07:00
Andrew Kelley
257cf09472 colored error messages that tell the source file 2015-12-01 00:50:11 -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
a7555c58d9 add unary expression 2015-11-29 13:37:55 -07:00
Andrew Kelley
e5d1f0eea5 parse and codegen for math expressions 2015-11-29 02:43:05 -07:00
Andrew Kelley
024052b448 add pub and export visibility modifiers and optimization 2015-11-27 15:46:06 -07:00
Andrew Kelley
821907317e support C-style comments, plus nesting 2015-11-27 00:40:26 -07:00
Andrew Kelley
09f68c7c33 support linker directives
now you can depend on libc in zig language instead of it being
hardcoded in the compiler.
2015-11-24 23:44:41 -07:00
Andrew Kelley
ca836191e1 debug information for functions 2015-11-24 19:07:33 -07:00
Andrew Kelley
925c805d4b add unreachable expression
now creating .o file from hello.zig correctly
2015-11-24 13:37:14 -07:00
Andrew Kelley
4bbc074dd7 hello world IR code looks good 2015-11-24 02:43:45 -07:00
Andrew Kelley
1b24f4c73c parsing hello.zig example with recursive descent
that was easy
2015-11-23 21:30:12 -07:00
Andrew Kelley
4236b85c72 parser generator supports a simple OR 2015-11-07 04:50:48 -07:00
Andrew Kelley
ae0e9685c6 parser generator supports sub rules 2015-11-06 23:59:40 -07:00
Andrew Kelley
174baa49bd progress toward more complex parser gen 2015-11-04 17:15:46 -07:00
Andrew Kelley
7cfceeca2d parser generator beginnings 2015-11-03 22:39:35 -07:00