Andrew Kelley
e025c70166
stage2: fix llvm.zig with opaque types back to single-item pointer
2019-02-14 23:17:11 -05:00
Andrew Kelley
6769183a9d
fix implicit cast error unions with non-optional to optional pointer
...
and update self hosted compiler for C pointers
See #1059
2019-02-14 15:48:28 -05:00
Jimmi Holst Christensen
8139c5a516
New Zig formal grammar ( #1685 )
...
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
2018-11-13 05:08:37 -08:00
Jimmi Holst Christensen
378d3e4403
Solve the return type ambiguity ( #1628 )
...
Changed container and initializer syntax
* <container> { ... } -> <container> . { ... }
* <exrp> { ... } -> <expr> . { ...}
2018-10-15 09:51:15 -04:00
Andrew Kelley
adefd1a52b
self-hosted: function calling another function
2018-07-24 20:24:05 -04:00
Andrew Kelley
93e78ee722
self-hosted can compile libc hello world
2018-07-22 23:28:53 -04:00
Andrew Kelley
1d85b588ea
self-hosted: progress on IR for supporting libc hello world
...
* add c int types
* some more ir stubs
2018-07-19 00:08:47 -04:00
Andrew Kelley
97bfeac13f
self-hosted: create tmp dir for .o files and emit .o file for fn
2018-07-16 20:52:50 -04:00
Andrew Kelley
363f4facea
self-hosted: generate LLVM IR for simple function
2018-07-15 00:07:33 -04:00
Andrew Kelley
278829fc2c
self-hosted: adding a fn to an llvm module
2018-07-14 16:03:22 -04:00
Andrew Kelley
ec1b6f6673
breaking syntax change: ??x to x.? ( #1095 )
...
See #1023
This also renames Nullable/Maybe to Optional
2018-06-09 23:42:14 -04:00
Andrew Kelley
3671582c15
syntax: functions require return type. remove `->`
...
The purpose of this is:
* Only one way to do things
* Changing a function with void return type to return a possible
error becomes a 1 character change, subtly encouraging
people to use errors.
See #632
Here are some imperfect sed commands for performing this update:
remove arrow:
```
sed -i 's/\(\bfn\b.*\)-> /\1/g' $(find . -name "*.zig")
```
add void:
```
sed -i 's/\(\bfn\b.*\))\s*{/\1) void {/g' $(find ../ -name "*.zig")
```
Some cleanup may be necessary, but this should do the bulk of the work.
2018-01-25 04:10:11 -05:00
Andrew Kelley
39c7bd24e4
port most of main.cpp to self hosted compiler
2017-12-23 00:57:56 -05:00